SA-MP Forums Archive
car prevention help - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: car prevention help (/showthread.php?tid=66745)



car prevention help - CJ101 - 24.02.2009

ok im trying to prevent people from getting in cars unless there a cop,army,or fbi skin.
but, it just lets them in anyway.

Код:
if(GetVehicleModel(vehicleid) == 597)
{
if(GetPlayerSkin(playerid) == 285 || 165 || 287 || 283 || 163)
{
// You are a cop, no action needed.
}
else
{
SendClientMessage(playerid, COLOR_YELLOW, "== You are not law enforcement!");
RemovePlayerFromVehicle(playerid);
}

}



Re: car prevention help - ICECOLDKILLAK8 - 24.02.2009

pawn Код:
new skin;
skin = GetPlayerSkin(playerid);
if(GetVehicleModel(vehicleid) == 597)
{
if(skin != 285 || skin != 165 || skin != 287 || skin != 283 || skin != 163)
{
SendClientMessage(playerid, COLOR_YELLOW, "== You are not law enforcement!");
RemovePlayerFromVehicle(playerid);
}
}



Re: car prevention help - CJ101 - 24.02.2009

cool. thks.


Re: car prevention help - ICECOLDKILLAK8 - 24.02.2009

np :P