if(GetvehicleModel(...... Help...?
#1

Код:
 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
Reply
#2

pawn Код:
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 514)
{
    // your core
}
else
{
    SendClientMessage(playerid, COLOR_RED, "Sorry, but you need to get into a tanker!");
    return 1;
}
Reply
#3

Код:
 if(!GetVehicleModel(GetPlayerVehicleID(playerid)) == 514) return SendClientMessage(playerid, COLOR_RED, "Sorry, but you need to get into a tanker!");
Reply
#4

Thanks guys
Reply
#5

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;
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)