- Documentation
- Server functions
- getWeaponState
Function
getWeaponState
Returns a scripted weapon's state.
Syntax
string getWeaponState(weapon weapon)Arguments
weaponweapon- The scripted weapon.
Returns
"ready", "firing" or "reloading".
Example
if getWeaponState(turret) == "ready" then
fireWeapon(turret)
end