Raised This Month: $ Target: $400
 0% 

Hiding said '' register_clcmd ''


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 11-01-2009 , 05:29   Re: Hiding said '' register_clcmd ''
Reply With Quote #1

Best is to register all commands and let amxx check them in client_command.
Hook say cmd is rather when you want to detect a word in a sentence.

You can use this stock to register all commands :

PHP Code:
register_saycmd(saycommand[], function[], flags = -1info[] = ""FlagManager = -1)
{
    new 
temp[64];
    
formatex(temp63"say /%s"saycommand);
    
register_clcmd(temp, function, flagsinfoFlagManager);
    
formatex(temp63"say .%s"saycommand);
    
register_clcmd(temp, function, flagsinfoFlagManager);
    
formatex(temp63"say_team /%s"saycommandFlagManager);
    
register_clcmd(temp, function, flagsinfo);
    
formatex(temp63"say_team .%s"saycommandFlagManager);
    
register_clcmd(temp, function, flagsinfoFlagManager);
    
formatex(temp63".%s"saycommand);
    
register_clcmd(temp, function, flagsinfoFlagManager);
    
formatex(temp63"/%s"saycommand);
    
register_clcmd(temp, function, flagsinfoFlagManager);


Then, do :

register_saycmd("hi", ...

/hi, .hi will work in chat, say and say_team, and also in console.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod 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 17:41.


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