Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public PayDay()
- {
- printf("Am intrat in functia PayDay");
- new string[128],
- str[256],
- string3[128],
- interest,
- account[MAX_PLAYERS],
- hour,
- minn,
- sec,
- expamount,
- rent[MAX_PLAYERS];
- gettime(hour,minn,sec);
- foreach(Player,i)
- {
- printf("Am intrat in foreach");
- if(IsPlayerConnected(i))
- {
- if(PlayerInfo[i][pLevel] >= 0)
- {
- new wakaname[25];
- GetPlayerName(i,wakaname,sizeof(wakaname));
- if(MoneyMessage[i]==1)
- {
- SendClientMessage(i, COLOR_LIGHTRED, "You failed to pay your debt, Jail time.");
- new rand;
- rand = random(sizeof(gRandomJailSpawns));
- SetPlayerInterior(i, 6);
- SetPlayerPosEx(i,gRandomJailSpawns[rand][0],gRandomJailSpawns[rand][1],gRandomJailSpawns[rand][2]);
- PlayerInfo[i][pJailed] = 1;
- ResetPlayerWeaponsEx(i);
- ResetPlayerWeapons(i);
- WantedPoints[i] = 0;
- PlayerInfo[i][pJailTime] = 240;
- format(string, sizeof(string), "You are jailed for %d seconds. Bail: Unable", PlayerInfo[i][pJailTime]);
- SendClientMessage(i, COLOR_LIGHTBLUE, string);
- Update(i,pJailedx);
- Update(i,pJailTimex);
- TogglePlayerControllable(i, 0);
- SetTimerEx("UnFreezeStation", 1000, false, "i", i);
- }
- new key = PlayerInfo[i][pPhousekey];
- if(key != 999)
- {
- rent[i] = HouseInfo[key][hRent];
- if(rent[i] > GetPlayerCash(i) && strcmp(PlayerInfo[i][pNormalName], HouseInfo[key][hOwner], false) == 0)
- {
- PlayerInfo[i][pPhousekey] = 999;
- Update(i,pPhousekeyx);
- }
- HouseInfo[key][hTakings] += rent[i];
- mysql_format(SQL,str,sizeof(str),"UPDATE `houses` SET `Takings`='%d' WHERE `ID`='%d'",HouseInfo[key][hTakings],key);
- mysql_tquery(SQL,str,"","");
- }
- new tmpintrate;
- if(PlayerInfo[i][pPremiumAccount] == 1)
- {
- tmpintrate = 2;
- new bonus = PlayerInfo[i][pPayCheck] / 2;
- PlayerInfo[i][pPayCheck] += bonus;
- }
- else
- {
- tmpintrate = 1;
- }
- account[i] = PlayerInfo[i][pAccount];
- Tax += TaxValue;
- PlayerInfo[i][pAccount] -= TaxValue;
- new checks = PlayerInfo[i][pPayCheck];
- PlayerInfo[i][pAccount] += checks;
- interest = (PlayerInfo[i][pAccount]/1000)*(tmpintrate);
- new finalinterest;
- SendClientMessage(i, COLOR_TEAL, "----------------------------------------------------------------------------");
- SendClientMessage(i, COLOR_WHITE, "Your paycheck has arrived; please visit the bank to withdraw your money.");
- new stringsu[256];
- if(PlayerInfo[i][pPayDay] >= 1)
- {
- format(stringsu,sizeof(stringsu),"Ai jucat doar %d minute.(31 de minute necesare pentru a primi o ora intreaga).",PlayerInfo[i][pPayDay]/60+1);
- SendSplitMessage(i, COLOR_WHITE, stringsu);
- }
- if(PlayerInfo[i][pRob] < 20)
- {
- PlayerInfo[i][pRob]++;
- ETC ETC ETC ETC nu mai are rost sa pun tot
Advertisement
Add Comment
Please, Sign In to add comment