Scripting/Squirrel/Functions/Game/SetAmmuWeaponEnabled
From VC-MP Wiki
Contents |
Syntax
SetAmmuWeaponEnabled( weaponslot, bool )
Arguments
- weaponslot - Sets the weapon slot.
- bool - enabled / false weapon's.
Example
You can disable the slot of weapon. For example: /c blockwepslot weaponslot
function onPlayerCommand( player, cmd, text ) { if ( cmd == "blockwepslot" ) { Message( "Weapon slot is disabled:[ " + weaponslot + " ]" ) SetAmmuWeaponEnabled( weaponslot, 1 ); } }
Example 2
You can enable the slot of weapon. For example: /c unblockwepslot weaponslot
function onPlayerCommand( player, cmd, text ) { if ( cmd == "unblockwepslot" ) { Message( "Weapon slot is enabled:[ " + weaponslot + " ]" ) SetAmmuWeaponEnabled( weaponslot, 4 ); } }
