IsPedReloadingWeapon: Difference between revisions
Jump to navigation
Jump to search
m (It's in 1.5.6) |
mNo edit summary |
||
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
{{Client function}} | {{Client function}} | ||
{{New items|3.0156|1.5. | {{New items|3.0156|1.5.5| | ||
This function is used to determine whether or not a ped is currently reloading their weapon. Useful to stop certain quick reload exploits. | This function is used to determine whether or not a ped is currently reloading their weapon. Useful to stop certain quick reload exploits. | ||
|11856}} | |11856}} |
Revision as of 23:00, 1 July 2018
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
Click to collapse [-]
ClientThis 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
- addPedClothes
- getPedClothes
- removePedClothes
- createPed
- getPedAmmoInClip
- getPedArmor
- getPedFightingStyle
- getPedOccupiedVehicle
- getPedOccupiedVehicleSeat
- getPedStat
- getPedTarget
- getPedTotalAmmo
- getPedWalkingStyle
- getPedWeapon
- getPedWeaponSlot
- getPedContactElement
- getValidPedModels
- isPedChoking
- isPedDead
- isPedDoingGangDriveby
- isPedDucked
- isPedHeadless
- isPedInVehicle
- isPedOnFire
- isPedOnGround
- isPedWearingJetpack
- killPed
- removePedFromVehicle
- setPedAnimation
- setPedAnimationProgress
- setPedAnimationSpeed
- setPedArmor
- setPedDoingGangDriveby
- setPedFightingStyle
- setPedHeadless
- setPedOnFire
- setPedStat
- setPedWalkingStyle
- setPedWeaponSlot
- warpPedIntoVehicle