17.01.2011, 18:25
How do i make the script check multiple ifs in one checkpoint, it has supposed to be like this:
-must check if theyre driving a roadtrain(515), linerunner(403) or a tanker(514)
-and check if theres a trailer attached
here's the code i used:
please help me
-must check if theyre driving a roadtrain(515), linerunner(403) or a tanker(514)
-and check if theres a trailer attached
here's the code i used:
pawn Код:
public OnPlayerEnterCheckpoint(playerid)
{
if(IsPlayerInVehicle(playerid, 514))//how do i make multiple car ids to check...
if(IsPlayerInVehicle(playerid, 515))//
if(IsPlayerInVehicle(playerid, 403))//
if(IsTrailerAttachedToVehicle(playerid))//... and check if there's a trailer attached...
{ //...all at the same time?
SendClientMessage(playerid, 0x33AA33AA, "Thank you! Here's $1.700!");
GivePlayerMoney(playerid, 1700);
DisablePlayerCheckpoint(playerid);
}else{
SendClientMessage(playerid, 0xAA3333AA, "Hey! Where's your truck?");
return 1;
}
return 1;
}
please help me
![Sad](images/smilies/sad.gif)