HELP: case problem
#4

it should be like this:
pawn Код:
public OnPlayerEnterCheckpoint(playerid)
{
    new newcar = GetPlayerVehicleID(playerid);
    switch (gPlayerCheckpointStatus[playerid])
    {
        case CHECKPOINT_PROD1:
        {
            if(newcar >= 108 && newcar <= 111 && IsTrailerAttachedToVehicle(newcar))
            //if(IsTrailerAttachedToVehicle(newcar) && GetVehicleTrailer(newcar) == >= 108 &&  <= 111)
            {
                DisablePlayerCheckpoint(playerid);
                PlayerPlaySound(playerid, 1059, 0.0, 0.0, 0.0);
                TogglePlayerControllable(playerid,false);
                GameTextForPlayer(playerid,"~w~~n~~n~~n~~n~~n~~n~~n~~n~~n~obtaining the package, please wait",4000,3);
                SetTimerEx("Product1", 3000, false, "i", playerid);
            }
            else
            {
                SendClientMessage(playerid,COLOR_YELLOW,"You are not inside a Truck with a Trailer.");
            }
        }
        case CHECKPOINT_PROD2:
        {
            if(newcar >= 108 && newcar <= 111 && IsTrailerAttachedToVehicle(newcar))
            {
                DisablePlayerCheckpoint(playerid);
                TogglePlayerControllable(playerid,false);
                GameTextForPlayer(playerid,"~w~~n~~n~~n~~n~~n~~n~~n~~n~~n~Delivering the package, please wait",4000,3);
                SetTimerEx("Product2", 2000, false, "i", playerid);
            }
            else
            {
                SendClientMessage(playerid,COLOR_YELLOW,"You are not inside a Truck with a Trailer.");
            }
        }
        }
    return 1;
}
Reply


Messages In This Thread
HELP: case problem - by Jimbo01 - 28.05.2012, 13:11
Re: HELP: case problem - by Kirollos - 28.05.2012, 13:15
AW: HELP: case problem - by Jimbo01 - 28.05.2012, 13:18
Re: HELP: case problem - by Kirollos - 28.05.2012, 13:20

Forum Jump:


Users browsing this thread: 1 Guest(s)