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

[TF2] Vote Respawn Times


MYGO.pl
 Udostępnij

Rekomendowane odpowiedzi

  • RSSy
Description

Allow players to vote whether to enable/disable default respawn times.

This plugins works around "mp_disable_respawn_times". Players can initiate a vote typing !voterespawn (also /voterespawn) in the chat to change the current value.
If enough people vote "Yes", the value will change. If not, well, guess what happens... XD

There is a cooldown between each vote, so people cant' spam it, but you can manage the cooldown time using a cvar.

This plugin uses NativeVotes, by Powerlord. If you don't have NativeVotes installed, you should still be able to use the plugin, using the "classic" voting interface that SourceMod has.


CVars
  • sm_voterespawn_cooldown - Sets the cooldown time, in seconds, before another vote can take place. (Default: 300).

To Do
  • Make the "sm_voterespawn_enabled" cvar work, so you can enable/disable the plugin on the fly.
  • Add a cvar to decide which minimum percentage of votes you need for the vote to pass.


The plugin also has translation files, currently, just English and Spanish.


This is my first plugin from scratch. I took inspiration from code by Powerlord (NativeVotes) and Seb3pg (TF2 Vote Scramble).
I'm aware that the code may have some mistakes and it may not be the most optimal, so feel free to criticize, but in a constructive way, please. :)

Attached Files
File Type: sp Get Plugin or Get Source (VoteRespawn.sp - 7.9 KB)
File Type: smx VoteRespawn.smx (9.5 KB)
File Type: txt voterespawn.phrases.txt (2.0 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ę...