Detaljan opis problema:kako da napravim dialogot sto fali na ovo pay day
Dio skripte:
Quote
public PayDay()
{
new string;
new account,interest;
new rent = 0;
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(PlayerInfo > 0)
{
if(MoneyMessage==1)
{
SendClientMessage(i, COLOR_LIGHTRED, "{00CCFF}Opel Roleplay: Niste{FFFF00} platili dug, u zatvor.");
GameTextForPlayer(i, "~r~Uhapseni!", 2000, 1);
SetPlayerInterior(i, 6);
SetPlayerPos(i, 264.6288,77.5742,1001.0391);
PlayerInfo = 1;
ResetPlayerWeapons(i);
WantedPoints = 0;
PlayerInfo = 240;
format(string, sizeof(string), "Zatvoreni ste na %d sekundi. Jamcevina: nedostupnae", PlayerInfo);
SendClientMessage(i, COLOR_LIGHTBLUE, string);
}
new playername2;
GetPlayerName(i, playername2, sizeof(playername2));
account = PlayerInfo;
new key = PlayerInfo;
if(FarmerVar == 0)
{
FarmerPickup = 0;
}
if(key != 255)
{
rent = HouseInfo;
if(strcmp(playername2, HouseInfo, true) == 0)
{
rent = 0;
}
else if(rent > JB_GetPlayerMoney(i))
{
PlayerInfo = 255;
SendClientMessage(i, COLOR_WHITE, "Izbaceni ste iz kuce.");
rent = 0;
}
HouseInfo = HouseInfo+rent;
}
new tmpintrate;
if (key != 255 && strcmp(playername2, HouseInfo, true) == 0)
{
if(PlayerInfo > 0) { tmpintrate = intrate+4; }
else { tmpintrate = intrate+2; }//HouseInfo
}
else
{
if(PlayerInfo > 0) { tmpintrate = 3; }
else { tmpintrate = 1; }
}
new nxtlevel = PlayerInfo + 1;
new expamount = nxtlevel*levelexp;
if (PlayerInfo < expamount)
{
SendClientMessage(i,COLOR_BLUE,"PayDay-Placa--- Opel Roleplay");
}
else
{
format(string, sizeof(string), "~g~LEVEL UP~n~~w~Sada si level %d", nxtlevel);
PlayerPlaySound(i, 1052, 0.0, 0.0, 0.0);
PlayerPlayMusic(i);
PlayerInfo++;
}
if(PlayerInfo >= 5)
{
Tax += TaxValue;//Should work for every player online
PlayerInfo -= TaxValue;
if(PlayerInfo > 0)
{
new bonus = PlayerInfo / 100;
PlayerInfo += bonus;
}
new checks = PlayerInfo / 5;
new ebill = (PlayerInfo/10000)*(PlayerInfo);
ConsumingMoney = 1;
JB_GivePlayerMoney(i, checks);
if(PlayerInfo > 0)
{
PlayerInfo -= ebill;
SBizzInfo += ebill;
}
else
{
ebill = 0;
}
interest = (PlayerInfo/1000)*(tmpintrate);
PlayerInfo++;
PlayerPlayMusic(i);
PlayerInfo = account+interest;
new coordsstring,coordsstringB,coordsstringC,coordsstringD,coordsstringE,coordsstringF,coordsstringG;
format(coordsstringB, sizeof(coordsstringB), "| Placa: %d ",checks);
format(coordsstringC, sizeof(coordsstringC), "| Porez: %d ",TaxValue);
format(coordsstringD, sizeof(coordsstringD), "| Rent: %d ",rent);
format(coordsstringE, sizeof(coordsstringE), "| Stari iznos: %d ",account);
format(coordsstringF, sizeof(coordsstringF), "| Novi iznos: %d",PlayerInfo );
format(coordsstringG, sizeof(coordsstringG), "| Kamata: %d ",interest );
format(coordsstring, sizeof(coordsstring), "%s\n%s\n%s\n%s\n%s\n%s",coordsstringB,coordsstringC,coordsstringD,coordsstringE,coordsstringF,coordsstringG);
ShowPlayerDialog(i,844,DIALOG_STYLE_MSGBOX,"|----------| PayDay|----------|Placa|----------|",coordsstring,"OK","Odustani");
rent = 0;
PlayerInfo = 0;
PlayerInfo = 0;
if (PlayerInfo == 0)
{
SendClientMessage(i, COLOR_LIGHTRED, "Posjetite nas na forumu Uskoro");
}
else if (PlayerInfo> 0)
{
PlayerInfo = PlayerInfo-500;
JB_GivePlayerMoney(i,500);
SendClientMessage(i, COLOR_BLUE, "* Rata kredita -500$.");
}
PlayerInfo += 1;
if(PlayerInfo > 0)
{
PlayerInfo += 1;
if(PlayerInfo >= 5)
{
PlayerInfo++;
PlayerInfo = 0;
}
}
}
else
{
SendClientMessage(i, COLOR_LIGHTRED, "* {00CCFF}Opel Roleplay: Niste{FFFF00} igrali dovoljno dugo da bi dobili payday.");
}
}
}
}
Checkprop();
return 1;
}
{
new string;
new account,interest;
new rent = 0;
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(PlayerInfo > 0)
{
if(MoneyMessage==1)
{
SendClientMessage(i, COLOR_LIGHTRED, "{00CCFF}Opel Roleplay: Niste{FFFF00} platili dug, u zatvor.");
GameTextForPlayer(i, "~r~Uhapseni!", 2000, 1);
SetPlayerInterior(i, 6);
SetPlayerPos(i, 264.6288,77.5742,1001.0391);
PlayerInfo = 1;
ResetPlayerWeapons(i);
WantedPoints = 0;
PlayerInfo = 240;
format(string, sizeof(string), "Zatvoreni ste na %d sekundi. Jamcevina: nedostupnae", PlayerInfo);
SendClientMessage(i, COLOR_LIGHTBLUE, string);
}
new playername2;
GetPlayerName(i, playername2, sizeof(playername2));
account = PlayerInfo;
new key = PlayerInfo;
if(FarmerVar == 0)
{
FarmerPickup = 0;
}
if(key != 255)
{
rent = HouseInfo;
if(strcmp(playername2, HouseInfo, true) == 0)
{
rent = 0;
}
else if(rent > JB_GetPlayerMoney(i))
{
PlayerInfo = 255;
SendClientMessage(i, COLOR_WHITE, "Izbaceni ste iz kuce.");
rent = 0;
}
HouseInfo = HouseInfo+rent;
}
new tmpintrate;
if (key != 255 && strcmp(playername2, HouseInfo, true) == 0)
{
if(PlayerInfo > 0) { tmpintrate = intrate+4; }
else { tmpintrate = intrate+2; }//HouseInfo
}
else
{
if(PlayerInfo > 0) { tmpintrate = 3; }
else { tmpintrate = 1; }
}
new nxtlevel = PlayerInfo + 1;
new expamount = nxtlevel*levelexp;
if (PlayerInfo < expamount)
{
SendClientMessage(i,COLOR_BLUE,"PayDay-Placa--- Opel Roleplay");
}
else
{
format(string, sizeof(string), "~g~LEVEL UP~n~~w~Sada si level %d", nxtlevel);
PlayerPlaySound(i, 1052, 0.0, 0.0, 0.0);
PlayerPlayMusic(i);
PlayerInfo++;
}
if(PlayerInfo >= 5)
{
Tax += TaxValue;//Should work for every player online
PlayerInfo -= TaxValue;
if(PlayerInfo > 0)
{
new bonus = PlayerInfo / 100;
PlayerInfo += bonus;
}
new checks = PlayerInfo / 5;
new ebill = (PlayerInfo/10000)*(PlayerInfo);
ConsumingMoney = 1;
JB_GivePlayerMoney(i, checks);
if(PlayerInfo > 0)
{
PlayerInfo -= ebill;
SBizzInfo += ebill;
}
else
{
ebill = 0;
}
interest = (PlayerInfo/1000)*(tmpintrate);
PlayerInfo++;
PlayerPlayMusic(i);
PlayerInfo = account+interest;
new coordsstring,coordsstringB,coordsstringC,coordsstringD,coordsstringE,coordsstringF,coordsstringG;
format(coordsstringB, sizeof(coordsstringB), "| Placa: %d ",checks);
format(coordsstringC, sizeof(coordsstringC), "| Porez: %d ",TaxValue);
format(coordsstringD, sizeof(coordsstringD), "| Rent: %d ",rent);
format(coordsstringE, sizeof(coordsstringE), "| Stari iznos: %d ",account);
format(coordsstringF, sizeof(coordsstringF), "| Novi iznos: %d",PlayerInfo );
format(coordsstringG, sizeof(coordsstringG), "| Kamata: %d ",interest );
format(coordsstring, sizeof(coordsstring), "%s\n%s\n%s\n%s\n%s\n%s",coordsstringB,coordsstringC,coordsstringD,coordsstringE,coordsstringF,coordsstringG);
ShowPlayerDialog(i,844,DIALOG_STYLE_MSGBOX,"|----------| PayDay|----------|Placa|----------|",coordsstring,"OK","Odustani");
rent = 0;
PlayerInfo = 0;
PlayerInfo = 0;
if (PlayerInfo == 0)
{
SendClientMessage(i, COLOR_LIGHTRED, "Posjetite nas na forumu Uskoro");
}
else if (PlayerInfo> 0)
{
PlayerInfo = PlayerInfo-500;
JB_GivePlayerMoney(i,500);
SendClientMessage(i, COLOR_BLUE, "* Rata kredita -500$.");
}
PlayerInfo += 1;
if(PlayerInfo > 0)
{
PlayerInfo += 1;
if(PlayerInfo >= 5)
{
PlayerInfo++;
PlayerInfo = 0;
}
}
}
else
{
SendClientMessage(i, COLOR_LIGHTRED, "* {00CCFF}Opel Roleplay: Niste{FFFF00} igrali dovoljno dugo da bi dobili payday.");
}
}
}
}
Checkprop();
return 1;
}
Neke slike/video za lakse dobivanje pomoci(neobavezno):
