Quote:
Originally Posted by The__
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.
|
BTW i have a code Unload Truck
Код:
new Float:TruckingUnload[][3] =
{
{-64.7117,-1133.9790,1.0781},
{-19.0223,-278.8979,5.4297},
{1336.4464,289.4808,19.5615}
};
if they take any effect?