daily pastebin goal
28%
SHARE
TWEET

Untitled

a guest Oct 19th, 2018 81 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. stock givePayday() {
  2.     new interest, tmpintrate, checks;
  3.     foreach(new x: Player) {
  4.         if(IsPlayerLogged[x] == 1) {
  5.             if(PlayerInfo[x][pHouse] != 999) HouseInfo[PlayerInfo[x][pHouse]][hTakings] += HouseInfo[PlayerInfo[x][pHouse]][hRent];
  6.             SCM(x, COLOR_SERVER, "------------------------------------------------------------------------------------------------");
  7.  
  8.             if(PlayerInfo[x][pPremiumAccount] == 1) {
  9.                 tmpintrate = 2; PlayerInfo[x][pPayDayHad] ++;
  10.                 PlayerInfo[x][pPayCheck] += PlayerInfo[x][pPayCheck] / 2;
  11.                 if(PlayerInfo[x][pPayDayHad] >= 5) PlayerInfo[x][pExp] ++, PlayerInfo[x][pPayDayHad] = 0;
  12.             } else tmpintrate = 1;
  13.             PlayerInfo[x][pConnectTime] += PlayerInfo[x][pSeconds] / 3600;
  14.             Tax += TaxValue; checks = PlayerInfo[x][pLevel] * 2500 + random(3000);
  15.             interest = (PlayerInfo[x][pAccount] / 5000) * tmpintrate;
  16.             if(!PlayerInfo[x][pDailyLogin]) interest = interest * 2, PlayerInfo[x][pExp] += 2, checks = checks * 2;
  17.             GivePlayerCash(x, checks); UpdateProgress(x, 0); PlayerInfo[x][pAccount] += interest + 1000;
  18.             PlayerInfo[x][pExp] ++; UpdateVar(x, "Respect", PlayerInfo[x][pExp]);
  19.             PlayerInfo[x][pSpinPoints] ++; UpdateVar(x, "SpinPoints", PlayerInfo[x][pSpinPoints]);
  20.             PlayerInfo[x][pGold] ++; UpdateVar(x, "GoldEra", PlayerInfo[x][pGold]);
  21.  
  22.             SCM(x, COLOR_WHITE, "Salariul tau a sosit! Viziteaza banca pentru a retrage banii.");
  23.             SCMf(x, COLOR_WHITE, "Ai primit %0.2f ore jucate. (%.0f minute)", PlayerInfo[x][pSeconds] / 3600, PlayerInfo[x][pSeconds] / 60);
  24.  
  25.             if(PlayerInfo[x][pSeconds] >= 1800) {
  26.                 gString[0] = (EOS);
  27.                 mysql_format(SQL, gString, sizeof gString, "UPDATE `users` SET `DayHours` = `DayHours` + '1' WHERE `id` = '%d'", PlayerInfo[x][pSQLID]);
  28.                 mysql_tquery(SQL, gString, "", "");
  29.                 mysql_format(SQL, gString, sizeof gString, "UPDATE `users` SET `HoursMonth` = `HoursMonth` + '1' WHERE `id` = '%d'", PlayerInfo[x][pSQLID]);
  30.                 mysql_tquery(SQL, gString, "", "");
  31.             }
  32.  
  33.             PlayerInfo[x][pSeconds] = 0;
  34.  
  35.             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.");
  36.  
  37.             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));
  38.             SCMf(x, COLOR_GREY, "Interest rate: 0.%d%s | Interest: %s$ | New balance: %s$", tmpintrate, "%", FormatNumber(interest), FormatNumber(PlayerInfo[x][pAccount]));
  39.             SCM(x, COLOR_GREY, "(+) Ai primit un Spin Point.");
  40.             PlayerInfo[x][pPayDay] = 0; PlayerInfo[x][pPayCheck] = 0;
  41.             SCM(x, COLOR_SERVER, "------------------------------------------------------------------------------------------------");
  42.  
  43.             if(PlayerInfo[x][pCarLicT] > 0) PlayerInfo[x][pCarLicT] --;
  44.             if(PlayerInfo[x][pFlyLicT] > 0) PlayerInfo[x][pFlyLicT] --;
  45.             if(PlayerInfo[x][pBoatLicT] > 0) PlayerInfo[x][pBoatLicT] --;
  46.             if(PlayerInfo[x][pFishLicT] > 0) PlayerInfo[x][pFishLicT] --;
  47.             if(PlayerInfo[x][pCarLic] == 1 && !PlayerInfo[x][pCarLicT]) PlayerInfo[x][pCarLic] = 0;
  48.             if(PlayerInfo[x][pFlyLic] == 1 && !PlayerInfo[x][pFlyLicT]) PlayerInfo[x][pFlyLic] = 0;
  49.             if(PlayerInfo[x][pGunLic] == 1 && !PlayerInfo[x][pGunLicT]) PlayerInfo[x][pGunLic] = 0;
  50.             if(PlayerInfo[x][pBoatLic] == 1 && !PlayerInfo[x][pBoatLicT]) PlayerInfo[x][pBoatLic] = 0;
  51.             if(PlayerInfo[x][pFishLic] == 1 && !PlayerInfo[x][pFishLicT]) PlayerInfo[x][pFishLic] = 0;
  52.             if(PlayerInfo[x][pFpunish] > 0) PlayerInfo[x][pFpunish] --;
  53.             if(PlayerInfo[x][pCarLicS] > 0) PlayerInfo[x][pCarLicS] --;
  54.             if(PlayerInfo[x][pGunLicS] > 0) PlayerInfo[x][pGunLicS] --;
  55.             if(PlayerInfo[x][pFlyLicS] > 0) PlayerInfo[x][pFlyLicS] --;
  56.             if(PlayerInfo[x][pBoatLicS] > 0) PlayerInfo[x][pBoatLicS] --;
  57.             if(PlayerInfo[x][pRob] < 20) PlayerInfo[x][pRob] ++;
  58.  
  59.             if(PlayerInfo[x][pGunLicT] > 0) {
  60.                 PlayerInfo[x][pGunLicT] --;
  61.                 if(!PlayerInfo[x][pGunLicT]) ResetWeapons(x);
  62.             }
  63.  
  64.             if(IsACop(x)) PlayerInfo[x][pLawyer] ++;
  65.         }
  66.     }
  67.     return 1;
  68. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top