multiple ifs
#1

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


Messages In This Thread
multiple ifs - by shadowdog - 17.01.2011, 18:25
Re: multiple ifs - by Not available - 17.01.2011, 18:28
Re: multiple ifs - by WillyP - 17.01.2011, 18:29
Re: multiple ifs - by jamesbond007 - 17.01.2011, 18:30
Re: multiple ifs - by Mike_Peterson - 17.01.2011, 18:31
Re: multiple ifs - by Not available - 17.01.2011, 18:36
Re: multiple ifs - by shadowdog - 17.01.2011, 18:46
Re: multiple ifs - by Not available - 17.01.2011, 18:59
Re: multiple ifs - by Backwardsman97 - 17.01.2011, 19:06
Re: multiple ifs - by shadowdog - 18.01.2011, 13:25

Forum Jump:


Users browsing this thread: 1 Guest(s)