Guest User

Untitled

a guest
Apr 27th, 2016
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.04 KB | None | 0 0
  1. forward GlobalTimer1Sec();
  2. public GlobalTimer1Sec()
  3. {
  4. for (new i = 0; i != MAX_PLAYERS; ++i)
  5. {
  6. if (IsPlayerConnected(i) && gPlayerLogged[i] == 1)
  7. {
  8. if(SefTajmer[i] > 0) SefTajmer[i]--;
  9. if(ReportTajmer[i] > 0) ReportTajmer[i]--;
  10. if(SellTajmer[i] > 0) SellTajmer[i]--;
  11. if(AccTajmer[i] > 0) AccTajmer[i]--;
  12. if(NewTajmer[i] > 0) NewTajmer[i]--;
  13. if(FindTajmer[i] > 0) FindTajmer[i]--;
  14. if(GetarmourTajmer[i] > 0) GetarmourTajmer[i]--;
  15. if(PlayerInfo[i][pRutaTime] > 0) PlayerInfo[i][pRutaTime]--;
  16. if(PlayerInfo[i][pHitTime] > 0) PlayerInfo[i][pHitTime]--;
  17. if(PlayerInfo[i][pSecretTime] > 0) PlayerInfo[i][pSecretTime]--;
  18. }
  19. if(PomocnaVarijablaPosiljka == 0) {PlayerInfo[i][pSilja] = 0;}//ako ima posiljke na doku, ako se moze puniti omoguci to svim igracima pSilja=0;
  20. }
  21. for (new i = 0; i != MAX_PLAYERS; ++i)
  22. {
  23. if (IsPlayerConnected(i))
  24. {
  25. //------------------------------------ANTI AFK----------------------------------
  26. //new CmdString[500];
  27. if(IsPlayerPausedAFK(i))
  28. {
  29. afkvreme[i] ++;
  30. new ImeRPi[MAX_PLAYER_NAME];
  31. RPGetName(i, ImeRPi);
  32. //format(CmdString, sizeof(CmdString), "PAUZIRAN: (00:%s)", KonvertujVreme(afkvreme[i]));
  33. igracafk[i] = 1;
  34. //SetPlayerChatBubble(i, CmdString, COLOR_LIGHTRED, 50.0, 100000);
  35. }
  36. else
  37. {
  38. SetPlayerChatBubble(i, " ", COLOR_WHITE, 50.0, 1);
  39. igracafk[i] = 0;
  40. afkvreme[i] = 0;
  41. }
  42. //----------------------------------ANTI AFK NA DUZNOSTI------------------------
  43. new string[256];
  44. if(gPlayerLogged[i] == 1)
  45. {
  46. if(PlayerInfo[i][pAdminLevel] == 0)
  47. {
  48. KillTimer(Dutykill[i]);
  49. }
  50. }
  51. AFK[i]++;
  52. if(AFK[i] >= 13 && AFK2[i] == 0)
  53. {
  54. AFK2
  55. [i] = 1;
  56. }
  57. if(AFK[i] > MAXAFK)
  58. {
  59. format(string, sizeof(string), "[SERVER]: %s je dobio/la kick od strane servera (neaktivnost).",GetName(i));
  60. SendClientMessageToAll(COLOR_LIGHTRED, string);
  61. KickVrijeme[i] = true;
  62. SetTimerEx("KickSacekaj", 500, false, "d", i);
  63. }
  64. }
  65. }
  66. return 1;
  67. }
Add Comment
Please, Sign In to add comment