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

look into plugins flags


Post New Thread Reply   
 
Thread Tools Display Modes
the_unknown
BANNED
Join Date: May 2010
Old 08-30-2010 , 11:51   Re: look into plugins flags
Reply With Quote #11

Oh i see, Can i change the flags of super advanced commands or override them?

example:
Code:
    RegAdminCmd("sm_disarm",    Command_Disarm,        ADMFLAG_GENERIC,    "Disarm target");
    RegAdminCmd("sm_melee",        Command_Melee,        ADMFLAG_BAN,        "Remove all weapons, except melee weapon");
    RegAdminCmd("sm_equip",        Command_Equip,        ADMFLAG_BAN,        "Remove all weapons, and give this weapon for all");
    RegAdminCmd("sm_bury",        Command_Bury,        ADMFLAG_KICK,        "Bury target");
    RegAdminCmd("sm_unbury",    Command_Unbury,        ADMFLAG_KICK,        "Unbury target");
    RegAdminCmd("sm_hp",        Command_HP,            ADMFLAG_KICK,        "Set target's health points");
    RegAdminCmd("sm_armour",    Command_Armour,        ADMFLAG_KICK,        "Set target's armour");
    RegAdminCmd("sm_give",        Command_Give,        ADMFLAG_BAN,        "Give item to target");
    RegAdminCmd("sm_speed",        Command_Speed,        ADMFLAG_BAN,        "Set target's speed");
    RegAdminCmd("sm_frags",        Command_Frags,        ADMFLAG_BAN,        "Change target's frags");
    RegAdminCmd("sm_deaths",    Command_Deaths,        ADMFLAG_BAN,        "Change target's deaths");
    RegAdminCmd("sm_balance",    Command_Balance,    ADMFLAG_GENERIC,    "Balance teams");
    RegAdminCmd("sm_shuffle",    Command_Shuffle,    ADMFLAG_KICK,        "Shuffle players");
    RegAdminCmd("sm_exec",        Command_Exec,        ADMFLAG_BAN,        "Execute command on target");
    RegAdminCmd("sm_fexec",        Command_FExec,        ADMFLAG_BAN,        "Fake-execute command on target");
    RegAdminCmd("sm_getloc",    Command_Location,    ADMFLAG_BAN,        "Print location");
    RegAdminCmd("sm_saveloc",    Command_SaveLoc,    ADMFLAG_BAN,        "Save location");
    RegAdminCmd("sm_teleport",    Command_Teleport,    ADMFLAG_BAN,        "Teleport target");
    RegAdminCmd("sm_god",        Command_God,        ADMFLAG_BAN,        "Set target's godmode state");
    RegAdminCmd("sm_rr",        Command_RR,            ADMFLAG_CHANGEMAP,    "Restart round");
    RegAdminCmd("sm_extend",    Command_Extend,        ADMFLAG_CHANGEMAP,    "Extend map");
    RegAdminCmd("sm_shutdown",    Command_Shutdown,    ADMFLAG_ROOT,        "Shutdown server");
    RegAdminCmd("sm_showmotd",    Command_MOTD,        ADMFLAG_GENERIC,    "Show MOTD for target");
    RegAdminCmd("sm_url",        Command_Url,        ADMFLAG_GENERIC,    "Open URL for target");
    RegAdminCmd("sm_getmodel",    Command_GetModel,    ADMFLAG_BAN,        "Get target's model name");
    RegAdminCmd("sm_drop",        Command_Drop,        ADMFLAG_KICK,        "Drop target's weapon");
    RegAdminCmd("sm_dropslot",    Command_DropSlot,    ADMFLAG_KICK,        "Drop target's weapon from slot");
    RegAdminCmd("sm_spec",        Command_Spec,        ADMFLAG_KICK,        "Move target to spectator");
    RegAdminCmd("sm_teamswap",    Command_TeamSwap,    ADMFLAG_KICK,        "Swap teams");
    RegAdminCmd("sm_team",        Command_Team,        ADMFLAG_KICK,        "Set target's team");
    RegAdminCmd("sm_swap",        Command_Swap,        ADMFLAG_KICK,        "Swap target's team");
    RegAdminCmd("sm_lswap",        Command_LSwap,        ADMFLAG_KICK,        "Swap target's team later");
    RegAdminCmd("sm_exch",        Command_Exchange,    ADMFLAG_KICK,        "Exchange targets in teams");
    RegAdminCmd("sm_lexch",        Command_LExchange,    ADMFLAG_KICK,        "Exchange targets in teams later");
Most of the commands use all the same flags

Code:
"Groups"
{

    "group1"
    
"flags"        "abcdbjk"
    {
        Overrides
        {
            "sm_admin"        "allow" // This give admin menu
            "sm_mute"        "allow"
            "sm_gag"        "allow"
            "sm_silence"            "allow"
            "sm_unmute"        "allow"
            "sm_ungag"        "allow"
            "sm_unsilence"          "allow"
        }
    }
}
Would they only get commands from there or other commands

Code:
Overrides
{
    /**
    * I erased instructions from here
    */

    "sm_mute"           "b"
    "sm_gag"            "b"
    "sm_silence"        "b"
    "sm_unmute"         "b"
    "sm_ungag"          "b"
    "sm_unsilence"      "b"
}

Last edited by the_unknown; 08-30-2010 at 12:34.
the_unknown is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 08-30-2010 , 16:45   Re: look into plugins flags
Reply With Quote #12

Quote:
Originally Posted by Bacardi View Post
Did I succeed about this ?
Never


Quote:
Originally Posted by the_unknown View Post
Oh i see, Can i change the flags of super advanced commands or override them?
Most of the commands use all the same flags
YES




Quote:
Originally Posted by the_unknown View Post
Code:
"Groups"
{

    "group1"
    { ◄= Right, flags inside group
"flags"        "abcdbjk" 
    { ◄= WRONG
        Overrides
        {
            "sm_admin"        "allow" // This give admin menu
            "sm_mute"        "allow"
            "sm_gag"        "allow"
            "sm_silence"            "allow"
            "sm_unmute"        "allow"
            "sm_ungag"        "allow"
            "sm_unsilence"          "allow"
        }
    }
}
You don't need override those commands because you give flags b(generic) and j(chat) what handle these same commands.
Given flag b, they can open admin menu type in console sm_admin and use all commands what are added in flag
ADMFLAG_GENERIC
Given flag j, they can use commands mute gag silence and all other commands what have added in flag
ADMFLAG_CHAT from menu or through console.
Remove flag b and j from group, they can use override commands.


Would they only get commands from there or other commands I didn't understand

Code:
Overrides
{
    /**
    * I erased instructions from here
    */

    "sm_mute"           "b"
    "sm_gag"            "b"
    "sm_silence"        "b"
    "sm_unmute"         "b"
    "sm_ungag"          "b"
    "sm_unsilence"      "b"
}
Ok if you use this, then don't use that admin group above !!! to make this clear.
You give this flag b to admin or group, they get those mute gag silence from overrides and all other commands what are added in
ADMFLAG_GENERIC
Bacardi is offline
the_unknown
BANNED
Join Date: May 2010
Old 08-30-2010 , 22:10   Re: look into plugins flags
Reply With Quote #13

this is admin_groups.cfg but has overrides in it?

Code:
"Groups"
{

    "group1"
     
"flags"        "abcdk" 
    
        Overrides
        {
            "sm_admin"        "allow" // This give admin menu
            "sm_mute"        "allow"
            "sm_gag"        "allow"
            "sm_silence"            "allow"
            "sm_unmute"        "allow"
            "sm_ungag"        "allow"
            "sm_unsilence"          "allow"
        }
}
Like that.

for overrides i just put b as example

Code:
Overrides
{
    /**
    * I erased instructions from here
    */

    "sm_teleport"           "c"
    "sm_respawn"            "c"
    "sm_cash"        "c"
    "sm_teamswitch"         "c"
}
and those 4 commands are from advanced commands 0.14

so there flag in general is ADMFLAG_CUSTOM4 and i override them to c flag?

lol trying to get how this override stuff works.
the_unknown is offline
anna575
Junior Member
Join Date: Aug 2010
Old 08-31-2010 , 06:25   Re: look into plugins flags
Reply With Quote #14

Hey Really Brilliant thanks ferret for another fast response
anna575 is offline
the_unknown
BANNED
Join Date: May 2010
Old 08-31-2010 , 11:52   Re: look into plugins flags
Reply With Quote #15

Code:
"Groups"
{

    "group1"
     
"flags"        "abcdk" 
    
        Overrides
        {
            "sm_admin"        "allow" // This give admin menu
            "sm_mute"        "allow"
            "sm_gag"        "allow"
            "sm_silence"            "allow"
            "sm_unmute"        "allow"
            "sm_ungag"        "allow"
            "sm_unsilence"          "allow"
        }
}
doesnt seem to work.

or the configs i posted even right.
the_unknown is offline
Bloodlvst
Senior Member
Join Date: Jul 2007
Old 09-04-2010 , 18:38   Re: look into plugins flags
Reply With Quote #16

Thanks a ton Bacardi, you've been of the utmost help.
__________________
Quote:
skywalker: I have cs source client 5 how to upgrade to client 7
BAILOPAN: oh
Bloodlvst is offline
hobart
Member
Join Date: Dec 2011
Old 05-29-2012 , 00:04   Re: look into plugins flags
Reply With Quote #17

Does anyone know how to limit something in either the groups.cfg or overrides where something like this is disabled, sm_noclip <#userid|name> yet allow sm_noclip @me ? Ive been thumping my head for over a month now trying to figure this out and have tried many arrangements in both files without success. Any help is greatly appreciated.
hobart is offline
minimoney1
SourceMod Donor
Join Date: Dec 2010
Old 05-29-2012 , 00:45   Re: look into plugins flags
Reply With Quote #18

Nope, see this thread for more information and a snippet that lets you do noclip @me only.
minimoney1 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 19:18.


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