Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- stock givePayday() {
- new interest, tmpintrate, checks;
- foreach(new x: Player) {
- if(IsPlayerLogged[x] == 1) {
- if(PlayerInfo[x][pHouse] != 999) HouseInfo[PlayerInfo[x][pHouse]][hTakings] += HouseInfo[PlayerInfo[x][pHouse]][hRent];
- SCM(x, COLOR_SERVER, "------------------------------------------------------------------------------------------------");
- if(PlayerInfo[x][pPremiumAccount] == 1) {
- tmpintrate = 2; PlayerInfo[x][pPayDayHad] ++;
- PlayerInfo[x][pPayCheck] += PlayerInfo[x][pPayCheck] / 2;
- if(PlayerInfo[x][pPayDayHad] >= 5) PlayerInfo[x][pExp] ++, PlayerInfo[x][pPayDayHad] = 0;
- } else tmpintrate = 1;
- PlayerInfo[x][pConnectTime] += PlayerInfo[x][pSeconds] / 3600;
- Tax += TaxValue; checks = PlayerInfo[x][pLevel] * 2500 + random(3000);
- interest = (PlayerInfo[x][pAccount] / 5000) * tmpintrate;
- if(!PlayerInfo[x][pDailyLogin]) interest = interest * 2, PlayerInfo[x][pExp] += 2, checks = checks * 2;
- GivePlayerCash(x, checks); UpdateProgress(x, 0); PlayerInfo[x][pAccount] += interest + 1000;
- PlayerInfo[x][pExp] ++; UpdateVar(x, "Respect", PlayerInfo[x][pExp]);
- PlayerInfo[x][pSpinPoints] ++; UpdateVar(x, "SpinPoints", PlayerInfo[x][pSpinPoints]);
- PlayerInfo[x][pGold] ++; UpdateVar(x, "GoldEra", PlayerInfo[x][pGold]);
- SCM(x, COLOR_WHITE, "Salariul tau a sosit! Viziteaza banca pentru a retrage banii.");
- SCMf(x, COLOR_WHITE, "Ai primit %0.2f ore jucate. (%.0f minute)", PlayerInfo[x][pSeconds] / 3600, PlayerInfo[x][pSeconds] / 60);
- if(PlayerInfo[x][pSeconds] >= 1800) {
- gString[0] = (EOS);
- mysql_format(SQL, gString, sizeof gString, "UPDATE `users` SET `DayHours` = `DayHours` + '1' WHERE `id` = '%d'", PlayerInfo[x][pSQLID]);
- mysql_tquery(SQL, gString, "", "");
- mysql_format(SQL, gString, sizeof gString, "UPDATE `users` SET `HoursMonth` = `HoursMonth` + '1' WHERE `id` = '%d'", PlayerInfo[x][pSQLID]);
- mysql_tquery(SQL, gString, "", "");
- }
- PlayerInfo[x][pSeconds] = 0;
- if(!PlayerInfo[x][pDailyLogin]) PlayerInfo[x][pDailyLogin] = 1, UpdateVar(x, "DailyLogin", 1), SCM(x, COLOR_LIGHTBLUE, "Ai primit de doua ori mai multe respect points si bani pentru primul tau payday de astazi.");
- SCMf(x, COLOR_GREY, "Paycheck: %s$ | Tax: -%s$ | Rent: -%s$ | Old Balance: %s$", FormatNumber(checks), FormatNumber(TaxValue), (PlayerInfo[x][pHouse] == 999) ? ("0") : (FormatNumber(HouseInfo[PlayerInfo[x][pHouse]][hRent])), FormatNumber(PlayerInfo[x][pAccount] - interest - 1000));
- SCMf(x, COLOR_GREY, "Interest rate: 0.%d%s | Interest: %s$ | New balance: %s$", tmpintrate, "%", FormatNumber(interest), FormatNumber(PlayerInfo[x][pAccount]));
- SCM(x, COLOR_GREY, "(+) Ai primit un Spin Point.");
- PlayerInfo[x][pPayDay] = 0; PlayerInfo[x][pPayCheck] = 0;
- SCM(x, COLOR_SERVER, "------------------------------------------------------------------------------------------------");
- if(PlayerInfo[x][pCarLicT] > 0) PlayerInfo[x][pCarLicT] --;
- if(PlayerInfo[x][pFlyLicT] > 0) PlayerInfo[x][pFlyLicT] --;
- if(PlayerInfo[x][pBoatLicT] > 0) PlayerInfo[x][pBoatLicT] --;
- if(PlayerInfo[x][pFishLicT] > 0) PlayerInfo[x][pFishLicT] --;
- if(PlayerInfo[x][pCarLic] == 1 && !PlayerInfo[x][pCarLicT]) PlayerInfo[x][pCarLic] = 0;
- if(PlayerInfo[x][pFlyLic] == 1 && !PlayerInfo[x][pFlyLicT]) PlayerInfo[x][pFlyLic] = 0;
- if(PlayerInfo[x][pGunLic] == 1 && !PlayerInfo[x][pGunLicT]) PlayerInfo[x][pGunLic] = 0;
- if(PlayerInfo[x][pBoatLic] == 1 && !PlayerInfo[x][pBoatLicT]) PlayerInfo[x][pBoatLic] = 0;
- if(PlayerInfo[x][pFishLic] == 1 && !PlayerInfo[x][pFishLicT]) PlayerInfo[x][pFishLic] = 0;
- if(PlayerInfo[x][pFpunish] > 0) PlayerInfo[x][pFpunish] --;
- if(PlayerInfo[x][pCarLicS] > 0) PlayerInfo[x][pCarLicS] --;
- if(PlayerInfo[x][pGunLicS] > 0) PlayerInfo[x][pGunLicS] --;
- if(PlayerInfo[x][pFlyLicS] > 0) PlayerInfo[x][pFlyLicS] --;
- if(PlayerInfo[x][pBoatLicS] > 0) PlayerInfo[x][pBoatLicS] --;
- if(PlayerInfo[x][pRob] < 20) PlayerInfo[x][pRob] ++;
- if(PlayerInfo[x][pGunLicT] > 0) {
- PlayerInfo[x][pGunLicT] --;
- if(!PlayerInfo[x][pGunLicT]) ResetWeapons(x);
- }
- if(IsACop(x)) PlayerInfo[x][pLawyer] ++;
- }
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement