Raised This Month: $41 Target: $400
 10% 

Solved remove vip from admins


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ChampMartini
Member
Join Date: Mar 2021
Old 04-07-2021 , 19:41   remove vip from admins
Reply With Quote #1

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?

Last edited by ChampMartini; 04-08-2021 at 13:17.
ChampMartini is offline
yuv41
Member
Join Date: Jan 2020
Old 04-07-2021 , 19:48   Re: remove vip from admins
Reply With Quote #2

Line 460
return CheckCommandAccess(client, "", ADMFLAG_RESERVATION);
Change ADMFLAG_RESERVATION to the flag you want to give to vips.
yuv41 is offline
ChampMartini
Member
Join Date: Mar 2021
Old 04-07-2021 , 19:57   Re: remove vip from admins
Reply With Quote #3

line 460 in what file?
ChampMartini is offline
yuv41
Member
Join Date: Jan 2020
Old 04-07-2021 , 20:00   Re: remove vip from admins
Reply With Quote #4

Quote:
Originally Posted by ChampMartini View Post
line 460 in what file?
Clone the github, compile it yourself
https://github.com/SniperOO7/VIP-Pre...ium-v2-demo.sp
yuv41 is offline
ChampMartini
Member
Join Date: Mar 2021
Old 04-07-2021 , 20:03   Re: remove vip from admins
Reply With Quote #5

so i can just change it to whatever i want? like "return CheckCommandAccess(client, "", VIP_RESERVATION)"
and ty for helping
ChampMartini is offline
ChampMartini
Member
Join Date: Mar 2021
Old 04-07-2021 , 20:11   Re: remove vip from admins
Reply With Quote #6

"return CheckCommandAccess(client, "", VIP_RESERVATION)" that is no where to be found in the premium version
ChampMartini is offline
ChampMartini
Member
Join Date: Mar 2021
Old 04-07-2021 , 20:18   Re: remove vip from admins
Reply With Quote #7

i found it in another file.sp can i just name it whatever i want?
ChampMartini is offline
yuv41
Member
Join Date: Jan 2020
Old 04-07-2021 , 20:32   Re: remove vip from admins
Reply With Quote #8

Quote:
Originally Posted by ChampMartini View Post
i found it in another file.sp can i just name it whatever i want?
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)

Last edited by yuv41; 04-07-2021 at 20:34.
yuv41 is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 04-08-2021 , 03:10   Re: remove vip from admins
Reply With Quote #9

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"
	}
}
Bacardi 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 22:21.


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