SetDisabledWeapons

From SA-MP Wiki

Jump to: navigation, search


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

Warning

This function was removed in SA-MP 0.3. Alternatively you can return 0 in OnPlayerUpdate if they use a bad weapon, and change their weapon.


Description:

Forbids weapons.


Parameters:
(...)
...IDs of weapons to be disabled

Return Values:

This function does not return any specific values.


Usage Examples

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

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

// Disables Flamethrower, Rocket Launcher and Heatseeking RPG. 
// Miniguns are now synched if the player holds them.
SetDisabledWeapons( 35, 36, 37 );


Related Functions

The following functions may be useful, as they are related to this function in one way or another.

Personal tools
Navigation
Toolbox