16.04.2015, 03:53
Okay, this is what I've done in the past.
some where:
onplayer connect reset them:
Your checkpoint for unloading change too:
Might work, could try it, dunno.
some where:
pawn Код:
new TruckLoadX[MAX_PLAYERS];
new TruckLoadY[MAX_PLAYERS];
new TruckLoadZ[MAX_PLAYERS];
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;
}
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.