Dio skripte: Ovo je gdje igrac izabere u dialogu koliko ce minuta.
if(dialogid == DIALOG_RENT)
{
if(!response) { return 1; }
if(response)
{
if(listitem == 0)
{
new sstring,sstrall;
format(sstrall, sizeof(sstrall), "CIJENA RENTA:180.din");
PlayerTextDrawSetString(playerid, RentTD, sstrall);
format(sstring, sizeof(sstring), "RENT MINUTA:5");
PlayerTextDrawSetString(playerid, RentTD, sstring);
PlayerInfo = 1;
PlayerInfo = 1;
PlayerInfo = 0;
PlayerInfo = 0;
PlayerInfo = 0;
PlayerInfo = 0;
PlayerInfo = 0;
}
if(listitem == 1)
{
new sstring2,sstrall2;
format(sstrall2, sizeof(sstrall2), "CIJENA RENTA:360.din");
PlayerTextDrawSetString(playerid, RentTD, sstrall2);
format(sstring2, sizeof(sstring2), "RENT MINUTA:10");
PlayerTextDrawSetString(playerid, RentTD, sstring2);
PlayerInfo = 1;
PlayerInfo = 0;
PlayerInfo = 1;
PlayerInfo = 0;
PlayerInfo = 0;
PlayerInfo = 0;
PlayerInfo = 0;
}
if(listitem == 2)
{
new sstring3,sstrall3;
format(sstrall3, sizeof(sstrall3), "CIJENA RENTA:500.din");
PlayerTextDrawSetString(playerid, RentTD, sstrall3);
format(sstring3, sizeof(sstring3), "RENT MINUTA:15");
PlayerTextDrawSetString(playerid, RentTD, sstring3);
PlayerInfo = 1;
PlayerInfo = 0;
PlayerInfo = 0;
PlayerInfo = 1;
PlayerInfo = 0;
PlayerInfo = 0;
PlayerInfo = 0;
}
if(listitem == 3)
{
new sstring4,sstrall4;
format(sstrall4, sizeof(sstrall4), "CIJENA RENTA:750.din");
PlayerTextDrawSetString(playerid, RentTD, sstrall4);
format(sstring4, sizeof(sstring4), "RENT MINUTA:30");
PlayerTextDrawSetString(playerid, RentTD, sstring4);
PlayerInfo = 1;
PlayerInfo = 0;
PlayerInfo = 0;
PlayerInfo = 0;
PlayerInfo = 1;
PlayerInfo = 0;
PlayerInfo = 0;
}
if(listitem == 4)
{
new sstring5,sstrall5;
format(sstrall5, sizeof(sstrall5), "CIJENA RENTA:880.din");
PlayerTextDrawSetString(playerid, RentTD, sstrall5);
format(sstring5, sizeof(sstring5), "RENT MINUTA:45");
PlayerTextDrawSetString(playerid, RentTD, sstring5);
PlayerInfo = 1;
PlayerInfo = 0;
PlayerInfo = 0;
PlayerInfo = 0;
PlayerInfo = 0;
PlayerInfo = 1;
PlayerInfo = 0;
}
if(listitem == 5)
{
new sstring6,sstrall6;
format(sstrall6, sizeof(sstrall6), "CIJENA RENTA:1000.din");
PlayerTextDrawSetString(playerid, RentTD, sstrall6);
format(sstring6, sizeof(sstring6), "RENT MINUTA:60");
PlayerTextDrawSetString(playerid, RentTD, sstring6);
PlayerInfo = 1;
PlayerInfo = 0;
PlayerInfo = 0;
PlayerInfo = 0;
PlayerInfo = 0;
PlayerInfo = 0;
PlayerInfo = 1;
}
}
}rOvo je gdje igrac kada pritisne rentaj,njemu renta vozilo.
if(playertextid == RentTD)
{
if(PlayerInfo < 1) return SendClientMessage(playerid,-1,"Nisi izabrao koliko ces rentati!");
if(PlayerInfo < 1)
{
if(GetPlayerMoney(playerid) < 180) return SendClientMessage(playerid,-1,"Nemate dovoljno novca,potrebno vam je 180. dinara");
NovacMinus(playerid,180);
SendClientMessage(playerid,-1,"Rentao si vozilo na 5. minuta, ukoliko zelis unrentovat ukucaj /unrent");
TogglePlayerControllable(playerid, 1);
Rent = GetPlayerVehicleID(playerid);
RentVrijeme = 300;
RentTimer = SetTimer("UpdateTime", 1000, 1);
PlayerTextDrawHide(playerid, RentTD);
PlayerTextDrawHide(playerid, RentTD);
PlayerTextDrawHide(playerid, RentTD);
PlayerTextDrawHide(playerid, RentTD);
PlayerTextDrawHide(playerid, RentTD);
PlayerTextDrawHide(playerid, RentTD);
PlayerTextDrawHide(playerid, RentTD);
PlayerTextDrawHide(playerid, RentTD);
PlayerTextDrawHide(playerid, RentTD);
PlayerTextDrawHide(playerid, RentTD);
PlayerTextDrawHide(playerid, RentTD);
PlayerTextDrawHide(playerid, RentTD);
PlayerTextDrawHide(playerid, RentTD);
new stringg5,strallg5;
format(strallg5, sizeof(strallg5), "CIJENA RENTA:");
PlayerTextDrawSetString(playerid, RentTD, strallg5);
format(stringg5, sizeof(stringg5), "RENT MINUTA:");
PlayerTextDrawSetString(playerid, RentTD, stringg5);
return 1;
}
if(PlayerInfo < 1)
{
if(GetPlayerMoney(playerid) < 360) return SendClientMessage(playerid,-1,"Nemate dovoljno novca,potrebno vam je 360. dinara");
NovacMinus(playerid,360);
SendClientMessage(playerid,-1,"Rentao si vozilo na 10. minuta, ukoliko zelis unrentovat ukucaj /unrent");
TogglePlayerControllable(playerid, 1);
Rent = GetPlayerVehicleID(playerid);
RentVrijeme = 600;
RentTimer = SetTimer("UpdateTime", 1000, 1);
PlayerTextDrawHide(playerid, RentTD);
PlayerTextDrawHide(playerid, RentTD);
PlayerTextDrawHide(playerid, RentTD);
PlayerTextDrawHide(playerid, RentTD);
PlayerTextDrawHide(playerid, RentTD);
PlayerTextDrawHide(playerid, RentTD);
PlayerTextDrawHide(playerid, RentTD);
PlayerTextDrawHide(playerid, RentTD);
PlayerTextDrawHide(playerid, RentTD);
PlayerTextDrawHide(playerid, RentTD);
PlayerTextDrawHide(playerid, RentTD);
PlayerTextDrawHide(playerid, RentTD);
PlayerTextDrawHide(playerid, RentTD);
new string5s,strall5a;
format(strall5a, sizeof(strall5a), "CIJENA RENTA:");
PlayerTextDrawSetString(playerid, RentTD, strall5a);
format(string5s, sizeof(string5s), "RENT MINUTA:");
PlayerTextDrawSetString(playerid, RentTD, string5s);
return 1;
}
if(PlayerInfo < 1)
{
if(GetPlayerMoney(playerid) < 500) return SendClientMessage(playerid,-1,"Nemate dovoljno novca,potrebno vam je 500. dinara");
NovacMinus(playerid,500);
SendClientMessage(playerid,-1,"Rentao si vozilo na 15. minuta, ukoliko zelis unrentovat ukucaj /unrent");
TogglePlayerControllable(playerid, 1);
Rent = GetPlayerVehicleID(playerid);
RentVrijeme = 900;
RentTimer = SetTimer("UpdateTime", 1000, 1);
PlayerTextDrawHide(playerid, RentTD);
PlayerTextDrawHide(playerid, RentTD);
PlayerTextDrawHide(playerid, RentTD);
PlayerTextDrawHide(playerid, RentTD);
PlayerTextDrawHide(playerid, RentTD);
PlayerTextDrawHide(playerid, RentTD);
PlayerTextDrawHide(playerid, RentTD);
PlayerTextDrawHide(playerid, RentTD);
PlayerTextDrawHide(playerid, RentTD);
PlayerTextDrawHide(playerid, RentTD);
PlayerTextDrawHide(playerid, RentTD);
PlayerTextDrawHide(playerid, RentTD);
PlayerTextDrawHide(playerid, RentTD);
new tstring5,estrall5;
format(estrall5, sizeof(estrall5), "CIJENA RENTA:");
PlayerTextDrawSetString(playerid, RentTD, estrall5);
format(tstring5, sizeof(tstring5), "RENT MINUTA:");
PlayerTextDrawSetString(playerid, RentTD, tstring5);
return 1;
}
if(PlayerInfo < 1)
{
if(GetPlayerMoney(playerid) < 750) return SendClientMessage(playerid,-1,"Nemate dovoljno novca,potrebno vam je 750. dinara");
NovacMinus(playerid,750);
SendClientMessage(playerid,-1,"Rentao si vozilo na 30. minuta, ukoliko zelis unrentovat ukucaj /unrent");
TogglePlayerControllable(playerid, 1);
Rent = GetPlayerVehicleID(playerid);
RentVrijeme = 1800;
RentTimer = SetTimer("UpdateTime", 1000, 1);
PlayerTextDrawHide(playerid, RentTD);
PlayerTextDrawHide(playerid, RentTD);
PlayerTextDrawHide(playerid, RentTD);
PlayerTextDrawHide(playerid, RentTD);
PlayerTextDrawHide(playerid, RentTD);
PlayerTextDrawHide(playerid, RentTD);
PlayerTextDrawHide(playerid, RentTD);
PlayerTextDrawHide(playerid, RentTD);
PlayerTextDrawHide(playerid, RentTD);
PlayerTextDrawHide(playerid, RentTD);
PlayerTextDrawHide(playerid, RentTD);
PlayerTextDrawHide(playerid, RentTD);
PlayerTextDrawHide(playerid, RentTD);
new sttring5,sttrall5;
format(sttrall5, sizeof(sttrall5), "CIJENA RENTA:");
PlayerTextDrawSetString(playerid, RentTD, sttrall5);
format(sttring5, sizeof(sttring5), "RENT MINUTA:");
PlayerTextDrawSetString(playerid, RentTD, sttring5);
return 1;
}
if(PlayerInfo < 1)
{
if(GetPlayerMoney(playerid) < 880) return SendClientMessage(playerid,-1,"Nemate dovoljno novca,potrebno vam je 880. dinara");
NovacMinus(playerid,880);
SendClientMessage(playerid,-1,"Rentao si vozilo na 45. minuta, ukoliko zelis unrentovat ukucaj /unrent");
TogglePlayerControllable(playerid, 1);
Rent = GetPlayerVehicleID(playerid);
RentVrijeme = 2700;
RentTimer = SetTimer("UpdateTime", 1000, 1);
PlayerTextDrawHide(playerid, RentTD);
PlayerTextDrawHide(playerid, RentTD);
PlayerTextDrawHide(playerid, RentTD);
PlayerTextDrawHide(playerid, RentTD);
PlayerTextDrawHide(playerid, RentTD);
PlayerTextDrawHide(playerid, RentTD);
PlayerTextDrawHide(playerid, RentTD);
PlayerTextDrawHide(playerid, RentTD);
PlayerTextDrawHide(playerid, RentTD);
PlayerTextDrawHide(playerid, RentTD);
PlayerTextDrawHide(playerid, RentTD);
PlayerTextDrawHide(playerid, RentTD);
PlayerTextDrawHide(playerid, RentTD);
new strinng5,straall5;
format(straall5, sizeof(straall5), "CIJENA RENTA:");
PlayerTextDrawSetString(playerid, RentTD, straall5);
format(strinng5, sizeof(strinng5), "RENT MINUTA:");
PlayerTextDrawSetString(playerid, RentTD, strinng5);
return 1;
}
if(PlayerInfo < 1)
{
if(GetPlayerMoney(playerid) < 1000) return SendClientMessage(playerid,-1,"Nemate dovoljno novca,potrebno vam je 1000. dinara");
NovacMinus(playerid,1000);
SendClientMessage(playerid,-1,"Rentao si vozilo na 60. minuta, ukoliko zelis unrentovat ukucaj /unrent");
TogglePlayerControllable(playerid, 1);
Rent = GetPlayerVehicleID(playerid);
RentVrijeme = 3600;
RentTimer = SetTimer("UpdateTime", 1000, 1);
PlayerTextDrawHide(playerid, RentTD);
PlayerTextDrawHide(playerid, RentTD);
PlayerTextDrawHide(playerid, RentTD);
PlayerTextDrawHide(playerid, RentTD);
PlayerTextDrawHide(playerid, RentTD);
PlayerTextDrawHide(playerid, RentTD);
PlayerTextDrawHide(playerid, RentTD);
PlayerTextDrawHide(playerid, RentTD);
PlayerTextDrawHide(playerid, RentTD);
PlayerTextDrawHide(playerid, RentTD);
PlayerTextDrawHide(playerid, RentTD);
PlayerTextDrawHide(playerid, RentTD);
PlayerTextDrawHide(playerid, RentTD);
new string555,strall555;
format(strall555, sizeof(strall555), "CIJENA RENTA:");
PlayerTextDrawSetString(playerid, RentTD, strall555);
format(string555, sizeof(string555), "RENT MINUTA:");
PlayerTextDrawSetString(playerid, RentTD, string555);
SavePlayer(playerid);
return 1;
}
}Debug iz server_log(ukoliko je u pitanju crashanje servera - crashdetect log): [ code ]vaš odgovor[ /code ]
Slika/video ingame problema(obavezno ako je ingame problem): link slike
