IsPedReloadingWeapon
From Multi Theft Auto: Wiki
This function is used to determine whether or not a ped is currently reloading their weapon. Useful to stop certain quick reload exploits.
Syntax
bool isPedReloadingWeapon ( ped thePed )
OOP Syntax Help! I don't understand this!
- Method: ped:isReloadingWeapon(...)
- Variable: .reloadingWeapon
Required Arguments
- thePed: The ped you are checking.
Returns
Returns true if the ped is currently reloading a weapon, false otherwise.
Example
This example checks if the player who enters the /amireloading command is reloading and outputs a message.
function isHeReloading( ) if isPedReloadingWeapon( localPlayer ) then outputChatBox( "No, you're not reloading a weapon" ) else outputChatBox( "You are reloading a weapon" ) end end addCommandHandler( "amireloading", isHeReloading )
See Also
- getPedAmmoInClip
- getPedAnalogControlState
- getPedAnimation
- getPedArmor
- getPedBonePosition
- getPedCameraRotation
- getPedClothes
- getPedContactElement
- getPedControlState
- getPedFightingStyle
- getPedMoveState
- getPedOccupiedVehicle
- getPedOccupiedVehicleSeat
- getPedOxygenLevel
- getPedSimplestTask
- getPedStat
- getPedTarget
- getPedTargetCollision
- getPedTargetEnd
- getPedTargetStart
- getPedTask
- getPedTotalAmmo
- getPedVoice
- getPedWalkingStyle
- getPedWeapon
- getPedWeaponMuzzlePosition
- getPedWeaponSlot
- getValidPedModels
- givePedWeapon
- isPedChoking
- isPedDead
- isPedDoingGangDriveby
- isPedDoingTask
- isPedDucked
- isPedHeadless
- isPedInVehicle
- isPedOnFire
- isPedOnGround
- isPedWearingJetpack
- killPed
- removePedClothes
- removePedFromVehicle
- setAnalogControlState
- setPedAimTarget
- setPedAnalogControlState
- setPedAnimation
- setPedAnimationProgress
FROM VERSION 1.5.7 r19626 ONWARDS
FROM VERSION 1.5.7 r19626 ONWARDS
- setPedFootBloodEnabled
- setPedHeadless
- setPedLookAt
- setPedOnFire
- setPedOxygenLevel
- setPedStat
- setPedTargetingMarkerEnabled
- setPedVoice
- setPedWalkingStyle
- setPedWeaponSlot
- warpPedIntoVehicle