Raised This Month: $ Target: $400
 0% 

Chat Is Blocked


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Dr7sTyLe
Senior Member
Join Date: Dec 2010
Old 06-10-2011 , 15:00   Chat Is Blocked
Reply With Quote #1

I have this mod when an admin say in chat "/arishon XXX"
XXX = Something That The Admin Writes
so it show hudmessage and the XXX in there.
there are to problems
1)its shown for 1 sec and disappear very fast
2)no one can write in the chat.
this is the code
PHP Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>

#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"
new const Cmds[][]={"First"}
new const 
CmdsName[][]={"First One Who Writes"}
new 
iName[32]

public 
plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_clcmd"say /arishon""cmdHandleSay" );
    
register_clcmd"say_team /arishon""cmdHandleSay" );
}
public 
cmdHandleSay(id)
{
    new 
szMessage[32]
    
read_args(szMessagecharsmax(szMessage));
    
remove_quotes(szMessage);
    new 
message[128];
    
read_argv(1message127);
    for(new 
i=0;i<sizeof(Cmds);i++) 
    {
        
HandleChatCmd(id,i)
        return 
PLUGIN_HANDLED
    
}
}
public 
HandleChatCmd(idtype) {
    new 
message[128], cmd[33], arg[65],name[32];
    
read_argv (1message128);
    
get_user_name(id,name,31);
    
parse(message,cmd,32,arg,64);
    switch(
type)
    {
        case 
0:{
            if(
get_user_flags(id) == ADMIN_KICK)
            {
                
client_cmd(id,"say /arishon %s",arg)
                
set_hudmessage(025500.130.2306.015)
                
show_hudmessage(0"Arishon She Roshem %s Ovet CT",arg)
        
    }
}
}

Dr7sTyLe 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 23:28.


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