Raised This Month: $ Target: $400
 0% 

admin plugin !slap !slay...


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Relaxing
AlliedModders Donor
Join Date: Jun 2016
Location: White Plains
Old 09-26-2016 , 14:12   Re: admin plugin !slap !slay...
Reply With Quote #10

Try this ->

PHP Code:
#include < amxmodx >

#define PLUGIN "CFG"
#define VERSION "1.0"
#define AUTHOR "aNNakin"

new const g_Char[ ] = "!";

new 
g_Commands[ ][ ] =
{
    
"!kick",
    
"!slay",
    
"!ban",
    
"!banip"
};

new 
g_Accesses[ ] =
{
    
ADMIN_KICK,
    
ADMIN_SLAY,
    
ADMIN_BAN,
    
ADMIN_BAN
};

public 
plugin_init ( )
{
    
register_plugin PLUGINVERSIONAUTHOR );
    
register_clcmd "say""hook_say" );
}

public 
hook_say e_Index )
{
    static 
s_Args192 ], s_Command192 ];
    
read_args s_Argscharsmax s_Args ) );
    
    if ( ! 
s_Args] )
        return 
PLUGIN_CONTINUE;
    
remove_quotes s_Args] );
    
    for ( new 
isizeof g_Commandsi++ )
    {
        if ( 
equal s_Argsg_Commands], strlen g_Commands] ) ) )
        {
            if ( 
get_user_flags e_Index ) & g_Accesses] )
            {
                
replace s_Argscharsmax s_Args ), g_Char"" );
                
formatex s_Commandcharsmax s_Command ),"amx_%s"s_Args );
                
client_cmd e_Indexs_Command );
            }
            
            break;
        }
    }
    
    return 
PLUGIN_CONTINUE;

__________________
Relaxing is offline
 



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 17:13.


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