Raised This Month: $ Target: $400
 0% 

Can I register on chat a command that has an argument ?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
NucL3ra
Veteran Member
Join Date: Sep 2008
Location: Bucuresti , Romania
Old 04-30-2012 , 16:00   Can I register on chat a command that has an argument ?
Reply With Quote #1

As the title says, can I register a command that has one or more arguments WITHOUT hooking say

register_clcmd("top15", "Top15");

And when I type top15 , top15 www or top15 ab cd ef will actually call Top15 function
__________________
My nickname is nucLeaR, I just screwed up at registering and didn't want to change after that X_X.

Last edited by NucL3ra; 04-30-2012 at 16:00.
NucL3ra is offline
Send a message via Yahoo to NucL3ra
Doc-Holiday
AlliedModders Donor
Join Date: Jul 2007
Old 04-30-2012 , 16:06  
Reply With Quote #2

Quote:
Originally Posted by NucL3ra View Post
As the title says, can I register a command that has one or more arguments WITHOUT hooking say

register_clcmd("top15", "Top15");

And when I type top15 , top15 www or top15 ab cd ef will actually call Top15 function
If your talking about say commands its all one large argument and you have to parse it to brake it up i think.

Unless you add more the one register clcmd not sure which method would be better but prolly the multiple cmds if they are all known
Doc-Holiday is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 04-30-2012 , 16:07   Re: Can I register on chat a command that has an argument ?
Reply With Quote #3

If you mean hook "say top15 www" or "say top15 ab cd ef", then no you have to hook say.
If "top" is a console command, then yes you can.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Old 04-30-2012, 16:08
Devil259
This message has been deleted by Devil259. Reason: misread
NucL3ra
Veteran Member
Join Date: Sep 2008
Location: Bucuresti , Romania
Old 04-30-2012 , 16:26   Re: Can I register on chat a command that has an argument ?
Reply With Quote #4

I know it works on console, I'm sad I have to register say to do it for say messages.
__________________
My nickname is nucLeaR, I just screwed up at registering and didn't want to change after that X_X.
NucL3ra is offline
Send a message via Yahoo to NucL3ra
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 07:41.


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