Raised This Month: $ Target: $400
 0% 

Register Commands with Space


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
liinuus
Senior Member
Join Date: Apr 2010
Old 07-18-2011 , 07:44   Re: Register Commands with Space
Reply With Quote #1

Code:
/* Plugin generated by AMXX-Studio */ #include <amxmodx> #include <amxmisc> #define PLUGIN "New Plug-In" #define VERSION "1.0" #define AUTHOR "author" public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)     register_clcmd("say", "HandleSay") }  public HandleSay(id)  {         static said[192], cow;     read_args(said,191);     remove_quotes(said);     //remove the / if it is there     if( equali(said,"/",1 ) ) cow = 1;     else cow = 0;         new first_message[21], dummy[2]     strbreak(said[cow], first_message, 20, dummy, 1)         if(equali(first_message, "Server")) {         new Left[151], Right[151]         strbreak(said[cow], Left, 150, Right, 150)         strbreak(Right, Left, 150, Right, 150)         if( equali(Left, "rules") || equali(Left, "Rules") )         {                         //ur code here         }     } }
liinuus is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 07-18-2011 , 09:04   Re: Register Commands with Space
Reply With Quote #2

Quote:
Originally Posted by liinuus View Post
Code:
        if( equali(Left, "rules") || equali(Left, "Rules") )
equali() is case-insensitive, so those 2 checks are the exact same.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
liinuus
Senior Member
Join Date: Apr 2010
Old 07-18-2011 , 12:58   Re: Register Commands with Space
Reply With Quote #3

Quote:
Originally Posted by Exolent[jNr] View Post
equali() is case-insensitive, so those 2 checks are the exact same.
kk my bad
liinuus 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 01:10.


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