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, "Niste 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: nedostupna", PlayerInfo);
SendClientMessage(i, COLOR_LIGHTBLUE, string);
}
new playername2;
GetPlayerName(i, playername2, sizeof(playername2));
account = PlayerInfo;
new key = PlayerInfo;
if(key != 255)
{
rent = HouseInfo;
if(strcmp(playername2, HouseInfo, true) == 0)
{
rent = 0;
}
else if(rent > 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; }
}
if(PlayerInfo >= 5)
{
Tax += TaxValue;//Should work for every player online
PlayerInfo -= TaxValue;
if(PlayerInfo > 0)
{
new bonus = PlayerInfo / 2;
PlayerInfo += bonus;
}
new checks = PlayerInfo;
new ebill = (PlayerInfo/600)*(PlayerInfo);//10000
ConsumingMoney = 1;
GivePlayerMoney(i, checks);
if(PlayerInfo > 0)
{
PlayerInfo -= ebill;
SBizzInfo += ebill;
}
else
{
ebill = 0;
}
interest = (PlayerInfo/1000)*(tmpintrate);
PlayerInfo++;
PlayerPlayMusic(i);
PlayerInfo = account+interest;
new playerid;
new coordsstring;
format(coordsstring, sizeof(coordsstring), "Placa:[$%d] Kamata:[-$%d]\nBanka:[$%d] Interest Rate:[$%d]\nDobivena Kamata:[$%d] Novo Stanje:[$%d]\nIznjamljivanje:[$%d] RENT:[-100]",checks, TaxValue,ebill,account,tmpintrate,interest,PlayerInfo,rent);
ShowPlayerDialog(playerid, 10, DIALOG_STYLE_MSGBOX, "| PAYDAY: |",coordsstring,"O.K.","Izadji");
format(string, sizeof(string), "~g~Pay_Day");
GameTextForPlayer(i, string, 5000, 1);
rent = 0;
PlayerInfo = 0;
PlayerInfo = 0;
PlayerInfo += 1;
if(PlayerInfo > 0)
{
PlayerInfo += 1;
if(PlayerInfo >= 5)//5
{
PlayerInfo++;
PlayerInfo = 0;
}
}
}
else
{
SendClientMessage(i, COLOR_LIGHTRED, "* Niste igrali dovoljno dugo da bi dobili placu.");
}
}
}
}
Checkprop();
return 1;
}to je public payday kak da odredim vrijeme ovoga " Niste igrali dovoljno dugo da bi dobili placu." jel napravio sam payday svakih 30 min al me sada ovo jebe :S...tnx unaprijed
