SetPlayerDisabledWeapons

From SA-MP Wiki

Jump to: navigation, search


Description:

Forbids weapons to a specific player - if a player holds them, they aren't synced to other players.


Warning: This function doesn't work. At all.
Alternatively you can return 0 in OnPlayerUpdate if they use a bad weapon, and change their weapon.

Parameters:
(playerid, ...)
playeridID of the player
...The IDs of the weapons to be disabled.


Return Values:

This function does not return any specific values.


Example Usage:

// Disables Flamethrower, Minigun, Rocket Launcher and Heatseeking RPG.
SetPlayerDisabledWeapons( playerid, 35, 36, 37, 38 );

To re-sync certain weapons, you can just call SetPlayerDisabledWeapons again

// Disables Flamethrower, Rocket Launcher and Heatseeking RPG. 
// Miniguns are now synched if the player holds them.
SetPlayerDisabledWeapons( playerid, 35, 36, 37 );
Personal tools
Navigation
Toolbox