04.09.2009, 22:45
SetPlayerDisableWeapons or SetDisableWeapons does not work
Originally Posted by https://sampwiki.blast.hk/wiki/SetDisabledWeapons
Warning: This function is removed in SA-MP 0.3. Alternatively you can return 0 in OnPlayerUpdate if they use a bad weapon, and change their weapon.
|
#define DISABLED_WEAPONS 35, 36, 37, 38
public OnPlayerUpdate(playerid)
{
#if defined DISABLED_WEAPONS
new weapon = GetPlayerWeapon(playerid);
switch(weapon)
{
case DISABLED_WEAPONS:
{
GivePlayerWeapon(playerid, weapon, -GetPlayerAmmo(playerid));
return 0;
}
}
#endif
return 1;
}