isPedReloadingWeapon
Client-side
Server-side
Shared
Manual Review Required
Please finish this page using the corresponding Old Wiki article. Go to Contribution guidelines for more information.
This function is used to determine whether or not a ped is currently reloading their weapon. Useful to stop certain quick reload exploits.
OOP Syntax Help! I don't understand this!
- Method:ped:isReloadingWeapon(...)
- Variable: .reloadingWeapon
Syntax
bool isPedReloadingWeapon ( ped thePed )Required Arguments
- thePed: The ped you are checking.
Returns
- bool: value
Returns true if the ped is currently reloading a weapon, false otherwise.
Code Examples
shared
This example checks if the player who enters the/amireloadingcommand is reloading and outputs a message.
function isHeReloading( ) if isPedReloadingWeapon( localPlayer ) then outputChatBox( "You are reloading a weapon" ) else outputChatBox( "No, you're not reloading a weapon" ) endendaddCommandHandler( "amireloading", isHeReloading )See Also
Ped Functions
- addPedClothes
- canPedBeKnockedOffBike
- createPed
- getPedAmmoInClip
- getPedAnalogControlState
- getPedAnimation
- getPedArmor
- getPedBonePosition
- getPedCameraRotation
- getPedClothes
- getPedContactElement
- getPedControlState
- getPedFightingStyle
- getPedGravity
- getPedMoveState
- getPedOccupiedVehicle
- getPedOccupiedVehicleSeat
- getPedOxygenLevel
- getPedSimplestTask
- getPedStat
- getPedTarget
- getPedTargetCollision
- getPedTargetEnd
- getPedTargetStart
- getPedTask
- getPedTotalAmmo
- getPedVoice
- getPedWalkingStyle
- getPedWeapon
- getPedWeaponMuzzlePosition
- getPedWeaponSlot
- getValidPedModels
- givePedWeapon
- isPedBleeding
- isPedChoking
- isPedDead
- isPedDoingGangDriveby
- isPedDoingTask
- isPedDucked
- IsPedFootBloodEnabled
- isPedHeadless
- isPedInVehicle
- isPedOnGround
- isPedReloadingWeapon
- isPedTargetingMarkerEnabled
- isPedWearingJetpack
- killPed
- playPedVoiceLine
- reloadPedWeapon
- removePedClothes
- removePedFromVehicle
- resetPedVoice
- setPedAimTarget
- setPedAnalogControlState
- setPedAnimation
- setPedAnimationProgress
- setPedAnimationSpeed
- setPedArmor
- setPedBleeding
- setPedCameraRotation
- setPedCanBeKnockedOffBike
- setPedChoking
- setPedControlState
- setPedDoingGangDriveby
- setPedEnterVehicle
- setPedExitVehicle
- setPedFightingStyle
- setPedFootBloodEnabled
- setPedGravity
- setPedHeadless
- setPedLookAt
- setPedOxygenLevel
- setPedStat
- setPedTargetingMarkerEnabled
- setPedVoice
- setPedWalkingStyle
- setPedWeaponSlot
- setPedWearingJetpack
- warpPedIntoVehicle