Raised This Month: $ Target: $400
 0% 

Chat Is Blocked


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Dr7sTyLe
Senior Member
Join Date: Dec 2010
Old 06-11-2011 , 03:05   Re: Chat Is Blocked
Reply With Quote #1

Quote:
Originally Posted by fysiks View Post
To read arguments you need to register only "say" and/or "say_team" then filter for the command. When you encounter the command then you can do what you need to do using read_args() and print your message. There are many topics about this and you can find many plugins that already do this. One example is adminchat.sma (with the @ chat commands).
Ive Tried It Didnt Go well :
PHP Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>

#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"
#define MAX_CLR 10
new g_msgChannel
new arg[33]
public 
plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_clcmd("say /arishon %s",arg,"cmdArishon",ADMIN_KICK)
}
public 
cmdArishon(idlevel)
{    
    new 
arg[33],message[192],userid 0,name[32]
    
    
read_argv(0arg32)
    
read_args(message191)
    
remove_quotes(message)
    
parse(message,32)
    
    new 
found 00
    
new lang[11], langnum get_langsnum()    
    new 
length found
    
    
if (++g_msgChannel || g_msgChannel 3)
    
g_msgChannel 3    
    get_user_name
(idname31)
    
userid get_user_userid(id)
    
set_hudmessage(255000.300.1906.012.0);new rand
    rand 
random_num(0,4)
    switch (
rand)
    {
        case 
34:
        {
            new 
maxpl get_maxplayers();
            for (new 
pl 1pl <= maxplpl++)
            {
                if (
is_user_connected(pl) && !is_user_bot(pl))
                {
                    if (
is_user_admin(pl))
                    {
                        
show_hudmessage(id"Arishon She Kotev %s Over CT",arg)
                    }
                    else
                    {
                        
show_hudmessage(id"Arishon She Kotev %s Over CT",arg)
                    }
                }
            }
        }
        case 
2:
        {
            
show_hudmessage(id"Arishon She Kotev %s Over CT",arg)
        }
        default:
        {
            
show_hudmessage(id"Arishon She Kotev %s Over CT",arg)
        }
    }

    
show_hudmessage(id"Arishon She Kotev %s Over CT",arg)

    return 
PLUGIN_HANDLED

its show the message but the arg is always defined in the server as the word "say" i cant write "/arishon 123"
Dr7sTyLe 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 23:28.


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