Scripting/Squirrel/Functions/Game/GetWeaponSync

From VC-MP Wiki

Jump to: navigation, search

Syntax

GetWeaponSync( ID )

Arguments

  • ID - The ID of the weapon's in the game.

Example

You can check whether the weapon is turned on sync or not. For example: !checkwep Minigun

function onPlayerCommand( player, cmd, text )
{
	if ( cmd == "checkwep" )
	{
local wepid = GetWeaponID( text );
if ( GetWeaponSync( wepid ) ) Message( "Synchronization:[ " + GetWeaponName( wepid ) + " ] is:[ Enabled ]" );
else Message( "Synchronization:[ " + GetWeaponName( wepid ) + " ] is:[ Disabled ]" );
     }
}
Personal tools
squirrel scripting