read args from say
i have problems with reading args from a say command
PHP Code:
|
Re: read args from say
You need to read the first and second argument
Quote:
|
Re: read args from say
PHP Code:
|
Re: read args from say
IIRC, the say message is always enclosed in quotes ("). That means you can just read_argv(1) or read_args() to get the whole message, but you then need to remove_quotes() it and then parse() or strbreak() it into individual parts..
e.g. if someone types /transfer 555 120, what you would get is "/transfer 555 120" as arg1. I might be wrong about that, but I do remember reading say commands was different from reading console commands. |
Re: read args from say
If a player has a bind such as bind "b" "say /command blabla", then arg 1 will be /command and arg 2 will be blabla, but if he types /command blabla via "y" key then arg1 will be "/command blabla"
That's why the only method that should be used is read_args(said, charsmax(said)) + remove_quotes( said ) and then you have to parse args with the method you want. |
Re: read args from say
Quote:
|
Re: read args from say
thanks for help :)
|
| All times are GMT -4. The time now is 14:36. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.