Skocz do zawartości

  • Zaloguj korzystając z Facebooka Zaloguj korzystając z Twittera Zaloguj przez Steam Zaloguj poprzez Google      Logowanie »   
  • Rejestracja

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

[Any] Session Flags


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

Napisano 29.08.2014 23:17

<p>

[TF2] Session Flags
v. 14.0829.0
"Selling noclip 4 1 rec hurhurhur"

This plugin provides one command, sm_flags, with a default access requirement of ROOT, which can be used to temporarily customize a client's access flags for the duration of their connection to the server. This plugin is loosely based off of Niggy's Session Flags.



Command Usage:


Spoiler


The syntax of the command is as follows:



Code: sm_flags &lt;target&gt; &lt;+/-/%/=/_&gt; &lt;flags&gt;
  • The first argument is simply the clients that you want to use the command on. The plugin uses ProcessTargetString, and therefore supports targeting by name, SteamID, userID, @all, @!me, etc.
  • The second argument is the operator. This tells the plugin what you want to do with the specified flags. More on this later. If you skip this argument and go right on to the third one, the plugin will assume that you meant to put a + symbol.
  • The third argument is simply a list of flags that you want to affect. With one exception, the command user can never affect a flag that he himself does not have access to, nor can he target those with a higher immunity. (Of course, root users are considered to have all flags and are always exempt from immunity restrictions.) Rather than type out all 21 flag letters, you can type the @ symbol here to quickly indicate that you wish to affect all flags.
The operators function as follows:
  • + adds the flags specified. For example, if someAdmin used this command:

    Code: sm_flags somePlayer + abcdefgThe above command would give the somePlayer player the a, b, c, d, e, f, and g flags. If somePlayer already had one of those flags, that flag is not touched. Further, if the command user doesn't himself have access to one of those flags, then the flag will not be changed for somePlayer.

    If you leave off the operator from the command, and instead put flags right after the target argument, the plugin will assume that you want to add flags.

  • - removes the flags specified. For example:

    Code: sm_flags somePlayer - @The above command would remove all flags from somePlayer, leaving him with no flags. If somePlayer had flags that someAdmin did not, somePlayer will keep those flags.

  • % toggles the flags specified. For example:

    Code: sm_flags somePlayer % opqrstThe above command would toggle all the CUSTOM# flags on somePlayer. The flags he had, he will no longer have, and he will gain the flags he did have. If someAdmin did not have access to one of these flags, then that flag will not be changed for somePlayer.

  • = sets the flags on the target user to whatever has been specified. For example:

    Code: sm_flags somePlayer = aopqrstThe above command would first remove all flags from somePlayer that someAdmin also had access to, and then give somePlayer the reserved slot and all CUSTOM# flags, assuming that someAdmin also had access to these flags.

    When using this operator, putting "0" for the flags will indicate that you want to remove all flags; this is the same as using @ with -

  • _ resets the flags on the target user to how they were just before this command was first used on them.

    For example, let's say that somePlayer joins the server with the flags "abcopqr". Whenever any admin uses one of the previous operators on somePlayer, the plugin will save his "real" flags before changing them. Let's say that admins had somehow used any combination of the previous operators to remove all flags but 'a' from him, and then give him 's' and 't'.


    Code: sm_flags somePlayer = astThe following command would restore somePlayer's flags to "abcopqr".


    Code: sm_flags somePlayer _ @Similarly, running the following command instead would remove only the 's' flag, and restore somePlayer's access to the 'b' flag.


    Code: sm_flags somePlayer _ bsIf, and only if, someAdmin has access to the override sm_sessionflags_reset, he can use the _ operator to reset flags that he himself does not have access to. By default, this feature is basically disabled, as the override defaults to ROOT access.

    If this command is used (through ANY operator) to change a player's flags, and his flags end up matching what was saved as his "real" flags, then the plugin will "forget" that his flags were ever changed at all. This will allow other plugins to change flags without too much conflict.

CVARS, shown with default values:
  • sm_sessionflags_logging 2 - Controls how command usage is logged.
    • 0 : Completely disables logging.
    • 1 : Enables basic logging. If targeting a single player, the logs will show detailed information about what changes were made to that player's flags. If multiple players were targeted, this information is not shown.
    • 2 : Enables verbose logging. The logs will show a seperate line for each player who had their flags changed, with information about what flags were changed.
  • sm_sessionflags_update 2 - Controls Updater compatibility
    • 0 : Completely disables Updater integration
    • 1 : Updater will notify you in Updater.log if an update becomes available.
    • 2 : Updater will automatically download any updates. They will be installed on the next server start or map change.
    • 3 : Updater will automatically download and immediately install any updates. This WILL interfere with the _ operator, as all players' saved flags will be cleared!
Installation:

To install, simply ensure that your Sourcemod installation is up to date, and place the attached SMX in your plugins folder.

Please also consider installing Updater. This will let you automatically keep your plugins up-to-date.

Compiling:

The plugin requires custom includes. As such, it does not compile here on the forums. Includes required to compile the plugin are:

Changelog


Spoiler

  • 2013-11-30 - Original version posted by NIGathan
  • 14.0829.0 - Initial release, first post of this thread.



If you like what you see here, please consider donating~
Dołączona grafika

Be aware that the "views" totals on the attached files only reflect the current version of the file in question.

Attached Files Dołączona grafikasessionflags.smx (8.6 KB) Dołączona grafikaGet Plugin or Get Source (sessionflags.sp - 10.7 KB)

Wyświetl pełny artykuł




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

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