Raised This Month: $32 Target: $400
 8% 

Override command for a flag with value.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Terminatorr
Member
Join Date: Dec 2018
Old 12-12-2018 , 10:25   Override command for a flag with value.
Reply With Quote #1

Hey guys, according to sourcemode docs i will just need to modify admin_overrides.cfg with command name and flag,
like
PHP Code:
Overrides
{
    
"[name1]"    "[flags]"
    "@[group1]"    "[flags]"
    
/* ... */

i tried this ;
PHP Code:
Overrides
{
    
/**
     * By default, commands are registered with three pieces of information:
     * 1)Command Name         (for example, "csdm_enable")
     * 2)Command Group Name    (for example, "CSDM")
     * 3)Command Level        (for example, "changemap")
     *
     * You can override the default flags assigned to individual commands or command groups in this way.
     * To override a group, use the "@" character before the name.  Example:
     * Examples:
     *        "@CSDM"            "b"                // Override the CSDM group to 'b' flag
     *         "csdm_enable"    "bgi"            // Override the csdm_enable command to 'bgi' flags
     *
     * Note that for overrides, order is important.  In the above example, csdm_enable overwrites
     * any setting that csdm_enable previously had.
     *
     * You can make a command completely public by using an empty flag string.
     */

     
"sv_enablebunnyhopping 1" "o"
     "sv_autobunnyhopping 1" "o"
          "sv_maxspeed 400"  "o"


expected result;
any player with flag o, can have bhop enabled and run or walk speed increased.
result;
nothing changes at all.
am i doing it wrong?

second question , according to docs too, in order to add a menu item to admin menu, i would modify the adminmenu_custom.txt
i tried ;
PHP Code:
"Commands"
{
    
"ServerCommands"
    
{
        
"Execute My Cvars"
        
{
            
"admin"        "root"
            "cmd"        "sv_enablebunnyhopping 1"
            "execute"    "server"
        
}
    }

expected result;
new admin menu item that enables bhop,
actual result;
no item at all.
am i doing it wrong? advice please.
Terminatorr is offline
Mitchell
~lick~
Join Date: Mar 2010
Old 12-12-2018 , 10:37   Re: Override command for a flag with value.
Reply With Quote #2

Those aren't commands, they are server convars, admins wouldn't be able to modify them without sm_cvar or sm_rcon
Mitchell is offline
Terminatorr
Member
Join Date: Dec 2018
Old 12-12-2018 , 10:39   Re: Override command for a flag with value.
Reply With Quote #3

Quote:
Originally Posted by Mitchell View Post
Those aren't commands, they are server convars, admins wouldn't be able to modify them without sm_cvar or sm_rcon
Hey, thanks for the reply, i had two questions, which one you referring to?
it would be nice if you could provide an example.
Terminatorr is offline
Mitchell
~lick~
Join Date: Mar 2010
Old 12-12-2018 , 11:17   Re: Override command for a flag with value.
Reply With Quote #4

Both sort of.
"sv_enablebunnyhopping 1" "o"
"sv_autobunnyhopping 1" "o"
"sv_maxspeed 400" "o"
Are all server convars, commands will usually start with "sm_" or if a plugin defines a different prefix, I don't think you can use overrides for non-sm related commands.

I think you're looking for a way for admins to specifically set a convar without the ability to use sm_cvar or sm_rcon right?
Mitchell is offline
Terminatorr
Member
Join Date: Dec 2018
Old 12-12-2018 , 11:28   Re: Override command for a flag with value.
Reply With Quote #5

First q is about having predefined vars for flag only where other flags or other player will not have.
Second q could be sm_reloadtags of tags plugin. Adding an entry to admin menu to trigger that command.
Now i do not know about if i need rcon or sm_var or will not need them. I just wish to get it work that way if possible.
Terminatorr 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 06:03.


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