- Documentation
- Server functions
- setWeaponState
Function
setWeaponState
Sets a scripted weapon's state.
Syntax
bool setWeaponState(weapon weapon, string state)Arguments
weaponweapon- The scripted weapon.
statestring"ready","firing"or"reloading".
Returns
true on success, false for an unknown state.
Example
setWeaponState(turret, "firing")
setTimer(setWeaponState, 3000, 1, turret, "ready")