if(GetvehicleModel(...... 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: if(GetvehicleModel(...... Help...? (
/showthread.php?tid=276007)
How to add multiple ids to if(GetVehicleModel... Help?! -
BigAl - 12.08.2011
Код:
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 514) return SendClientMessage(playerid, COLOR_RED, "Sorry, but you need to get into a tanker!");
I was just wondering if anyone knew how I could add multiple ids to that, so to type /work you have to be in one of the trucks, 403, 514, and 515... I was just wondering how I could do this, or is it not possible?
Thanks, BigAl
Re: if(GetvehicleModel(...... Help...? -
Amel_PAtomAXx - 12.08.2011
pawn Код:
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 514)
{
// your core
}
else
{
SendClientMessage(playerid, COLOR_RED, "Sorry, but you need to get into a tanker!");
return 1;
}
Re: if(GetvehicleModel(...... Help...? -
Admigo - 12.08.2011
Код:
if(!GetVehicleModel(GetPlayerVehicleID(playerid)) == 514) return SendClientMessage(playerid, COLOR_RED, "Sorry, but you need to get into a tanker!");
Re: if(GetvehicleModel(...... Help...? -
BigAl - 12.08.2011
Thanks guys
Re: if(GetvehicleModel(...... Help...? -
=WoR=Varth - 12.08.2011
I don't see any of them answer your question.
pawn Код:
new vid = GetVehicleModel(GetPlayerVehicleID(playerid));
if(vid == 403 || vid == 514 || vid == 515)
{
//If player in the right vehicle
}
else SendClientMessage(playerid, COLOR_RED, "Sorry, but you need to get into a tanker!");
return 1;