AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Source Servers (SRCDS) (https://forums.alliedmods.net/forumdisplay.php?f=130)
-   -   Solved remove vip from admins (https://forums.alliedmods.net/showthread.php?t=331797)

ChampMartini 04-07-2021 19:41

remove vip from admins
 
hello i use "https://github.com/SniperOO7/VIP-Premium-FULL-VERSION"
and its all working but all admins has access to vip
how do i remove their acces to vip without moving their admin?

yuv41 04-07-2021 19:48

Re: remove vip from admins
 
Line 460
return CheckCommandAccess(client, "", ADMFLAG_RESERVATION);
Change ADMFLAG_RESERVATION to the flag you want to give to vips.

ChampMartini 04-07-2021 19:57

Re: remove vip from admins
 
line 460 in what file? :D

yuv41 04-07-2021 20:00

Re: remove vip from admins
 
Quote:

Originally Posted by ChampMartini (Post 2743375)
line 460 in what file? :D

Clone the github, compile it yourself
https://github.com/SniperOO7/VIP-Pre...ium-v2-demo.sp

ChampMartini 04-07-2021 20:03

Re: remove vip from admins
 
so i can just change it to whatever i want? :D like "return CheckCommandAccess(client, "", VIP_RESERVATION)"
and ty for helping :D

ChampMartini 04-07-2021 20:11

Re: remove vip from admins
 
"return CheckCommandAccess(client, "", VIP_RESERVATION)" that is no where to be found in the premium version

ChampMartini 04-07-2021 20:18

Re: remove vip from admins
 
i found it in another file.sp can i just name it whatever i want? :D

yuv41 04-07-2021 20:32

Re: remove vip from admins
 
Quote:

Originally Posted by ChampMartini (Post 2743379)
i found it in another file.sp can i just name it whatever i want? :D

Yes, just find where it sets the flag change it to whatever flag you want and compile again.
You need to use the right flags from sourcemod tho!!
https://wiki.alliedmods.net/Checking...Mod_Scripting)

Bacardi 04-08-2021 03:10

Re: remove vip from admins
 
How I would have change.

Add missing admin override "word" or "command".
https://github.com/SniperOO7/VIP-Pre...2-demo.sp#L460

Code:

stock bool IsClientVIP(int client)
{
        return CheckCommandAccess(client, "sm_vip_only", ADMFLAG_RESERVATION);
}

Compile plugin.
You can change admin access without editing plugin code again.

In admins_override.cfg set "sm_vip_only" set flag to else.
Code:

Overrides
{
        "sm_vip_only" "p"
}


-------------------------------


- Another way to override, set "sm_vip_only" to flag "z" from admin_overrides.cfg
- Do not give admin flag "z" to anyone, not even yourself. Your admin restriction would work then.
- Set admin group and set specific users into that group.
admin_groups.cfg
Code:

Groups
{
        /**
        * Allowed properties for a group:
        *
        *  "flags"          - Flag string.
        *  "immunity"        - Immunity level number, or a group name.
        *                                                If the group name is a number, prepend it with an
        *                                                '@' symbol similar to admins_simple.ini.  Users
        *                                                will only inherit the level number if it's higher
        *                                                than their current value.
        */
        "Default"
        {
                "immunity"                "1"
        }

        "vip_group"
        {
                Overrides
                {
                        "sm_vip_only" "allow"
                }
        }

       
        "Full Admins"
        {
                /**
                * You can override commands and command groups here.
                * Specify a command name or group and either "allow" or "deny"
                * Examples:
                *                ":CSDM"                        "allow"
                *                "csdm_enable"        "deny"
                */
                Overrides
                {
                }
                "flags"                        "abcdefghiz"

                /* Largish number for lots of in-between values. */
                "immunity"                "99"
        }
}

admins.cfg
Code:

Admins
{
        "admin1"
        {
                "auth"                        "steam"
                "identity"                "XXXXX"
                "flags"                        "abcdefghijklmn"
        }

        "user vip"
        {
                "auth"                        "steam"
                "identity"                "xxxx"
                "flags"                        "a"
                "group"                        "vip_group"
        }
}



All times are GMT -4. The time now is 18:28.

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