Drive by help - limiting weapons - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Drive by help - limiting weapons (
/showthread.php?tid=313027)
Drive by help - limiting weapons -
ShawnMiller1337 - 24.01.2012
How would I limit weapons that can be used by doing a drive by with a vehicle
Re: Drive by help - limiting weapons -
[ABK]Antonio - 24.01.2012
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(newstate = PLAYER_STATE_PASSENGER)
{
switch(GetPlayerWeapon(playerid))
{
case 24: SetPlayerArmedWeapon(playerid, 0);
//like that basically, using case <weaponid>:
case 0..24: SetPlayerArmedWeapon(playerid, 0);
//that's every id from 0 to 24 (example)
}
}
return 1
}