ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Server functions
  3. setPedReloadingWeapon

Function

setPedReloadingWeapon

ServerPedsTrilogy Hub only

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)

See also