Raised This Month: $ Target: $400
 0% 

Scripting Help


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
uNy
Member
Join Date: Dec 2009
Old 06-05-2010 , 21:17   Scripting Help
Reply With Quote #1

Well ... I have a plugin that restricts the command " amx_plugins " but just for players ...
I want this plugin to restrict it even for admins =]

PHP Code:

#include <amxmodx> 
#include <amxmisc> 
public plugin_init() 
{     
register_plugin("BlockAmxPlugins""0.1""xCode")     
register_clcmd"amx_plugins""BlockAmxPlugins"

public 
BlockAmxPlugins(id
{     
if( 
is_user_admin(id) )         
return 
PLUGIN_CONTINUE         
client_print
(id,print_center,"That command is RESTRICTED."
// [sic]     
return PLUGIN_HANDLED 

__________________
AlliedModders is The BEST !
That's what she said.
steam://connect/80.96.216.53:27015
uNy is offline
drekes
Veteran Member
Join Date: Jul 2009
Location: Vault 11
Old 06-05-2010 , 21:36   Re: Scripting Help
Reply With Quote #2

PHP Code:
#include <amxmodx> 

public plugin_init() 
{     
    
register_plugin("BlockAmxPlugins""0.1""xCode")     
    
register_clcmd"amx_plugins""BlockAmxPlugins"
}
 
public 
BlockAmxPlugins(id)   
    return 
PLUGIN_HANDLED 
__________________

Quote:
Originally Posted by nikhilgupta345 View Post
You're retarded.
drekes is offline
Send a message via MSN to drekes
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 06-05-2010 , 22:13   Re: Scripting Help
Reply With Quote #3

The best solution:

admincmd.sma
PHP Code:
    register_concmd("amx_plugins""cmdPlugins"ADMIN_ADMIN


PHP Code:
    // register_concmd("amx_plugins", "cmdPlugins", ADMIN_ADMIN) 
__________________
fysiks 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 05:15.


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