Skocz do zawartości

Witamy w Nieoficjalnym polskim support'cie AMX Mod X

Witamy w Nieoficjalnym polskim support'cie AMX Mod X, jak w większości społeczności internetowych musisz się zarejestrować aby móc odpowiadać lub zakładać nowe tematy, ale nie bój się to jest prosty proces w którym wymagamy minimalnych informacji.
  • Rozpoczynaj nowe tematy i odpowiedaj na inne
  • Zapisz się do tematów i for, aby otrzymywać automatyczne uaktualnienia
  • Dodawaj wydarzenia do kalendarza społecznościowego
  • Stwórz swój własny profil i zdobywaj nowych znajomych
  • Zdobywaj nowe doświadczenia

Dołączona grafika Dołączona grafika

Guest Message by DevFuse
 

Zdjęcie

[forums.alliedmods.net] [ND] Commander Restrictions


  • Nie możesz napisać tematu
  • Zaloguj się, aby dodać odpowiedź
Brak odpowiedzi do tego tematu

#1 Adminek AMXX.PL

    Admin :)

  • Bot

Reputacja: 156
Profesjonalista

  • Postów:7 489
  • Lokalizacja:AMXX.PL
Offline

Napisano 01.05.2012 03:35

This plugin blocks the command "applyforcommander" if the client's level is not between a minimum and maximum. It does not interfere with the promote command from Commander Management.

Cvars:
  • sm_com_restrictions | Default = 0 | "Enables/Disables ND Commander Restrictions"
  • sm_com_min_level | Default = 1 | "Minimum level allowed to apply for commander."
  • sm_com_max_level | Default = 60 | "Maximum level allowed to apply for commander."
  • sm_com_restrict_time | Default = 60 | "Number of seconds after round start remove restrictions. [0 == Never Remove]" This exists in case no one on [min,max] applies for commander. If set greater than 0, the restrictions will be removed after t seconds.
Known Issues:
  • Players must have spawned at least once before they can apply. I don't see any way around this since levels are not loaded until they have spawned.
  • Spam clicking apply would cause "ND_GetPlayerRank" to crash, so I added a 1.5 second timer to prevent it from restarting while the previous instance has not yet finished running. Unfortunately, this means that all clients cannot apply within 1.5 seconds of each other, so if you can think of a better way to code this, please let me know.
Special thanks to psychonic for helping me retrieve players' ranks.

Attached Files Dołączona grafika commander_restrictions.smx (5.0 KB) Dołączona grafika Get Plugin or Get Source (commander_restrictions.sp - 4.3 KB)

Wyświetl pełny artykuł




Użytkownicy przeglądający ten temat: 0

0 użytkowników, 0 gości, 0 anonimowych