Raised This Month: $51 Target: $400
 12% 

How to create your own flags?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Lukas320
Member
Join Date: Jan 2011
Old 02-16-2011 , 13:19   How to create your own flags?
Reply With Quote #1

Hi,

I'm trying everything to give an admin just !gag , but it never works anyone knows to fix this?

I just want a flag like p that i can use as !gag for an admin. And also how that i add my own flags.
Lukas320 is offline
BAILOPAN
Join Date: Jan 2004
Old 02-16-2011 , 16:33   Re: How to create your own flags?
Reply With Quote #2

http://wiki.alliedmods.net/Overridin...28SourceMod%29

SourceMod's admin system is based on ACLs (access control lists). Flags are convenient shorthand for preset ACLs. But you can make your own, very easily.
__________________
egg
BAILOPAN is offline
Geek_Loco
SourceMod Donor
Join Date: May 2009
Old 02-16-2011 , 16:48   Re: How to create your own flags?
Reply With Quote #3

If I understand what you are asking, I think this is what you may need to check on:

sourcemod/configs/admin_levels.cfg
Code:
        /**
         * Custom flags can be used by plugins, but they can also be used to 
         * for you to expand on the previous groups, using Overrides.
         */
        
        "custom1"        "o"
        "custom2"        "p"        // Going to use "p" for sm_gag
        "custom3"        "q"
In the file mentioned above, you really don't need to comment what you are going to use a flag for, but I do it for consistency.


sourcemod/configs/admin_overrides.cfg
Code:
    /** You can make a command completely public by using an empty flag string.
     */


//    Last Updated 2010/11/21 by Loco

    //        Enable for "General Public"    // {No Flag}

    "sm_loser"    ""        // Default = d     // Change "sm_loser" to the "" (General Public) "no" flag.

    //        Enable for "Low Admins"    // a-Reserve, b-Admin, j-Chat, k-Vote

    "sm_spawn_health"    "b"        // Default = n     // Change "sm_spawn_health" to the "b" (Admin) flag.


    //        Enable for "Basic Admins"    // a-Reserve, b-Admin, c-Kick, f-Slay, g-Changemap, h-CVars, j-Chat, k-Vote

    "sm_spawn_infected"    "c"        // Default = n    // Change "sm_spawn_infected" to the "c" (Kick) flag.
    "sm_noclip"        "c"        // Default = f|n    // Change "sm_noclip" to the "c" (Kick) flag.

    //    >>>>>    Exceptions for certain Admins    // p-Custom2

    "sm_gag"        "p"        // Default = j    // Change "sm_gag" to the "p" (Custom2) flag.
    "sm_ungag"        "p"        // Default = j    // Change "sm_ungag" to the "p" (Custom2) flag.
In the above "overrides" file, I have added some examples of changing flags for specific commands and ended the code with a couple lines that I believe pertain to what you are asking. "gag" and "ungag" by default are assigned to the "chat" flag of "j", here I am reassigning the "p" flag to them. An important note, which I plan to show in the following code example, is that this adds a complication to "normal" / non-root admins. Root admins have all flags, regular and Custom. When you change a command that belongs to "j" access, any non-Root admin that has "j" access should also be assigned the "p" flag if you want them to have access to "gag" and "ungag". If you only have a couple or a few admins, no big deal. But if you have like 20 or more admins with different levels, it may be harder to remember.

Now that we are done with the setup, now you actually make the assignments:

sourcemod/configs/admin_simple.ini
Code:
//   "BAILOPAN"            "abc"    "Gab3n"        //name BAILOPAN, password "Gab3n": gets reservation, generic, kick
//
////////////////////////////////


//    ~~~~~    "Root"        "99:z"    // z-Root = a-Reserve, b-Admin, c-Kick, d-Ban, e-UnBan, f-Slay, g-Changemap, h-CVars, i-Config, j-Chat, k-Vote, l-PasswordServer, m-RCon, n-cheats, o-, p-Custom2, q-, r-, s-, t-;

//    Big Squeegee
"STEAM_1:1:1234567"        "99:z"

//    Lil Headache
"STEAM_1:1:1111567"        "99:z"


//    ~~~~~    "Low admins"    "10:abjkp"        // a-Reserve, b-Admin, j-Chat, k-Vote, p-Custom2

//    Mr. Smeeegul        // Added on 2010/09/13, good player that donated.
"STEAM_1:0:12121212"        "10:abjkp"

//    ~~~~~    "Gag admins"    "5:p"        // p-Custom2

//    Betty White        // Added on 2011/01/16, donator.
 "STEAM_1:0:12765412"        "5:p"
 
 //    Joey BagADonuts        // Added on 2011/01/29, donator.
 "STEAM_1:0:12765432"        "5:p"
I apologize if this is not what you are asking for or if I typed anything incorrectly.

Loco
Geek_Loco is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 22:10.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode