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

How to enable commands for certain groups


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
UnPonySexy
Junior Member
Join Date: Oct 2017
Old 07-23-2019 , 21:05   How to enable commands for certain groups
Reply With Quote #1

There's something I don't understand because i'm still a newbie, I want to make a VIP/Donator for TF2 and add it certain commands. Commands that only VIP/Donator could use, such as sm_taunt for example.

Thing is I don't know how, if anyone could help me I would appreciate it.
UnPonySexy is offline
Neuro Toxin
Veteran Member
Join Date: Oct 2013
Location: { closing the void; }
Old 07-24-2019 , 16:34   Re: How to enable commands for certain groups
Reply With Quote #2

Documentation is a good place to start.

Groups

Overrides
__________________
Neuro Toxin is offline
PC Gamer
Veteran Member
Join Date: Mar 2014
Old 07-25-2019 , 13:53   Re: How to enable commands for certain groups
Reply With Quote #3

After reading what Neuro Toxin posted you may consider editing your sourcemod/configs/admin_overrides.cfg file.

Example of how you might do it to restrict commands to players with a certain flag:

Code:
Overrides
{
//Allow any player to use
     "sm_bedragon"     " "
     "sm_beskeleton"   " "
     "sm_stopsound"    " "

//Allow VIP Player to use
     "sm_vipcash"     "a"
     "sm_trails"      "a"
     "sm_taunt"       "a"

//Allow Administrator to use
     "sm_buddha"     "k"
     "sm_noclip"     "k"

//Owner use only
     "sm_besuperfox"     "z"
     "sm_bewizard4"      "z"
     "sm_betheeye2"      "z"
     "sm_beyetiboss"     "z"

//Custom Overrides for Model Manager
     "modelyeti"     "k"
}
PC Gamer is offline
UnPonySexy
Junior Member
Join Date: Oct 2017
Old 07-25-2019 , 20:02   Re: How to enable commands for certain groups
Reply With Quote #4

Quote:
Originally Posted by PC Gamer View Post
After reading what Neuro Toxin posted you may consider editing your sourcemod/configs/admin_overrides.cfg file.

Example of how you might do it to restrict commands to players with a certain flag:

Code:
Overrides
{
//Allow any player to use
     "sm_bedragon"     " "
     "sm_beskeleton"   " "
     "sm_stopsound"    " "

//Allow VIP Player to use
     "sm_vipcash"     "a"
     "sm_trails"      "a"
     "sm_taunt"       "a"

//Allow Administrator to use
     "sm_buddha"     "k"
     "sm_noclip"     "k"

//Owner use only
     "sm_besuperfox"     "z"
     "sm_bewizard4"      "z"
     "sm_betheeye2"      "z"
     "sm_beyetiboss"     "z"

//Custom Overrides for Model Manager
     "modelyeti"     "k"
}
But if for example, I want to add this https://forums.alliedmods.net/showthread.php?t=311817 but I can't apply for players without rank to use the command, how do I disable it for players without rank? Because I have try to apply the "sm_defaultdance" to only VIP's, yet it doesn't seem to work.

Also, for some reason Moderator's rank can't use csay command, but the Administrator rank can, so i'm confuse.

Code:
Overrides
{
//Allow VIP to use
     "sm_taunt"     "ajk"
	 "sm_vote"     "ajk"
	 "sm_csay"     "ajk"
	 sm_defaultdance"     "ajk"
	 
//Allow Mods to use

     "sm_kick"     "abcdfk"
	 "sm_ban"     "abcdfk"
	 "sm_slay"     "abcdfk"
     "sm_slap"     "abcdfk"
	 "sm_csay"     "abcdfk"
	 "sm_defaultdance"     "abcdfk"
	 
//Allow Admin to ue
     
	 "sm_kick"     "abcdefjk"
	 "sm_ban"     "abcdefjk
	 "sm_slay"     "abcdefjk
	 "sm_slap"     "abcdefjk
	 "sm_csay"     "abcdefjk
	 "sm_defaultdance"     "abcdefjk
}
UnPonySexy is offline
CliptonHeist
Senior Member
Join Date: Feb 2016
Old 07-26-2019 , 06:57   Re: How to enable commands for certain groups
Reply With Quote #5

You probably want to be using group overrides for this problem: https://wiki.alliedmods.net/Adding_G...d)#File_Format
CliptonHeist is offline
PC Gamer
Veteran Member
Join Date: Mar 2014
Old 07-27-2019 , 11:14   Re: How to enable commands for certain groups
Reply With Quote #6

Your override flag (and commands) should be something unique to that privilege level.

Maybe do something like this:

Code:
Overrides
{
//Allow VIP to use
     "sm_taunt"     "a"
     "sm_vote"     "a"
     "sm_csay"     "a"
     "sm_defaultdance"     "a"
	 
//Allow Mods to use
     "sm_kick"     "b"
     "sm_ban"     "b"
     "sm_slay"     "b"
     "sm_slap"     "b"
	 
//Allow Admin to ue
     "sm_noclip"     "k"
     "sm_buddha"     "k"
     "sm_swapteam"     "k"
     "sm_settime"     "k"
     "sm_addtime"     "k"
}
Since VIPs and above all have the 'a' flag they can use the commands with an 'a' flag override.

Moderators and Admins each have the 'b' flag so they can use commands with the 'b' override. VIPs do not have the 'b' flag so they cannot use commands with the 'b' override.

Admins are the only ones with "k" flag so they are the only ones that can use commands with the "k" override.

I hope this helps...
PC Gamer is offline
UnPonySexy
Junior Member
Join Date: Oct 2017
Old 07-30-2019 , 13:58   Re: How to enable commands for certain groups
Reply With Quote #7

But how do I disable commands for players without rank?

For example, I want the sm_defaultdance only be used for VIP's, but yet the normal players can use the command without restriction.
UnPonySexy 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 01:29.


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