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] [Any] Limit Ban Duration


  • 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 476
  • Lokalizacja:AMXX.PL
Offline

Napisano 21.04.2012 03:45

Requirements:Description:
  • If you've ever needed to restrict the time a player can ban for using sm_ban, this plugin is for you! As the plugin name entails, this provides the ability to restrict players from using ban lengths based on overrides/flags.
  • Note: Please note that due to the nature of the plugin, extensive testing is unfeasible. While initial tests ran fine and no errors occurred, I cannot guarantee this plugin is 100% bug free until I'm able to see it in action for an extended period of time.
Features:
  • Provides a command listener for the sm_ban command that supporting both SourceMod's default sm_ban as well as SourceBans.
  • The provided configuration file allows you to define your own ban lengths (in minutes), and restrict them to custom overrides/flags.
  • Using the feature sm_limit_ban_duration_reduce, ban lengths that are above what an admin has access to will automatically be lowered to the closest ban length that they do possess.
    • This feature will also take a permanent punishment and lower it to the highest length the admin has, if the admin doesn't have perm access.
  • Using the feature sm_limit_ban_duration_maximum, admins will not be able to ban for any longer than the highest defined entry in the configuration file.
    • For example, if this is enabled with the default configuration, a player may not ban for more than 4 weeks, aside from permanently.
    • This feature can be combined with sm_limit_ban_duration_reduce to automatically lower a ban length to the maximum allowed.
  • If a user tries to issue a ban and doesn't have permission to use any defined lengths, the plugin will simply tell them they do not have access to the command.
ConVars:
  • sm_limit_ban_duration_enabled - Enables/disables all features of this plugin.
  • sm_limit_ban_duration_reduce - If enabled, the plugin will lower ban lengths if an admin doesn't have access to their specified length to a length they do possess.
  • sm_limit_ban_duration_maximum - If enabled, the highest entry defined in the plugins configuration file will be the highest amount any admin can ban for.
Installation:
  • /sourcemod/scripting/sm_limit_ban_duration.sp
  • /sourcemod/plugins/sm_limit_ban_duration.smx
  • /sourcemod/translations/sm_limit_ban_duration.phrases.txt
  • /sourcemod/configs/sm_limit_ban_duration.ini
Pre-Download Config Example:

Spoiler



PHP Code:

"Limit_Ban_Durations"
{
"5"
{
"override" ""
"flags" ""
}
"60"
{
"override" "Basic_Admin"
"flags" "b"
}
"180"
{
"override" ""
"flags" ""
}
"720"
{
"override" "High_Admin"
"flags" "e"
}
"1440"
{
"override" "High_Admin"
"flags" "e"
}
"0"
{
"override" "Limit_Perm_Ban"
"flags" "z"
}
}



Attached Files Dołączona grafika Get Plugin or Get Source (sm_limit_ban_duration.sp - 10.9 KB) Dołączona grafika sm_limit_ban_duration.phrases.txt (856 Bytes) Dołączona grafika sm_limit_ban_duration.ini (2.5 KB) Dołączona grafika sm_limit_ban_duration.smx (9.1 KB)

Wyświetl pełny artykuł




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

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