job checkpoints
#3

Код:
CMD:startjob(playerid,params[])
{
if(lawnmower[playerid] != 0)
{
SendClientMessage(playerid,0xFFFFFFFF,"You are already on job!");
return 1;
}
SetPlayerCheckpoint(playerid, size,x,y,z);  // first checkpoint
SendClientMessage(playerid,0xFFFFFFFF,"You have started the job, go through the checkpoints to recive the paycheck.");
lawnmower[playerid] = 1;
return 1;
}


public OnPlayerEnterCheckpoint(playerid)
{
        if(lawnmower[playerid] == 1)
        {
        DisablePlayerCheckpoint(playerid);
        SetPlayerCheckpoint(playerid, size,x,y,z); // checkpoint 2
        lawnmower[playerid] += 1;
        }
        if(lawnmower[playerid] == 2) // if the player enters the checkpoint 2
       {
        DisablePlayerCheckpoint(playerid);
        SetPlayerCheckpoint(playerid, size,x,y,z); //checkpoint 3
        lawnmower[playerid] += 1;
        }
        if(lawnmower[playerid] == 3) // if the player enters the checkpoint 3
       {
        DisablePlayerCheckpoint(playerid);
        SetPlayerCheckpoint(playerid, size,x,y,z);
        lawnmower[playerid] += 1;
        }
 //now go on like this till it gets to 10 give him the paycheck and set lawnmower[playerid] back to 0
return 1;
}
EDIT:damn i was little too late
Reply


Messages In This Thread
job checkpoints - by Bek_Loking - 25.06.2014, 19:57
Re: job checkpoints - by VenomMancer - 25.06.2014, 20:28
Re: job checkpoints - by WardenCS - 25.06.2014, 20:31
Re: job checkpoints - by Bek_Loking - 25.06.2014, 21:18
Re: job checkpoints - by Bek_Loking - 25.06.2014, 21:38

Forum Jump:


Users browsing this thread: 1 Guest(s)