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

[CSGO] Admin privileges for VIP-plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
waldorf
Junior Member
Join Date: Mar 2020
Old 03-26-2020 , 20:32   [CSGO] Admin privileges for VIP-plugin
Reply With Quote #1

Hello guys!

As im pretty noob with things that comes to running a server, i need your help.

I recently started my first Multi1v1 Arena-server and now i would like to add some admins to run it for me.

I can add admins (or if you want to call them mods in this situation) with flags "abcdefghijk" cause i don't want them to have root-permission. I want mods to have access to vip-settings (add vips, remove vips etc.) but everytime a mod without "z" flag tries to type "!admin", it shows just basic commands, but not the "VIP-settings" section. With root access it works just fine.

I've added "ADMFLAG_GENERIC" to my VIP-plugin's adminmenu.sp file, as before it was only "ADMFLAG_ROOT", but that didn't work.

So now it's "ADMFLAG_ROOT | ADMFLAG_GENERIC"

I've also added all needed flags in VIP-plugins Cvars.sp file. No difference after all.

I also tried to add "sm_addvip" and "sm_removevip" (flagged as b) to admin overrides.

I'm using R1ko's VIP Core 3.0

I would be really grateful for some help with this. In two days i've got everything to work perfectly except for this.
waldorf is offline
headline
SourceMod Moderator
Join Date: Mar 2015
Old 03-26-2020 , 21:24   Re: [CSGO] Admin privileges for VIP-plugin
Reply With Quote #2

Using bit-wise OR only strengthens the requirement.

The root flag will always have access to everything so just set it to ADMFLAG_GENERIC

For example the following snippet will require both generic and slay privileges, not either or.
PHP Code:
RegAdminCmd("sm_test"SomeCallbackADMFLAG_GENERIC|ADMFLAG_SLAY); 

Last edited by headline; 03-26-2020 at 21:26.
headline is offline
waldorf
Junior Member
Join Date: Mar 2020
Old 03-26-2020 , 21:59   Re: [CSGO] Admin privileges for VIP-plugin
Reply With Quote #3

Quote:
Originally Posted by headline View Post
Using bit-wise OR only strengthens the requirement.

The root flag will always have access to everything so just set it to ADMFLAG_GENERIC

For example the following snippet will require both generic and slay privileges, not either or.
PHP Code:
RegAdminCmd("sm_test"SomeCallbackADMFLAG_GENERIC|ADMFLAG_SLAY); 
Ok, so i tried this.

Now i'm able to use vipadmin-menu with a "!vipadmin" command, but cant actually see it on the Admin menu without root access
waldorf is offline
headline
SourceMod Moderator
Join Date: Mar 2015
Old 03-27-2020 , 10:34   Re: [CSGO] Admin privileges for VIP-plugin
Reply With Quote #4

the plugin does not allow non-root users to access that in the top menu, as shown in the link below
https://github.com/R1KO/VIP-Core/blo...inMenu.sp#L196

Basically you're going to want to set up your admin overrides cfg file to override the following to a flag that your admins have

vip_admin, vip_add, vip_list, vip_reload_players, and vip_reload_settings

It should like something like

PHP Code:
Overrides
{
    
// Allow admins to use vip admin menu
    
"vip_admin"    "b"
    "vip_add"        "b"
    "vip_list"        "b"
    "vip_reload_players"        "b"
    "vip_reload_settings"        "b"


Last edited by headline; 03-27-2020 at 10:37.
headline is offline
waldorf
Junior Member
Join Date: Mar 2020
Old 03-28-2020 , 17:24   Re: [CSGO] Admin privileges for VIP-plugin
Reply With Quote #5

Allright.
I kinda knew that, but i tried that by editing that "ADMFLAG_ROOT" part, cause i thought that admin overrides can be used only for sm-commands.

All good, thank you big time!
waldorf is offline
Reply


Thread Tools
Display Modes

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 13:55.


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