How to add more jobs: Help
#1

Код:
[pawn] public OnPlayerCommandText(playerid, cmdtext[])
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/courier", cmdtext, true, 10) == 0)
    {
        if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 499)
        {
            JobStatus[playerid] = 1;
            TruckingJob[playerid] = 1;
            SetPlayerCheckpoint(playerid,1110.5992,-1327.9216,13.7145,10);
            new name[MAX_PLAYER_NAME], string[48];
            GetPlayerName(playerid, name, sizeof(name));
            format(string, sizeof(string), "* %s is now a Courier.", name );
            SendClientMessageToAll(COLOR_YELLOW, string);

            return 1;
        }
        SendClientMessage(playerid, COLOR_RED,"You have to be in a courier truck to start the job");
    }
    return 0;
}
public OnPlayerEnterCheckpoint(playerid)
{
     if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 499)
     {
        if(JobStatus[playerid] == 1){
        JobStatus[playerid] = 2;
        SetPlayerCheckpoint(playerid,2452.3928,-2570.7349,14.0369,10);
        SendClientMessage(playerid,COLOR_YELLOW,"* Please go to the next mark, and you'll be payed!");

         }else{
            JobStatus[playerid] = 1;
            GivePlayerMoney(playerid,400);
            SendClientMessage(playerid,COLOR_YELLOW,"* You have finished the job!");
            TruckingJob[playerid] = 0;
            DisablePlayerCheckpoint(playerid);
         }
     }
} [pawn/]
I was just wondering if anyone could tell me how to add another job to the OnPlayerEnterCheckpoint and OnplayerCommandText callbacks, please help... I have been trying to do this all night and I keep having the same problem, much appreciated!!

Thanks in advance Bigal!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)