Job capacity
#7

i'de probably do it more like this, although i havnt tested it yet, so you will have to let me know if its not working right

pawn Код:
new TotalGrass[MAX_PLAYERS];


public OnPlayerEnterRaceCheckpoint(playerid)
{
    new vehicleid = GetPlayerVehicleID(playerid);

    if (GetVehicleModel(vehicleid) == 572)
    {
        if (PlayerToPoint(4, playerid, 779.9626, -1259.1793, 13.5719))
        {
            TotalGrass[playerid] += 5;
            new NeededGrass = 200-TotalGrass[playerid];
            new gString[80];
           
            format(gString, sizeof(gString),"(5 GRASS COLLECTED) You Have A Total Of %i Grass, You Still Need %i More.",TotalGrass,NeededGrass);
            SendClientMessage(playerid,0xBBFFFFFF,gString);
            PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
           
            SendClientMessage(playerid, 0xBBFFFFFF, "You Have Arived At Checkpoint One! Head To The Next Checkpoint!");
            SetPlayerRaceCheckpoint(playerid, 2, X, Y, Z, 0, 0, 0, 6.0);// Set the X, Y, Z
        }
        else if (PlayerToPoint(4, playerid, X, Y, Z))// Set the X, Y, Z
        {
            TotalGrass[playerid] += 5;
            new NeededGrass = 200-TotalGrass[playerid];
            new gString[80];

            format(gString, sizeof(gString),"(5 GRASS COLLECTED) You Have A Total Of %i Grass, You Still Need %i More.",TotalGrass,NeededGrass);
            SendClientMessage(playerid,0xBBFFFFFF,gString);
            PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);

            SendClientMessage(playerid, 0xBBFFFFFF, "You Have Arived At Checkpoint Two! Head To The Next Checkpoint!");
            SetPlayerRaceCheckpoint(playerid, 2, X, Y, Z, 0, 0, 0, 6.0);// Set the X, Y, Z
        }
        return 1;
    }
    return 1;
}
Reply


Messages In This Thread
Job capacity - by Shinzei_Banzai - 07.07.2009, 18:35
Re: Job capacity - by refshal - 07.07.2009, 20:02
Re: Job capacity - by Shinzei_Banzai - 07.07.2009, 20:09
Re: Job capacity - by refshal - 07.07.2009, 20:16
Re: Job capacity - by Shinzei_Banzai - 07.07.2009, 21:02
Re: Job capacity - by refshal - 07.07.2009, 21:30
Re: Job capacity - by happyface - 07.07.2009, 22:20
Re: Job capacity - by refshal - 08.07.2009, 07:53

Forum Jump:


Users browsing this thread: 1 Guest(s)