SetDisabledWeapons
From SA-MP Wiki
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.
(...)
... | 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.
- SetPlayerDisabledWeapons: Set disabled weapons for a player.