Scripting/Squirrel/Functions/Game/SetWeaponSync
From VC-MP Wiki
Contents |
Syntax
SetWeaponSync( int weaponID, bool )
Arguments
- ID - The ID of the weapon's in the game.
- bool - enabled / false weapon's
Example
You can disable the synchronization of weapon. For example: !blockwep minigun
function onPlayerCommand( player, cmd, text ) { if ( cmd == "blockwep" ) { local wepid = GetWeaponID( text ); Message( "Synchronization is disabled:[ " + GetWeaponName( wepid ) + " ]" ) SetWeaponSync( wepid, false ); } }
Example 2
You can enable the synchronization of weapon. For example: !unlockwep minigun
function onPlayerCommand( player, cmd, text ) { if ( cmd == "unlockwep" ) { local wepid = GetWeaponID( text ); Message( "Synchronization is enabled:[ " + GetWeaponName( wepid ) + " ]" ) SetWeaponSync( wepid, true ); } }
