Raised This Month: $ Target: $400
 0% 

[Help] handle_say.


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Mxnn
Veteran Member
Join Date: Aug 2009
Location: AT MY HOME
Old 08-03-2010 , 15:34   Re: [Help] handle_say.
Reply With Quote #2

PHP Code:
#include <amxmodx>
#include <amxmisc>

#define PLUGIN "Kick"
#define VERSION "1.0"
#define AUTHOR "Mxnn"


public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_clcmd("say""handle_say")
}

public 
handle_say(id) {
    
    if(
get_user_flags(id) & ADMIN_KICK)
        return 
PLUGIN_CONTINUE
        
    
new said[64], player[32]
    
read_args(said63)
    
remove_quotes(said)
    
    if (
said[0] == ' ')
        return 
PLUGIN_CONTINUE
    
else
        
strtok(saidsaid63player31' ')
        
    if (!
equal(said"!kick"))
        return 
PLUGIN_CONTINUE
    
    
new user cmd_target(idplayer2)
    
    if (!
user) {
        
client_print(idprint_chat"[AMXX] User not found")
        return 
PLUGIN_CONTINUE
    
}
    
    new 
szTargetName[32], szAdminName[32]
    
get_user_name(idszAdminName31)
    
get_user_name(userszTargetName31)
    
    
client_print(0print_chat"[AMXX] Admin %s KICK %s"szAdminNameszTargetName)
    
server_cmd("kick #%d"user)
    
    return 
PLUGIN_HANDLED
    

Try to do the same with "!map"
Mxnn 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 00:07.


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