28.02.2018, 15:25
PHP код:
if(PGarbageCP[playerid] >= 2 && PGarbageCP[playerid] < 7)
{
PGarbageCP[playerid] += 1;
new Float:km = GetPlayerDistanceFromPoint(playerid, DestSet[playerid][0], DestSet[playerid][1], DestSet[playerid][2]);
PGarbageCurrent[playerid] += km;
new Float:coord[3];
GetPlayerPos(playerid, coord[0], coord[1], coord[2]);
SetDestination(playerid, coord[0], coord[1], coord[2]);
new randn = random(sizeof(GarbageCP));
SetPlayerCheckpoint(playerid, GarbageCP[randn][0], GarbageCP[randn][1], GarbageCP[randn]][2], 4.0);
return 1;
}
PHP код:
SetPlayerCheckpoint(playerid, GarbageCP[randn][0], GarbageCP[randn][1], GarbageCP[randn]][2], 4.0);