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

Source Timed Command Looper


MYGO.pl
 Udostępnij

Rekomendowane odpowiedzi

  • RSSy
Uh hey, guys! :?
How you all doing?
Anyways this is my first plugin so try to be a little nice! :lol:
Simply put this command will loop a given command every given minute(s), currently, if you attempt to loop another command it will override the first looped command, I did look around before making this and saw nothing of the sort and I kinda needed it. If it is out there and does exist I'd like to see it.

I have occasional crashes on my TF2 server due to running out of edicts and so I devised this plugin to remove Skeleton/Zombie entities from the game every three hours or so, I'm sure it can have other uses as well, so I figured I'd release it as my first plugin.

Anyways!!
USAGE:
sm_loop <time in minutes, 60 would be every hour> <Commands>
Example:
sm_loop 0.5 "sm_slay @all" <-- Will kill everyone every 30seconds until the loop is shut down.
If you need to use "" in your commands you can do so with '' for example:
sm_loop 0.5 "sm_slay 'Some Random Dude'"

Stopping the loop:
If you are like me then you're quick to forget specific commands so I made a variety for stopping the loop if you need to in a pinch.
sm_sl
sm_stoploop
sm_loopstop
sm_loopno
sm_ls
sm_noloop
sm_endloop
sm_loopend
^These all do as they say and will stop the command from looping^
If you stop the loop mid-timer of the command it will still execute the command once before finally stopping.

Of course, use this with care any situation involving a never-ending loop could be considered dangerous and I don't want you guys ruining your servers, just remember to give the command some decent time so you're not spamming.

This should work on any game as it doesn't use any game-specific code, however, I have only tested it on TF2, I do have some plans for the future including the addition of a text file containing numerous pre-determined commands that will also run with timers between them.

Attached Files
File Type: sp Get Plugin or Get Source (CommandLooper.sp - 2.4 KB)

Wyświetl pełny artykuł

Odnośnik do komentarza
Udostępnij na innych stronach

Jeśli chcesz dodać odpowiedź, zaloguj się lub zarejestruj nowe konto

Jedynie zarejestrowani użytkownicy mogą komentować zawartość tej strony.

Zarejestruj nowe konto

Załóż nowe konto. To bardzo proste!

Zarejestruj się

Zaloguj się

Posiadasz już konto? Zaloguj się poniżej.

Zaloguj się
 Udostępnij

  • Ostatnio przeglądający   0 użytkowników

    • Brak zarejestrowanych użytkowników przeglądających tę stronę.
×
×
  • Dodaj nową pozycję...