19.12.2010, 15:05
Untested.
Add weapons to the weaponExceptions array, the example blocks drivers/passengers from using deagles, combat shotguns and MP5s, you can change it and add more weapons by adding a number then adding a comma afterwards.
pawn Code:
new weaponExceptions[] =
{24, 27, 29};
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(newstate == PLAYER_STATE_PASSENGER || newstate == PLAYER_STATE_DRIVER) {
for(new i = 0; i < sizeof(weaponExceptions); i++) {
if(GetPlayerWeapon(playerid) == weaponExceptions[i]) SetPlayerArmedWeapon(playerid, 0);
}
}
return 1;
}

