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

Set flag for access to plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
M3Power
Member
Join Date: Apr 2017
Old 04-06-2017 , 14:10   Set flag for access to plugin
Reply With Quote #1

Hello,

I'd like to ask how to set flag for some admin without a flag "z" so he cannot acces to certain plugins.
For example yesterday I've installed Weapon Restrict plugin ( https://forums.alliedmods.net/showthread.php?p=950174 ) and I'd like it to be only for admins with flag "z" (root admins). But now all my admins can access to this plugin as you can see on the image admins without "z" flag has admin menu like this

So, I'd like that only admins with "z" (root admins) have that option (6. Weapon Restrict Commands) in Admin Menu and generally.

Kind regards.

Last edited by M3Power; 04-06-2017 at 14:10.
M3Power is offline
ambn
Veteran Member
Join Date: Feb 2015
Location: Fun servers
Old 04-06-2017 , 14:56   Re: Set flag for access to plugin
Reply With Quote #2

Use admin_overrides.cfg
__________________
ambn is offline
M3Power
Member
Join Date: Apr 2017
Old 04-06-2017 , 16:23   Re: Set flag for access to plugin
Reply With Quote #3

Quote:
Originally Posted by ambn View Post
Use admin_overrides.cfg
There is a lot of commands I would need to override for that plugin then.
Is there any other way than this?

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.
     */
}
What to write in here to make that plugin ( https://forums.alliedmods.net/showthread.php?t=105219 ) work for "z" flag only?
M3Power is offline
WildCard65
Veteran Member
Join Date: Aug 2013
Location: Canada
Old 04-06-2017 , 16:32   Re: Set flag for access to plugin
Reply With Quote #4

Quote:
Originally Posted by M3Power View Post
There is a lot of commands I would need to override for that plugin then.
Is there any other way than this?

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.
     */
}
What to write in here to make that plugin ( https://forums.alliedmods.net/showthread.php?t=105219 ) work for "z" flag only?
Try:
Code:
Overrides
{
    "@weapon_restrict.smx" "z"
}
If it doesn't work, try without ".smx"
__________________
WildCard65 is offline
Cooky
Veteran Member
Join Date: Jun 2010
Location: 127.0.0.1
Old 04-07-2017 , 02:25   Re: Set flag for access to plugin
Reply With Quote #5

You clearly didn't search in the plugin's topic....

Quote:
Originally Posted by Bacardi View Post
Don't give them access to use these all admin commands (or part of them):
sm_restrict
sm_unrestrict
sm_knives
sm_pistols
sm_dropc4
sm_reload_restrictions
sm_remove_restricted

Commands are flagged to "h" (cvar) expect sm_dropc4 is "d" (ban).
Cooky is offline
M3Power
Member
Join Date: Apr 2017
Old 04-07-2017 , 03:54   Re: Set flag for access to plugin
Reply With Quote #6

Quote:
Originally Posted by Cooky View Post
You clearly didn't search in the plugin's topic....
Where to find this and change to "z"?
M3Power is offline
Cooky
Veteran Member
Join Date: Jun 2010
Location: 127.0.0.1
Old 04-07-2017 , 04:00   Re: Set flag for access to plugin
Reply With Quote #7

Quote:
Originally Posted by ambn View Post
Use admin_overrides.cfg
Cooky is offline
M3Power
Member
Join Date: Apr 2017
Old 04-07-2017 , 10:02   Re: Set flag for access to plugin
Reply With Quote #8

So what to write in admin_overrides.cfg for it to be "z" flag only.

I tried to write this (also without ".smx") in admin_overrides.cfg:

Code:
Overrides 
{     
       "@weapon_restrict.smx" "z" 
}
But regular admins (admins without "z" flag) still have access to that plugin via Admin Panel.

Last edited by M3Power; 04-07-2017 at 10:04.
M3Power is offline
Cooky
Veteran Member
Join Date: Jun 2010
Location: 127.0.0.1
Old 04-07-2017 , 12:02   Re: Set flag for access to plugin
Reply With Quote #9

Quote:
Originally Posted by M3Power View Post
So what to write in admin_overrides.cfg for it to be "z" flag only.

I tried to write this (also without ".smx") in admin_overrides.cfg:

Code:
Overrides 
    {     
           "@weapon_restrict.smx" "z" 
    }
But regular admins (admins without "z" flag) still have access to that plugin via Admin Panel.
Ok, wait... I will copy/paste it again:

Quote:
Originally Posted by Bacardi View Post
Don't give them access to use these all admin commands (or part of them):
sm_restrict
sm_unrestrict
sm_knives
sm_pistols
sm_dropc4
sm_reload_restrictions
sm_remove_restricted

Commands are flagged to "h" (cvar) expect sm_dropc4 is "d" (ban).
Cooky is offline
ambn
Veteran Member
Join Date: Feb 2015
Location: Fun servers
Old 04-07-2017 , 12:32   Re: Set flag for access to plugin
Reply With Quote #10

Quote:
Originally Posted by M3Power View Post
So what to write in admin_overrides.cfg for it to be "z" flag only.

I tried to write this (also without ".smx") in admin_overrides.cfg:

Code:
Overrides 
{     
       "@weapon_restrict.smx" "z" 
}
But regular admins (admins without "z" flag) still have access to that plugin via Admin Panel.
do it like this:
Code:
Overrides 
{     
    sm_restrict        "z"
    sm_unrestrict        "z"
    sm_knives        "z"
    sm_pistols        "z"
    sm_dropc4        "z"
    sm_reload_restrictions    "z"
    sm_remove_restricted    "z"
}
__________________
ambn 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 21:18.


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