Raised This Month: $ Target: $400
 0% 

how to replace to _ if command have space?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
ChanT
Junior Member
Join Date: Mar 2006
Old 06-07-2007 , 16:17   Re: how to replace to _ if command have space?
Reply With Quote #3

Quote:
Originally Posted by lucky109 View Post
how to replace space to _ if command have space?

E.G
Code:
#include <amxmodx>

public plugin_init() { 
   register_plugin("test","1.0",test")
   register_clcmd("test","test_function",0,"test <sentence words>")
   return PLUGIN_CONTINUE
} 

public test_function(id) {
new arg[32]
read_argv(1,arg,31) 
client_print(id,print_chat,"%s",arg) 
}
if i have to type "test helo goodmorning john"
it's show "helo" only

how can i get the full sentence " helo goodmorning john" ??

thanks
If i correctly understood what u meant then just try to replace read_argv(1,arg,31) with: read_args(arg,31)

EDIT: eww a sec to late
ChanT is offline
 



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 10:36.


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