Skripta koju koristim: LARP edit
Detaljan opis problema😛ayDay ne dolazi svakome, i ne dolazi svaki sat, nece se ukljucit poslije 7 sati ja mislim.....
Dio skripte:
public SyncTime()
{
new string;
new tmphour;
new tmpminute;
new tmpsecond;
gettime(tmphour, tmpminute, tmpsecond);
FixHour(tmphour);
tmphour = shifthour;
if ((tmphour > ghour) || (tmphour == 0 && ghour == 23))
{
format(string, sizeof(string), "{FFFFFF} Sada je {48E31C}%d:00 {FFFFFF}sati.",tmphour);
BroadCast(COLOR_WHITE,string);
ghour = tmphour;
PayDay();
if (realtime)
{
SetWorldTime(tmphour);
}
}
}
public PayDay()
{
new string;
new account,interest;
new rent = 0;
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(MoneyMessage==1)
{
SendClientMessage(i, COLOR_ORANGE, "Niste uspjeli da vratite dug, idete u zatvor.");
GameTextForPlayer(i, "~r~Uhapsen!", 3000, 5);
new rand = random(sizeof(gRandomJailSpawns));
SetPlayerPos(i, gRandomJailSpawns, gRandomJailSpawns, gRandomJailSpawns);
SetPlayerInterior(i, 0);
PlayerInfo = 1;
ResetPlayerWeapons(i);
ResetPlayerMoney(i);
WantedPoints = 0;
PlayerInfo = 240;
format(string, sizeof(string), "Zatvoren si %d sekundi. Jamcevina: Ne", PlayerInfo);
SendClientMessage(i, COLOR_WHITE, string);
}
new playername2;
GetPlayerName(i, playername2, sizeof(playername2));
account = PlayerInfo;
new key = PlayerInfo;
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; }
}
//PlayerInfo = SafeJB_GivePlayerMoney(i);
if(PlayerInfo >= 5)
{
Tax += TaxValue;//Should work for every player online
PlayerInfo -= TaxValue;
new checks = PlayerInfo / 5;
if(PlayerInfo > 0)
{
new bonus = PlayerInfo / 10;
checks += bonus;
}
new ebill = (PlayerInfo/2500)/(PlayerInfo);
new vodabill = (PlayerInfo/6500)/(PlayerInfo);
ConsumingMoney = 1;
if(PlayerInfo != 255 || PlayerInfo != 255 )
{
PlayerInfo -= ebill;
for(i = 0; i < sizeof(SBusinesses); i++)
{
if(SBusinesses == 1😎
{
SBusinesses += ebill/5;
SaveSBusiness(i);
}
}
PlayerInfo -= vodabill;
for(i = 0; i < sizeof(SBusinesses); i++)
{
if(SBusinesses == 19)
{
SBusinesses += vodabill;
SaveSBusiness(i);
}
}
}
else
{
ebill = 0;
}
interest = (PlayerInfo/1000)*(tmpintrate);
PlayerInfo++;
PlayerPlayMusic(i);
PlayerInfo = account+interest + checks;
format( string, sizeof( string ), "Isplata: %d$\nPorez: %d$\nRacun za struju: %d$\nRacun za vodu:%d$ \nBanka: %d$\nKamatna stopa: 0.%d %\n{FFFF80}Kamata: %d$\nNovo stanje u Banci: %d $\nRent: %d$", checks, TaxValue, ebill, vodabill,account, tmpintrate, interest, PlayerInfo, rent);
ShowPlayerDialog( i, 250, DIALOG_STYLE_MSGBOX, "xTeam PayDay isplata", string, "Uredu", "" );
if(PlayerInfo > 0)
{
new kredito;
format( kredito, sizeof( kredito ), "Isplata: %d$\nPorez: %d$\nRacun za struju: %d$\nRacun za vodu: %d$\nBanka: %d$\nKamatna stopa: 0.%d %\nKamata: %d$\nNovo stanje u Banci: %d $\nRent: %d$\nKredit: -1000$\nPreostalo rata: %d", checks, TaxValue, ebill, vodabill, account, tmpintrate, interest, PlayerInfo, rent, PlayerInfo);
ShowPlayerDialog( i, 250, DIALOG_STYLE_MSGBOX, "xTeam PayDay isplata", kredito, "Uredu", "" );
PlayerInfo -= 1;
PlayerInfo -= 1000;
PlayerInfo += 1;
}
if(PlayerInfo == 0)
{
new kredito;
format(kredito, sizeof(kredito), " Kredit otplacen. Mozes ici da podignes novi!", PlayerInfo);
SendClientMessage(i, COLOR_WHITE, kredito);
PlayerInfo = -1;
PlayerInfo = 0;
}
rent = 0;
PlayerInfo = 0;
PlayerInfo = 0;
PlayerInfo += 1;
if(GetPVarInt(i, "DonatorRank") > 0)
{
PlayerInfo += 1;
if(PlayerInfo >= 5)
{
PlayerInfo++;
PlayerInfo = 0;
}
}
}
else
{
SendClientMessage(i, COLOR_ORANGE, "* Nisi igrao dovoljno dugo da bi dobio platu.");
}
}
}
return 1;
}
Neke slike/video za lakse dobivanje pomoci(neobavezno): //
Zaključano
[POMOC] PayDay
306
pregleda
3
postova
Ova tema je zaključana. Samo moderatori i administratori mogu odgovarati.
pre 12 godina
Probaj
public PayDay()
{
new string;
new account,interest;
new rent = 0;
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i) && !IsPlayerNPC(i))
{
if(PlayerInfo > 0)
{
if(MoneyMessage == 1)
{
new bank = PlayerInfo;
SendClientMessage(i, COLOR_LIGHTRED, "Niste vratili dug idete u zatvor.");
GameTextForPlayer(i, "~r~Uhapsen", 2000, 1);
SafeSetPlayerInterior(i, 6);
SafeSetPlayerPos(i, 264.6288,77.5742,1001.0391);
PlayerInfo = 1;
SafeResetPlayerWeapons(i);
SafeResetPlayerMoney(i);
SafeGivePlayerMoney(i, 1);
WantedPoints = 0;
PlayerInfo = (bank + DebtMoney);
DebtMoney = 0;
PlayerInfo = 240;
TextDrawShowForPlayer(i, Textdraw1);
format(string, sizeof(string), "Zatvoren si %d sekundi. Jamcevina: Ne", PlayerInfo);
SendClientMessage(i, COLOR_WHITE, string);
}
new playername2;
GetPlayerName(i, playername2, sizeof(playername2));
account = PlayerInfo;
new key = PlayerInfo;
new tmpintrate;
if (key != 9999 && 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 >= 30)
{
Tax += TaxValue;//Should work for every player online
PlayerInfo -= TaxValue;
new checks = 150 + PlayerInfo;
if(PlayerInfo > 0)
{
new bonus = PlayerInfo / 10;
checks += bonus;
}
new ebill = (PlayerInfo/10000)*(PlayerInfo);
account += checks;
if(PlayerInfo > 0)
{
PlayerInfo -= ebill;
SBizzInfo += ebill;
}
else
{
ebill = 0;
}
interest = (PlayerInfo/1000)*(tmpintrate);
PlayerInfo++;
PlayerPlayMusic(i);
PlayerInfo = account+interest;
SendClientMessage(i, COLOR_GREEN, "|___ Izvestaj iz banke ___|");
format(string, sizeof(string), " Plata: $%d Taksa: -$%d", checks, TaxValue);
SendClientMessage(i, COLOR_WHITE, string);
if(PlayerInfo != 9999 || PlayerInfo != 9999)
{
format(string, sizeof(string), " Racun za struju: -$%d", ebill);
SendClientMessage(i, COLOR_GRAD1, string);
}
format(string, sizeof(string), " Staro stanje: $%d", account - checks);
SendClientMessage(i, COLOR_WHITE, string);
format(string, sizeof(string), " Kamata: 0.%d posto",tmpintrate);
SendClientMessage(i, COLOR_GRAD2, string);
format(string, sizeof(string), " Kamatni Interes: $%d", interest);
SendClientMessage(i, COLOR_GRAD3, string);
SendClientMessage(i, COLOR_GREEN, "|--------------------------------------|");
format(string, sizeof(string), " Novo stanje: $%d", PlayerInfo);
SendClientMessage(i, COLOR_GRAD5, string);
format(string, sizeof(string), " Rent: -$%d", rent);
SendClientMessage(i, COLOR_GRAD5, string);
format(string, sizeof(string), "~y~PayDay~n~~w~Plata je stigla na vas racun");
GameTextForPlayer(i, string, 5000, 1);
rent = 0;
PlayerInfo = 0;
PlayerInfo = 0;
if(FarmerVar == 0)
{
FarmerPickup = 0;
}
if(SmugglerWork == 0)
{
PayDaySecure = 0;
}
if(PlayerInfo > 0)
{
PlayerInfo += 1;
if(PlayerInfo >= 5)
{
PlayerInfo++;
PlayerInfo = 0;
}
}
}
else
{
SendClientMessage(i, COLOR_WHITE, "* Nisi igrao dovoljno dugo da bi dobio platu!");
}
}
}
}
Morate biti prijavljeni da biste odgovorili na ovu temu.
Prijava