SetPlayerDisabledWeapons

From SA-MP Wiki

Revision as of 09:16, 27 August 2019; view current revision
←Older revision | Newer revision→
Jump to: navigation, search


Description:

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


Image:32px-Circle-style-warning.png

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