Raised This Month: $ Target: $400

Commands only for specific players

Post New Thread Reply   
Thread Tools Display Modes
Author Message
Junior Member
Join Date: Feb 2021
Old 02-24-2021 , 12:46   Commands only for specific players
Reply With Quote #1


i want to make some commands usable only for specific players. As far as i understant it can be done with admin_overrides.cfg and admins_simple.ini. I tried it but it doesnt work. Any help will be appreciated, thank you.
Attached Files
File Type: cfg admin_overrides.cfg (872 Bytes, 18 views)
File Type: ini admins_simple.ini (1.8 KB, 17 views)
OG420 is offline
Join Date: Nov 2009
Old 02-25-2021 , 20:15   Re: Commands only for specific players
Reply With Quote #2

I don't see anything wrong with your attached files. I went ahead and Google'd sm_stickers and saw that it's using RegConsoleCmd. You will need to change your plugin commands located within in the source code to use RegAdminCmd if you want your overrides to work.

void LoadCommands()
    RegConsoleCmd("sm_sticker", Command_Stickers);
    RegConsoleCmd("sm_stickers", Command_Stickers);
    RegConsoleCmd("sm_st", Command_Stickers);

void LoadCommands()
    RegAdminCmd("sm_sticker", Command_Stickers, ADMFLAG_GENERIC, "Toggle stickers");
    RegAdminCmd("sm_stickers", Command_Stickers, ADMFLAG_GENERIC, "Toggle stickers");
    RegAdminCmd("sm_st", Command_Stickers, ADMFLAG_GENERIC, "Toggle stickers");

Last edited by Sreaper; 02-25-2021 at 20:19.
Sreaper is offline
Veteran Member
Join Date: Oct 2017
Location: Germany
Old 02-25-2021 , 21:27   Re: Commands only for specific players
Reply With Quote #3

You are not giving permissions to an specific player but rather allow everyone with a specific flag to use the command. Anyway try replacing RegConsoleCmd with RegAdminCmd as Sreaper suggested.

Last edited by TomL.; 02-25-2021 at 21:28.
TomL. is offline
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 02-26-2021 , 01:01   Re: Commands only for specific players
Reply With Quote #4

Originally Posted by SM 1.5.0
- Added the ability to override RegConsoleCommand-created commands (bug 5199).
You not need edit plugin source code, to replace RegConsoleCmd -> RegAdminCmd
Just add command in admin_overrides.cfg

Answer to first post, I don't know.
Need to see admin cache dump and link to the plugin source code. I won't start search, because there can be 4 different version suddenly.

Last edited by Bacardi; 02-26-2021 at 01:38.
Bacardi is offline

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 03:35.

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