Detaljan opis problema: Pa PayDay nekada dodje a nekada ne, ne znam do cega je :/
Dio skripte:
public PayDay()
{
new rent = 0;
new namjernice = 13 + random(75);
new tmpintrate;
Tax += TaxValue;
new string;
new a;
new b;
new c;
new e;
new coordstring;
new coordstring1;
new coordstring2;
new coordstring3;
new coordstring4;
new coordstring5;
new coordstring6;
new coordstring7;
new coordstring8;
new vozilostring;
new nivostring;
new payday;
new isplata;
new account,interest;
for(new playerid = 0; playerid < MAX_PLAYERS; playerid++)
{
if(PlayerInfo >= 0)
{
if(PlayerInfo >= 30)
{
account = PlayerInfo;
PlayerInfo -= TaxValue;
new checks = PlayerInfo / 50;
if(PlayerInfo != 0)
{
if(PlayerInfo == 1) { isplata = 250; }
else if(PlayerInfo == 2) { isplata = 200; }
else if(PlayerInfo == 3) { isplata = 325; }
else if(PlayerInfo == 4) { isplata = 350; }
else if(PlayerInfo == 5) { isplata = 375; }
else if(PlayerInfo == 6) { isplata = 375; }
else if(PlayerInfo == 7) { isplata = 375; }
else if(PlayerInfo == 8) { isplata = 400; }
else if(PlayerInfo == 9) { isplata = 400; }
else if(PlayerInfo == 10) { isplata = 425; }
else if(PlayerInfo == 11) { isplata = 425; }
else if(PlayerInfo == 12) { isplata = 500; }
else if(PlayerInfo == 13) { isplata = 500; }
else if(PlayerInfo == 14) { isplata = 550; }
else if(PlayerInfo == 16) { isplata = 625; }
else if(PlayerInfo == 17) { isplata = 625; }
else if(PlayerInfo == 18) { isplata = 670; }
else if(PlayerInfo == 20) { isplata = 720; }
else if(PlayerInfo == 21) { isplata = 850; }
else if(PlayerInfo == 22) { isplata = 850; }
else if(PlayerInfo == 23) { isplata = 900; }
else if(PlayerInfo == 24) { isplata = 975; }
}
else { isplata = 0; }
PlayerInfo++;
new nxtlevel = PlayerInfo+1;
new expamount = nxtlevel*levelexp;
if(PlayerInfo >= expamount)
{
PlayerInfo = 0;
format(nivostring,sizeof(nivostring),"\n{FFFFFF}Nivo+ | Cestitamo, vas novi nivo je: %d",nxtlevel);
PlayerInfo++;
}
if(MoneyMessage==1)
{
SetTimerEx("TuglPleyerKontrelajbl", 2000, false, "i", playerid);
SendClientMessage(playerid, COLOR_LIGHTRED, "{FF0000}Niste uspjeli da vratite dug, idete u zatvor.");
GameTextForPlayer(playerid, "~r~Uhapsen!", 2000, 1);
new rand = random(sizeof(gRandomJailSpawns));
SetPlayerPos(playerid, gRandomJailSpawns, gRandomJailSpawns, gRandomJailSpawns);
PlayerInfo = 1;
SafeResetPlayerWeapons(playerid);
SafeResetPlayerMoney(playerid);
WantedPoints = 0;
PlayerInfo = 300;
format(string, sizeof(string), "[NL:RP]: {FF0000}Uhapseni ste na {FFFFFF}%d {FF0000}sekundi.", PlayerInfo);
SendClientMessage(playerid, COLOR_WHITE, string);
}
new ebill = (PlayerInfo/10000)*(PlayerInfo);
account += checks;
interest = (PlayerInfo/1000)*(tmpintrate);
PlayerInfo = account+interest;
format(a, sizeof(a), "{B7FF00}Prihodi:\n");
format(b, sizeof(b), " {B7FF00}Osnovica: $%d\n",isplata);
format(c, sizeof(c), " {B7FF00}Zarada: $%d\n",checks);
format(e, sizeof(e), " {B7FF00}Ukupno: $%d\n",isplata + checks);
format(coordstring, sizeof(coordstring), " %s%s%s%s", a,b,c,e);
if(PlayerInfo != 255 || PlayerInfo != 255)
{
format(coordstring1, sizeof(coordstring1), " {48E31C}Racun za struju: {FFFFFF}-$%d\n", ebill);
}
format(coordstring2, sizeof(coordstring2), "\n\n{EA0C0C}Rashodi: \n", account - checks);
format(coordstring3, sizeof(coordstring3), " {EA0C0C}Takse: -$%d\n",TaxValue);
format(coordstring4, sizeof(coordstring4), " {EA0C0C}Namjernice: -$%d\n",namjernice);
format(coordstring5, sizeof(coordstring5), " {EA0C0C}Rent: -$%d\n",rent);
format(coordstring6, sizeof(coordstring6), "{FFB405}Staro stanje racuna: $%d", PlayerInfo-isplata);
format(coordstring7, sizeof(coordstring7), "\n{FFB405}Trenutno stanje racuna: $%d", PlayerInfo+isplata + checks-namjernice-rent);
if(PlayerInfo != 0)
{
format(coordstring8, sizeof(coordstring8), " {17C1FF}Kredit: -$500\n");
PlayerInfo -= 500;
PlayerInfo -= 500;
}
if(PlayerInfo > 0)
{
PlayerInfo -= ebill;
SBizzInfo += ebill;
}
else
{
ebill = 0;
}
if(PlayerInfo != 0)
{
if(PlayerInfo != 0)
{
PlayerInfo -= 1;
}
}
if(PlayerInfo != 999)
{
if(Carlist > 0)
{
format(vozilostring, sizeof(vozilostring), " \n{FFB405}Registracija vozila traje jos: %dPD",Carlist);
Carlist--;
}
else
{
format(vozilostring, sizeof(vozilostring), " \n{FFB405}Registracija vaseg vozila je istekla",Carlist);
Carlist--;
}
}
if(PlayerInfo > 0)
{
PlayerInfo--;
}
if(PlayerInfo > 0)
{
PlayerInfo--;
}
format(payday, 1250,"%s%s%s%s%s%s%s%s%s%s%s%s%s",a,b,c,e,coordstring8,coordstring2,coordstring3,coordstring4,coordstring5,coordstring6,coordstring7,vozilostring,nivostring);
ShowPlayerDialog(playerid, 667, DIALOG_STYLE_MSGBOX, "Plata", payday , "U redu", "");
FarmerPickup = 0;
TraktorFarmerPickup = 0;
PlayerInfo += isplata + checks -TaxValue-namjernice-rent;
rent = 0;
PlayerInfo = 0;
PlayerInfo = 0;
PlayerInfo++;
PlayerInfo--;
}
else
{
SendClientMessage(playerid, COLOR_WHITE, "[NL:RP]: {FF0000}Niste igrali dovoljno dugo da biste dobili platu.");
return 1;
}
}
}
return 1;
}
Neke slike/video za lakse dobivanje pomoci(neobavezno):
