Skripta koju koristim:TR
Detaljan opis problema:Pa ovako imam problem sa payday t.e platom kad dodje na pr 20:00 da mu dodje plate i da mu da platu , a sad na pr dodje 20:00 i ne mi dodje plata cekam do 20:05 i pa ne dodje ? Molim vas pomozite !!
Dio skripte:
Neke slike/video za lakse dobivanje pomoci(neobavezno):
Kako si postavio timer??
Daj nam kod..
public SyncTime()
{
new string[64];
new tmphour;
new tmpminute;
new tmpsecond;
gettime(tmphour, tmpminute, tmpsecond);
FixHour(tmphour);
Smetki();
SyncTime();
DollahScoreUpdate();
tmphour = shifthour;
if ((tmphour > ghour) || (tmphour == 0 && ghour == 23))
{
format(string, sizeof(string), "(DT)Server: Sega e tocno %d:00 casot",tmphour);
BroadCast(COLOR_WHITE,string);
ghour = tmphour;
PayDay();
new rand = random(80);
if(rand < 77) { rand += 3; }
Lotto(rand);
if (realtime)
{
SetWorldTime(tmphour);
}
}
}
public PayDay()
{
new string[128];
new coordstring[128];
new coordstring1[128];
new coordstring2[128];
new coordstring3[128];
new coordstring4[128];
new payday[512];
new account,interest;
new rent = 0;
foreach (Player, i)
{
if(PlayerInfo[i][pLevel] > 0)
{
new playername2[MAX_PLAYER_NAME];
GetPlayerName(i, playername2, sizeof(playername2));
account = PlayerInfo[i][pAccount];
new key = PlayerInfo[i][pPhousekey];
if(key != 255)
{
rent = HouseInfo[key][hRent];
if(strcmp(playername2, HouseInfo[key][hOwner], true) == 0)
{
rent = 0;
}
else if(rent > GetPlayerMoney(i))
{
PlayerInfo[i][pPhousekey] = 255;
SendClientMessage(i, COLOR_WHITE, "{6EF83C}INFO:{FFFFFF}Vekje ne rentate kukja.");
rent = 0;
}
HouseInfo[key][hTakings] = HouseInfo[key][hTakings]+rent;
}
new tmpintrate;
if (key != 255 && strcmp(playername2, HouseInfo[key][hOwner], true) == 0)
{
if(PlayerInfo[i][pDonateRank] > 0) { tmpintrate = intrate+4; }
else { tmpintrate = intrate+2; }//HouseInfo[key][hLevel]
}
else
{
if(PlayerInfo[i][pDonateRank] > 0) { tmpintrate = 3; }
else { tmpintrate = 1; }
}
if(PlayerInfo[i][pPayDay] >= 5)
{
Tax += TaxValue;//Should work for every player online
PlayerInfo[i][pAccount] -= TaxValue;
new checks = PlayerInfo[i][pPayCheck] / 5;
if(PlayerInfo[i][pDonateRank] > 0)
{
new bonus = PlayerInfo[i][pPayCheck] / 10;
checks += bonus;
}
new ebill = (PlayerInfo[i][pAccount]/10000)*(PlayerInfo[i][pLevel]);
account += checks;
if(PlayerInfo[i][pAccount] > 0)
{
PlayerInfo[i][pAccount] -= ebill;
SBizzInfo[4][sbTill] += ebill;
}
else
{
ebill = 0;
}
interest = (PlayerInfo[i][pAccount]/1000)*(tmpintrate);
PlayerInfo[i][pExp]++;
PlayerInfo[i][pAccount] = account+interest;
format(coordstring, sizeof(coordstring), "Isplata: $%d\nTaksa: -$%d\n", checks, TaxValue);
/*if(PlayerInfo[i][pPhousekey] != 255 || PlayerInfo[i][pPbiskey] != 255)
{
format(coordstring1, sizeof(coordstring1), "{FFFFFF}Smetka za struja: -$%d\n", ebill);
}*/
format(coordstring1, sizeof(coordstring1), "Smetka: $%d\n", account - checks);
format(coordstring2, sizeof(coordstring2), "Kamata: 0.%d procenti\n",tmpintrate);
format(coordstring3, sizeof(coordstring3), "Interes: $%d\n", interest);
format(coordstring4, sizeof(coordstring4), "Nova smetka: $%d\n", PlayerInfo[i][pAccount]);
//format(coordstring5, sizeof(coordstring5), "Rent: -$%d\n", rent);
format(payday, 512,"%s%s%s%s%s",coordstring,coordstring1,coordstring2,coordstring3,coordstring4);
ShowPlayerDialog(i, 667, DIALOG_STYLE_MSGBOX, "Plata", payday , "OK", "");
format(string, sizeof(string), "~y~Plata");
GameTextForPlayer(i, string, 5000, 1);
rent = 0;
PlayerInfo[i][pPayDay] = 0;
PlayerInfo[i][pPayCheck] = 0;
PlayerInfo[i][pConnectTime] += 1;
if(FarmerVar[i] == 0)
{
FarmerPickup[i][0] = 0;
}
if(DrugFarmerVar[i] == 0)
{
DrugFarmerPickup[i][0] = 0;
}
if(SmugglerWork[i] == 0)
{
PayDaySecure[i] = 0;
}
if(PlayerInfo[i][pDonateRank] > 0)
{
PlayerInfo[i][pPayDayHad] += 1;
if(PlayerInfo[i][pPayDayHad] >= 5)
{
PlayerInfo[i][pExp]++;
PlayerInfo[i][pPayDayHad] = 0;
}
}
}
else
{
SendClientMessage(i, COLOR_WHITE, "{6EF83C}INFO:{FFFFFF}Ne igravte dovolno za da dobiete plata.");
}
}
}
SaveAccounts();
return 1;
}
help? :S
LOCK
Molimo te da procitas pravila foruma te da onda otvoris temu po pravilima
Zasto ti je tema lockana:
Bumpati se moze kada prodje 24/h od vaseg prethodnog posta u temi.
PRAVILA:
GLAVNA PRAVILA BALKAN SAMP ZAJEDNICE - http://balkan-samp.com/forum/index.php?topic=7045.0
Razgovor u vezi PAWN Skriptanja - http://balkan-samp.com/forum/index.php?topic=11453.0