Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- forward GlobalTimer1Sec();
- public GlobalTimer1Sec()
- {
- for (new i = 0; i != MAX_PLAYERS; ++i)
- {
- if (IsPlayerConnected(i) && gPlayerLogged[i] == 1)
- {
- if(SefTajmer[i] > 0) SefTajmer[i]--;
- if(ReportTajmer[i] > 0) ReportTajmer[i]--;
- if(SellTajmer[i] > 0) SellTajmer[i]--;
- if(AccTajmer[i] > 0) AccTajmer[i]--;
- if(NewTajmer[i] > 0) NewTajmer[i]--;
- if(FindTajmer[i] > 0) FindTajmer[i]--;
- if(GetarmourTajmer[i] > 0) GetarmourTajmer[i]--;
- if(PlayerInfo[i][pRutaTime] > 0) PlayerInfo[i][pRutaTime]--;
- if(PlayerInfo[i][pHitTime] > 0) PlayerInfo[i][pHitTime]--;
- if(PlayerInfo[i][pSecretTime] > 0) PlayerInfo[i][pSecretTime]--;
- }
- if(PomocnaVarijablaPosiljka == 0) {PlayerInfo[i][pSilja] = 0;}//ako ima posiljke na doku, ako se moze puniti omoguci to svim igracima pSilja=0;
- }
- for (new i = 0; i != MAX_PLAYERS; ++i)
- {
- if (IsPlayerConnected(i))
- {
- //------------------------------------ANTI AFK----------------------------------
- //new CmdString[500];
- if(IsPlayerPausedAFK(i))
- {
- afkvreme[i] ++;
- new ImeRPi[MAX_PLAYER_NAME];
- RPGetName(i, ImeRPi);
- //format(CmdString, sizeof(CmdString), "PAUZIRAN: (00:%s)", KonvertujVreme(afkvreme[i]));
- igracafk[i] = 1;
- //SetPlayerChatBubble(i, CmdString, COLOR_LIGHTRED, 50.0, 100000);
- }
- else
- {
- SetPlayerChatBubble(i, " ", COLOR_WHITE, 50.0, 1);
- igracafk[i] = 0;
- afkvreme[i] = 0;
- }
- //----------------------------------ANTI AFK NA DUZNOSTI------------------------
- new string[256];
- if(gPlayerLogged[i] == 1)
- {
- if(PlayerInfo[i][pAdminLevel] == 0)
- {
- KillTimer(Dutykill[i]);
- }
- }
- AFK[i]++;
- if(AFK[i] >= 13 && AFK2[i] == 0)
- {
- AFK2
- [i] = 1;
- }
- if(AFK[i] > MAXAFK)
- {
- format(string, sizeof(string), "[SERVER]: %s je dobio/la kick od strane servera (neaktivnost).",GetName(i));
- SendClientMessageToAll(COLOR_LIGHTRED, string);
- KickVrijeme[i] = true;
- SetTimerEx("KickSacekaj", 500, false, "d", i);
- }
- }
- }
- return 1;
- }
Add Comment
Please, Sign In to add comment