Advertisement
Guest User

Untitled

a guest
Nov 12th, 2018
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.76 KB | None | 0 0
  1. public PayDay()
  2. {
  3. printf("Am intrat in functia PayDay");
  4. new string[128],
  5. str[256],
  6. string3[128],
  7. interest,
  8. account[MAX_PLAYERS],
  9. hour,
  10. minn,
  11. sec,
  12. expamount,
  13. rent[MAX_PLAYERS];
  14. gettime(hour,minn,sec);
  15. foreach(Player,i)
  16. {
  17. printf("Am intrat in foreach");
  18. if(IsPlayerConnected(i))
  19. {
  20. if(PlayerInfo[i][pLevel] >= 0)
  21. {
  22. new wakaname[25];
  23. GetPlayerName(i,wakaname,sizeof(wakaname));
  24. if(MoneyMessage[i]==1)
  25. {
  26. SendClientMessage(i, COLOR_LIGHTRED, "You failed to pay your debt, Jail time.");
  27. new rand;
  28. rand = random(sizeof(gRandomJailSpawns));
  29. SetPlayerInterior(i, 6);
  30. SetPlayerPosEx(i,gRandomJailSpawns[rand][0],gRandomJailSpawns[rand][1],gRandomJailSpawns[rand][2]);
  31. PlayerInfo[i][pJailed] = 1;
  32. ResetPlayerWeaponsEx(i);
  33. ResetPlayerWeapons(i);
  34. WantedPoints[i] = 0;
  35. PlayerInfo[i][pJailTime] = 240;
  36. format(string, sizeof(string), "You are jailed for %d seconds. Bail: Unable", PlayerInfo[i][pJailTime]);
  37. SendClientMessage(i, COLOR_LIGHTBLUE, string);
  38. Update(i,pJailedx);
  39. Update(i,pJailTimex);
  40. TogglePlayerControllable(i, 0);
  41. SetTimerEx("UnFreezeStation", 1000, false, "i", i);
  42. }
  43. new key = PlayerInfo[i][pPhousekey];
  44. if(key != 999)
  45. {
  46. rent[i] = HouseInfo[key][hRent];
  47. if(rent[i] > GetPlayerCash(i) && strcmp(PlayerInfo[i][pNormalName], HouseInfo[key][hOwner], false) == 0)
  48. {
  49. PlayerInfo[i][pPhousekey] = 999;
  50. Update(i,pPhousekeyx);
  51. }
  52. HouseInfo[key][hTakings] += rent[i];
  53. mysql_format(SQL,str,sizeof(str),"UPDATE `houses` SET `Takings`='%d' WHERE `ID`='%d'",HouseInfo[key][hTakings],key);
  54. mysql_tquery(SQL,str,"","");
  55. }
  56. new tmpintrate;
  57. if(PlayerInfo[i][pPremiumAccount] == 1)
  58. {
  59. tmpintrate = 2;
  60. new bonus = PlayerInfo[i][pPayCheck] / 2;
  61. PlayerInfo[i][pPayCheck] += bonus;
  62. }
  63. else
  64. {
  65. tmpintrate = 1;
  66. }
  67. account[i] = PlayerInfo[i][pAccount];
  68. Tax += TaxValue;
  69. PlayerInfo[i][pAccount] -= TaxValue;
  70. new checks = PlayerInfo[i][pPayCheck];
  71. PlayerInfo[i][pAccount] += checks;
  72. interest = (PlayerInfo[i][pAccount]/1000)*(tmpintrate);
  73. new finalinterest;
  74. SendClientMessage(i, COLOR_TEAL, "----------------------------------------------------------------------------");
  75. SendClientMessage(i, COLOR_WHITE, "Your paycheck has arrived; please visit the bank to withdraw your money.");
  76. new stringsu[256];
  77. if(PlayerInfo[i][pPayDay] >= 1)
  78. {
  79. format(stringsu,sizeof(stringsu),"Ai jucat doar %d minute.(31 de minute necesare pentru a primi o ora intreaga).",PlayerInfo[i][pPayDay]/60+1);
  80. SendSplitMessage(i, COLOR_WHITE, stringsu);
  81. }
  82. if(PlayerInfo[i][pRob] < 20)
  83. {
  84. PlayerInfo[i][pRob]++;
  85.  
  86. ETC ETC ETC ETC nu mai are rost sa pun tot
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement