Skocz do zawartości

Nowy szablon forum

mygo.pl

Stworzyliśmy dla Was nowy wygląd forum. Z pewnością znajdziesz rzeczy, które wg Ciebie mogą zostać zmienione - wspomnij o tym w specjalnym wątku.

Czytaj więcej

Jak założyć własną sieć

serwerów CS

Zastanawiasz się nad prowadzeniem własnej sieci serwerów? Przeczytaj podstawowe informacje, na które należy zwrócić uwagę, przy takim projekcie.

Czytaj więcej

Tworzymy spis sieci

dodaj swoją

Dodaj sieć do której należysz, pozwoli to na promocję i budowę ogólnopolskiej bazy sieci CS.

Czytaj więcej

Chris's simple anti-afk plugin


MYGO.pl
 Udostępnij

Rekomendowane odpowiedzi

  • RSSy
Hey, after looking at the anti-afk plugins and noticing that most have tons of extra bloat and unneed code when most of their functionality is already built into the game. I have developed this anti-afk plugin.

It works pretty simply, when a player leaves the buyzone the server calls the event "exit_buyzone"
we store this value in the bool "left_buyzone" then when the buytime ends. Any players who haven't left the buyzone at least once will be moved to spectator. this plugin does not kick players as there already exists settings to kick spectators after a specific amount of time.

note: this only works for game types that the players can buy items in.

there are no CVars required for this plugin as it only uses in-game functions.

I have included the source code for this plugin if you wish to modify it in anyway.

Enjoy!

Attached Files
File Type: sp Get Plugin or Get Source (chris's afk manager.sp - 1.7 KB)
File Type: smx chris's afk manager.smx (3.5 KB)

Wyświetl pełny artykuł

Odnośnik do komentarza
Udostępnij na innych stronach

Gość
Ten temat został zamknięty. Brak możliwości dodania odpowiedzi.
 Udostępnij

×
×
  • Dodaj nową pozycję...