Guest User

Plata

a guest
Oct 21st, 2014
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.64 KB | None | 0 0
  1. public PayDay()
  2. {
  3. for(new i = 1; i < MAX_ADMINS; i++)
  4. {
  5. if(!IsPlayerConnected(GetPlayerIDS(AdminInfo[aIme])))
  6. {
  7. AdminInfo[aNeakt] ++;
  8. SaveAdmin(i);
  9. }
  10. }
  11. if(dupliexp == 1)
  12. {
  13. for(new i = 0; i < MAX_IGRACA; i++)
  14. {
  15. if(IsPlayerConnected(i))
  16. {
  17. if(PI[pLevel] > 0)
  18. {
  19. PI[pExp]++;
  20. }
  21. }
  22. }
  23. }
  24. if(dupliexpn == 1)
  25. {
  26. for(new i = 0; i < MAX_IGRACA; i++)
  27. {
  28. if(IsPlayerConnected(i))
  29. {
  30. if(PI[pLevel] < 4)
  31. {
  32. PI[pExp]++;
  33. }
  34. }
  35. }
  36. }
  37. for(new i = 0; i < MAX_IGRACA; i++)
  38. {
  39. if(IsPlayerConnected(i))
  40. {
  41. if(PI[pLevel] > 0)
  42. {
  43. if(MoneyMessage==1)
  44. {
  45. SendClientMessage(i, COLOR_LIGHTRED, "Niste platili vas dug, vreme je za zatvor.");
  46. GameTextForPlayer(i, "~r~Uhapsen si!", 2000, 1);
  47. JBC_TogglePlayerControllable(i, 0);
  48. new djura = random(sizeof(gZatvorSpawn));
  49. JBC_SetPlayerPos(i, gZatvorSpawn[djura][0], gZatvorSpawn[djura][1], gZatvorSpawn[djura][2]);
  50. PI[pJailed] = 1;
  51. SetPlayerVirtualWorld(i, 1);
  52. JBC_ResetPlayerWeapons(i);
  53. PI[pJailTime] += 300;
  54. }
  55. //POREZ
  56. new vdracun;
  57. new gdracun;
  58. new ebill;
  59. new interest;
  60. if(PI[pPhousekey] != 2555)
  61. {
  62. ovobrate += 100 + random(50);
  63. }
  64. if(PI[pPbiskey] != 255)
  65. {
  66. ovobrate += 100 + random(50);
  67. }
  68. if(PI[pPstankey] != 255)
  69. {
  70. ovobrate += 100 + random(50);
  71. }
  72. PI[pAccount] -= ovobrate;
  73. SCMF(i, -1, "** Vas ukupan porez je: $%d, taj novac vam je oduzet iz banke!",ovobrate);
  74. ovobrate = 0;
  75. //KREDIT PODIGNUT
  76. if(PI[pBankKredit] > 0)
  77. {
  78. new rand = random(200)+1000;
  79. PI[pAccount] -= rand;
  80. SCMF(i, -1, " Oduzeto vam je iz banke $%d, jer ste dizali kredit.",rand);
  81. SCMF(i, -1, " Da bi podigli novi kredit, morate prvo otplatiti ovaj.");
  82. PI[pBankKredit] -= rand;
  83. }
  84. if(PI[pPayDay] >= 5)
  85. {
  86. Tax += TaxValue;//Should work for every player online
  87. PI[pAccount] -= TaxValue;
  88. if(PI[pAccount] > 0)
  89. {
  90. new randovann = random(300)+300;
  91. interest = randovann;
  92. PI[pExp]++;
  93. PlayerPlayMusic(i);
  94. PI[pAccount] += interest;
  95.  
  96. new smrdic1[256];
  97. new smrdic[513];
  98. new stringpl[64];
  99. format(smrdic1,256,"{00FFEE}Stecen Interes: {FFFFFF}$%d\n{00FFEE}Racun za struju: {FFFFFF}$%d\n{00FFEE}Racun za vodu: {FFFFFF}$%d\n{00FFEE}Racun za komunalije: {FFFFFF}$%d\n{00FFEE}Porez na imovinu: {FFFFFF}$%d\n",interest,ebill,vdracun,gdracun,ovobrate);
  100. format(smrdic,sizeof(smrdic),"%s",smrdic1);
  101. format(stringpl, sizeof(stringpl), "~y~PayDay");
  102. SPD(i,6,DIALOG_STYLE_MSGBOX," IZVESTAJ NARODNE BANKE",smrdic,"OK","");
  103. GameTextForPlayer(i, stringpl, 5000, 1);
  104. PI[pPayCheck] = 0;
  105. PI[pConnectTime]++;
  106. }
  107. else
  108. {
  109. SendClientMessage(i, COLOR_WHITE, "* Niste igrali dovoljno dugo da biste dobili platu.");
  110. }
  111. new nxtlevel = PI[pLevel]+1;
  112. new expamount = nxtlevel*levelexp;
  113. new infostring[128];
  114. if (PI[pExp] >= expamount)
  115. {
  116. PI[pLevel]++;
  117. PI[pExp] = 0;
  118. PI[gPupgrade] = PI[gPupgrade]+2;
  119. new rucakxd[300];
  120. format(rucakxd, sizeof(rucakxd), "~g~LEVEL UP~n~~w~Sada si level %d !", nxtlevel);
  121. GameTextForPlayer(i, rucakxd, 5000, 1);
  122. format(infostring, 256, "[ LEVEL UP ] Sada ste level %d. Cestitamo!", nxtlevel);
  123. SendClientMessage(i, COLOR_RED, infostring);
  124. format(infostring, 256, "Imate %d nepotrosenih Upgrade Poena",PI[gPupgrade]);
  125. SendClientMessage(i, BELA, infostring);
  126. SetPlayerScore(i, PI[pLevel]);
  127. }
  128. }
  129. if(PI[pVip] == 4 || PI[pOSC] >= 1)
  130. {
  131. PI[pExp]++;
  132. }
  133. if(PI[pOSC] > 0)
  134. {
  135. SCM(i, BELA, " Ti si administrator i dobio si 2000$ na bankovni racun !");
  136. PI[pAccount] += 2000;
  137. }
  138. if(PI[pHelper] > 0)
  139. {
  140. SCM(i, BELA, " Ti si helper i dobio si 1500$ na bankovni racun !");
  141. PI[pAccount] += 1500;
  142. }
  143. if(PI[pOSC] < 1 && PI[pMember] > 0)
  144. {
  145. SCM(i, BELA, " Ti si clan organizacije i dobio si 300$ na bankovni racun !");
  146. PI[pAccount] += 300;
  147. }
  148. if(PI[pOSC] < 1 && PI[pLeader] > 0)
  149. {
  150. SCM(i, BELA, " Ti si lider organizacije i dobio si 500$ na bankovni racun !");
  151. PI[pAccount] += 500;
  152. }
  153. }
  154. }
  155. }
  156. SaveAccounts();
  157. return 1;
  158. }
Advertisement
Add Comment
Please, Sign In to add comment