Raised This Month: $ Target: $400
 0% 

Capturing say


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Dark Style
BANNED
Join Date: Feb 2011
Location: Brazil
Old 10-30-2011 , 14:57   Capturing say
Reply With Quote #1

How can I capture in the console a word with 2 spaces before ?
For exemple:
(1 space)
Code:
say /a
(2 spaces)
Code:
say  /a
Dark Style is offline
alan_el_more
Veteran Member
Join Date: Jul 2008
Location: amxmodx-es.com
Old 10-30-2011 , 15:27   Re: Capturing say
Reply With Quote #2

Use trim():
http://www.amxmodx.org/funcwiki.php?go=func&id=570
__________________
alan_el_more is offline
Dark Style
BANNED
Join Date: Feb 2011
Location: Brazil
Old 10-30-2011 , 15:28   Re: Capturing say
Reply With Quote #3

not solved my problem

I want get it on register_clcmd or register_concmd

Last edited by Dark Style; 10-30-2011 at 15:31.
Dark Style is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 10-30-2011 , 15:32   Re: Capturing say
Reply With Quote #4

PHP Code:
register_clcmd"say  /a" "SaidCmd" 
Or hook say then check arg

PHP Code:
register_clcmd"say" "HookSay" )

public 
HookSay( if )
{
   
//check arg here

__________________

Last edited by Bugsy; 10-30-2011 at 15:35.
Bugsy is offline
Dark Style
BANNED
Join Date: Feb 2011
Location: Brazil
Old 10-30-2011 , 15:35   Re: Capturing say
Reply With Quote #5

I want the first, but don't works.

PHP Code:
formatex(szformatcharsmax(szformat), "say  %s"buffer);
            
register_clcmd(szformat"handle"); 

Last edited by Dark Style; 10-30-2011 at 15:38.
Dark Style is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 10-30-2011 , 15:43   Re: Capturing say
Reply With Quote #6

Why are you formatting to register the client cmd, just register it exactly as you want it.
__________________
Bugsy is offline
Dark Style
BANNED
Join Date: Feb 2011
Location: Brazil
Old 10-30-2011 , 15:44   Re: Capturing say
Reply With Quote #7

because I read the command from a file.

Last edited by Dark Style; 10-30-2011 at 15:45.
Dark Style is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 10-30-2011 , 15:48   Re: Capturing say
Reply With Quote #8

server or client print the value to be sure its being read properly from file.

server_print ( "[%s]" , buffer )
__________________
Bugsy 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 14:17.


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