Truck Unloading Help
#4

Okay, this is what I've done in the past.

some where:
pawn Код:
new TruckLoadX[MAX_PLAYERS];
new TruckLoadY[MAX_PLAYERS];
new TruckLoadZ[MAX_PLAYERS];
onplayer connect reset them:
pawn Код:
TruckLoadX[playerid] = 0;
TruckLoadY[playerid] = 0;
TruckLoadZ[playerid] = 0;
pawn Код:
public LoadMats(playerid)
{
    new rand = random(sizeof(TruckingUnload));
    TruckLoadX[playerid] = TruckingUnload[rand][0];
    TruckLoadY[playerid] = TruckingUnload[rand][1];
    TruckLoadZ[playerid] = TruckingUnload[rand][2];
    SetPlayerCheckpoint(playerid, TruckLoadX[playerid],TruckLoadY[playerid],TruckLoadX[playerid], 7.0);
    SendClientMessage(playerid, COLOR_ORANGE, "INFO: {FFFFFF}Pergilah ke checkpoint yang berada di map");
    TogglePlayerControllable(playerid, 0);
    return 1;
}
Your checkpoint for unloading change too:
pawn Код:
if(IsPlayerInRangeOfPoint(playerid, 7.0, TruckLoadX[playerid],TruckLoadY[playerid],TruckLoadZ[playerid]))
{
    if(work[playerid] == 1)
    {
        GivePlayerMoney(playerid, 4000);
        SendClientMessage(playerid, COLOR_ORANGE, "INFO: {FFFFFF}you have passed trucking job and get reward $4.000");
        DisablePlayerCheckpoint(playerid);
        Work[playerid] = 0;
        return 1;
    }
}

Might work, could try it, dunno.
Reply


Messages In This Thread
Truck Unloading Help - by Genmetal - 16.04.2015, 00:23
Re: Truck Unloading Help - by The__ - 16.04.2015, 03:40
Re: Truck Unloading Help - by Genmetal - 16.04.2015, 03:44
Re: Truck Unloading Help - by The__ - 16.04.2015, 03:53
Re: Truck Unloading Help - by Genmetal - 16.04.2015, 04:05
Re: Truck Unloading Help - by Genmetal - 17.04.2015, 11:58

Forum Jump:


Users browsing this thread: 1 Guest(s)