Raised This Month: $ Target: $400
 0% 

[Help] handle_say.


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
katna
Senior Member
Join Date: May 2010
Old 08-03-2010 , 15:53   Re: [Help] handle_say.
Reply With Quote #5

PHP Code:
#include <amxmodx>

#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"

new const AmxCmds[][]= { "ct","t","roundtime","ft","freezetime","revive","restart","rr","gag","ungag","bury",
"unbury","rocket","kick","ban","slay","slap","map","glow""noclip""godmode""pause",
"heal""weapon""ff","pass","nopass""gravity","aa","alltalk""restartserver" }


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

public 
HandleSay(id) {
    new 
message[128];
    
read_argv(1message127);
    for(new 
i=0;i<sizeof(AmxCmds);i++) {
        new 
cmd[33];
        
formatex(cmd,32,"!%s",AmxCmds[i])
        if(
containi(message,cmd) == 0) {
            if(!(
get_user_flags(id) & ADMIN_CVAR))
                return 
PLUGIN_CONTINUE;
            
HandleChatCmd(id,i);
            return 
PLUGIN_HANDLED;
        }
    }
    return 
PLUGIN_CONTINUE;
}

public 
HandleChatCmd(idtype) {
    new 
message[128], cmd[33], arg[65], arg2[65], name[32];
    
read_argv (1message128);
    
get_user_name(id,name,31);
    
parse(message,cmd,32,arg,64,arg2,64);
    
    switch(
type) {
        case 
1// !ct
        
case 2// !t
        
case 3// !roundtime
        
case 4,5// !ft,!freezetime
        // and you keep continue...
    
}

katna 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