Checkpoint after checkpoint - Please help if you can
#6

pawn Код:
new Job[256]; //top of the scripts

public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/job", cmdtext, true, 10) == 0)
    {
        Job[playerid] = 1;
        return 1;
    }
    return 0;
}

public OnPlayerEnterCheckpoint(playerid)
{
    if(Job[playerid] == 1)
    {
        Job[playerid] = 2;
        SetPlayerCheckpoint(playerid, X,Y,Z,1); // 2nd checkpoint coordinates
        // rewards for the first checkpoint...
        return 1;
    }
    if(Job[playerid] == 2)
    {
        Job[playerid] = 3;
        SetPlayerCheckpoint(playerid, X,Y,Z,1); // 3rd checkpoint coordinates
        // rewards for the seconds checkpoint...
        return 1;
    }
    // etc.. etc... etc.. etc.. etc.. etc.. etc.. etc..
    return 1;
}
I don't test the code but I think it's like that. (Feel free to correct me).
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)