- Documentation
- Server functions
- setPedReloadingWeapon
Function
setPedReloadingWeapon
Marks a ped as reloading for the given time. It does not start any animation in the game; it is a flag for scripts read by isPedReloadingWeapon, e.g. when your own weapon system needs its own reload time. A time of 0 or less clears the flag.
Syntax
bool setPedReloadingWeapon(ped ped, int duration)Arguments
pedped- A player or an NPC.
durationint- Time in milliseconds (1000 = 1 second). 0 = end of reloading.
Returns
true on success.
Example
setPedReloadingWeapon(player, 2500)