Detaljan opis problema: Ovako pravio sam rezerve goriva na pumpama i sad,ja hocu da to ide na sve 5 pumpe posebno, odvezes turu na jednu pumpu i ona naprimer ima u rezervi 10l i kad oteram napuni 20l a sad za drugu pumpu ona 30l i odnesem ima 40l a ne ovako kao sto sam pravio kad oteram turu na sve pumpe ide isto.
Dio skripte:
/////////////////////////////////////////////VOZAC GORIVA////////////////////////////////////////////////
if(CP ==1600 && IsAGorivo(carid)&& IsTrailerAttachedToVehicle(carid)) { CP = 1601; TogglePlayerControllable(playerid, 0); Gorivo12 = 1; GameTextForPlayer(playerid, "~b~Sacekaj da se gorivo~n~~g~istoci", 3000, 4);TogglePlayerControllable(playerid, 0); SetTimerEx("Gorivo2",13000, false, "i", playerid); DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid, 1937.2955,-1776.0560,13.3828,10.0); }
else if(CP == 1601 && IsAGorivo(carid)&& IsTrailerAttachedToVehicle(carid)) { CP = 1602; TogglePlayerControllable(playerid, 0); Gorivo12 = 1; GameTextForPlayer(playerid, "~b~Sacekaj da se gorivo~n~~g~istoci", 3000, 4);TogglePlayerControllable(playerid, 0); SetTimerEx("Gorivo2",13000, false, "i", playerid); DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid, 1004.9973,-940.4534,42.1797,10.0); }
else if(CP == 1602 && IsAGorivo(carid)&& IsTrailerAttachedToVehicle(carid)) { CP = 1603; TogglePlayerControllable(playerid, 0); Gorivo12 = 1; GameTextForPlayer(playerid, "~b~Sacekaj da se gorivo~n~~g~istoci", 3000, 4);TogglePlayerControllable(playerid, 0); SetTimerEx("Gorivo2",13000, false, "i", playerid); DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid, 651.6285,-564.7838,16.3301,10.0); }
else if(CP == 1603 && IsAGorivo(carid)&& IsTrailerAttachedToVehicle(carid)) { CP = 1604; TogglePlayerControllable(playerid, 0); Gorivo12 = 1; GameTextForPlayer(playerid, "~b~Sacekaj da se gorivo~n~~g~istoci", 3000, 4);TogglePlayerControllable(playerid, 0); SetTimerEx("Gorivo2",13000, false, "i", playerid); DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid, 1380.9648,456.1190,19.8869,10.0); }
else if(CP == 1604 && IsAGorivo(carid)&& IsTrailerAttachedToVehicle(carid)) { CP = 1605; TogglePlayerControllable(playerid, 0); Gorivo12 = 1; GameTextForPlayer(playerid, "~b~Sacekaj da se gorivo~n~~g~istoci", 3000, 4);TogglePlayerControllable(playerid, 0); SetTimerEx("Gorivo2",13000, false, "i", playerid); DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid, -98.0867,-1167.2094,2.5977,10.0); }
else if(CP == 1605 && IsAGorivo(carid)&& IsTrailerAttachedToVehicle(carid)) { CP = 1606; TogglePlayerControllable(playerid, 0); Gorivo12 = 1; GameTextForPlayer(playerid, "~b~Sacekaj da se gorivo~n~~g~istoci", 3000, 4);TogglePlayerControllable(playerid, 0); SetTimerEx("Gorivo2",13000, false, "i", playerid); DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid, 2430.8547,-2113.4102,13.5469,10.0); }
else if(CP == 1606 && IsAGorivo(carid)&& IsTrailerAttachedToVehicle(carid)) { CP = 1607; TogglePlayerControllable(playerid, 0); Gorivo12 = 1; GameTextForPlayer(playerid, "~r~Zavrsili ste ~n~~g~posao", 3000, 4);TogglePlayerControllable(playerid, 0); SetTimerEx("Gorivo2",13000, false, "i", playerid); DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid, 2509,-2089,13.54,10.0); }
if(CP == 1607 && IsAGorivo(carid)&& IsTrailerAttachedToVehicle(carid))
{
new randpay = 1750 + random(165);
PlayerInfo += randpay;
TogglePlayerControllable(playerid, 1);
DisablePlayerCheckpoint(playerid);
SendClientMessage(playerid, 0x8D531AFF, "-----------");
format(string, sizeof(string), "Zarada: %d$.", randpay);
SendClientMessage(playerid, 0x9A6735FF, string);
SendClientMessage(playerid, 0xB89571FF, "-----------");
new random;
random = 10 + (0);
gorivonapumpi += random;
GorivoNaPumpi();
SBizzInfo += 500;
ExtortionSBiz(3, 500);
SBizzInfo--;
Gorivo12 = 1;
PlayerInfo = 0;
new taj = GetVehicleTrailer(carid);
SetVehicleToRespawn(taj);
}forward GorivonaPumpi();
public GorivoNaPumpi()
{
new strFromFile, arrCoords, File: file = fopen("Podesavanje/Gorivonapumpi/Gorivonapumpi.txt", io_read);
if (file)
{
fread(file, strFromFile);
razdvoji(strFromFile, arrCoords, ',');
gorivonapumpi = strval (arrCoords);
fclose(file);
}
return 1;
}
forward KolicinaGorivaPumpa();
public KolicinaGorivaPumpa()
{
new coordstring;
format(coordstring, sizeof(coordstring), "%d", gorivonapumpi);
new File: file = fopen("Podesavanje/Gorivonapumpi/Gorivonapumpi.txt", io_write);
fwrite(file, coordstring);
fclose(file);
new stringa;
Delete3DTextLabel(GorivoPumpaLabel);
format( stringa,sizeof(stringa),"{00CCFF}Benzisnka pumpa rezervoar:\n{FFFFFF}%d Litara ",gorivonapumpi);
(GorivoPumpaLabel) = Create3DTextLabel(stringa,0x00C3FFFF,211.0494,1874.8359,-25.0267,80.0,0);
return 1;
}new gorivonapumpi = 10000;
new gorviostrin;
format(gorivostring,256,"{00CCFF}Benzinska pumpa rezervoar:\n{FFFFFF}%d Litara",gorivonapumpi);
GorvioPumpaLabel = Create3DTextLabel(avlstring,0x00C3FFFF,211.0494,1874.8359,-25.0267,80.0,0);