Help with code, why do i get these errors?
#4

Try this:

pawn Код:
public OnPlayerEnterCheckpoint(playerid)
{
    new vehicleid = GetPlayerVehicleID(playerid);
    if(IsPlayerInVehicle(playerid,vehicleid) && IsTrailerAttachedToVehicle(vehicleid))
    {

            SendClientMessage(playerid, 0xAFAFAFAA, "Congratulations!");
            GivePlayerMoney(playerid, 5000);
            DisablePlayerCheckpoint(playerid);
    }
    else
    {
            SendClientMessage(playerid, 0xAFAFAFAA, "You need a trailer.");
            DisablePlayerCheckpoint(playerid);
    }
    return 1;
}
This way the player has to be in the specified vehicle AND have the trailer attached.

Compiles with no errors
Reply


Messages In This Thread
Help with code, why do i get these errors? - by Bofhead - 20.06.2009, 08:39
Re: Help with code, why do i get these errors? - by MenaceX^ - 20.06.2009, 08:44
Re: Help with code, why do i get these errors? - by AiVAMAN - 20.06.2009, 09:10
Re: Help with code, why do i get these errors? - by Yuryfury - 25.06.2009, 15:00

Forum Jump:


Users browsing this thread: 2 Guest(s)