SetPlayerDisabledWeapons
From SA-MP Wiki
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.
(playerid, ...)
playerid | ID 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 );