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

how to deny command for public player( no group)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
kelvin31
Member
Join Date: May 2010
Old 05-25-2014 , 23:45   how to deny command for public player( no group)
Reply With Quote #1

Hello all, I got a little problem, hope someone can help me,
I m using medic shield plugins https://forums.alliedmods.net/showthread.php?p=2138254
but this plugins's command sm_shield granted all player access right now, how to deny it except admins.cfg 's player?
kelvin31 is offline
Squallkins
AlliedModders Donor
Join Date: Mar 2005
Old 05-26-2014 , 05:16   Re: how to deny command for public player( no group)
Reply With Quote #2

Try attached version

(will only work for admins with ban command access)
Attached Files
File Type: sp Get Plugin or Get Source (TF2_MedicMvMShield.sp - 95 views - 4.9 KB)
File Type: smx TF2_MedicMvMShield.smx (6.3 KB, 121 views)
Squallkins is offline
kelvin31
Member
Join Date: May 2010
Old 05-26-2014 , 05:58   Re: how to deny command for public player( no group)
Reply With Quote #3

Quote:
Originally Posted by .:{EK}:. SQUALL View Post
Try attached version

(will only work for admins with ban command access)
thanks first,
if I want to change flag to custom 1 , is it edit ADMFLAG_BAN to ADMFLAG_CUSTOM1 ??
is it correct?
kelvin31 is offline
Squallkins
AlliedModders Donor
Join Date: Mar 2005
Old 05-26-2014 , 06:12   Re: how to deny command for public player( no group)
Reply With Quote #4

yes
Squallkins is offline
kelvin31
Member
Join Date: May 2010
Old 05-27-2014 , 02:17   Re: how to deny command for public player( no group)
Reply With Quote #5

Quote:
Originally Posted by .:{EK}:. SQUALL View Post
yes
Thank you
kelvin31 is offline
WildCard65
Veteran Member
Join Date: Aug 2013
Location: Canada
Old 05-27-2014 , 09:34   Re: how to deny command for public player( no group)
Reply With Quote #6

There is command overrides.
https://wiki.alliedmods.net/Adding_Groups_(SourceMod)
https://wiki.alliedmods.net/Overridi...ess_(SourceMod)
WildCard65 is offline
kelvin31
Member
Join Date: May 2010
Old 05-27-2014 , 22:53   Re: how to deny command for public player( no group)
Reply With Quote #7

Quote:
Originally Posted by .:{EK}:. SQUALL View Post
yes
already edit

Code:
public OnPluginStart()
{
	CreateConVar("sm_medicshield_version", PLUGIN_VERSION, "Donator Building Colors Version", FCVAR_PLUGIN|FCVAR_SPONLY|FCVAR_REPLICATED|FCVAR_NOTIFY);
	
	RegAdminCmd("sm_shield", Command_Shield, ADMFLAG_RESERVATION, "Turns on the Medic's shield effect from MvM. Usage: sm_shield");
	RegAdminCmd("sm_shield2", Command_Shield2, ADMFLAG_RESERVATION, "Turns on the Medic's advanced shield effect from MvM. Usage: sm_shield2");
}
But not work, still can use by everyone

Last edited by kelvin31; 05-27-2014 at 22:57.
kelvin31 is offline
kelvin31
Member
Join Date: May 2010
Old 05-27-2014 , 22:56   Re: how to deny command for public player( no group)
Reply With Quote #8

Quote:
Originally Posted by WildCard65 View Post
already set admin_groups.cfg
Code:
	"Default"
	{
		"immunity"		"1"
		"sm_shield"		"deny"
	}
also can use by everyone
kelvin31 is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 05-28-2014 , 04:09   Re: how to deny command for public player( no group)
Reply With Quote #9

Quote:
Originally Posted by .:{EK}:. SQUALL View Post
Try attached version

(will only work for admins with ban command access)
You know, you can now override regular SM RegConsoleCmd to use admin flags, in version 1.5.x

Just in admin_overrides.cfg
PHP Code:
Overrides
{
    
/**
     * By default, commands are registered with three pieces of information:
     * 1)Command Name         (for example, "csdm_enable")
     * 2)Command Group Name    (for example, "CSDM")
     * 3)Command Level        (for example, "changemap")
     *
     * You can override the default flags assigned to individual commands or command groups in this way.
     * To override a group, use the "@" character before the name.  Example:
     * Examples:
     *        "@CSDM"            "b"                // Override the CSDM group to 'b' flag
     *         "csdm_enable"    "bgi"            // Override the csdm_enable command to 'bgi' flags
     *
     * Note that for overrides, order is important.  In the above example, csdm_enable overwrites
     * any setting that csdm_enable previously had.
     *
     * You can make a command completely public by using an empty flag string.
     */

    
"sm_shield" "b"    // Overrides to flag b
    
"sm_shield2" "bc"    // Overrides to adminflag b and c

and if you want only, one of admin group to use it
Spoiler
Bacardi is offline
Reply



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 16:05.


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