problem while handling a say command
I want to make a command that changes server's current password immediately. A say command like; .svpass <newPassword>
I made a code that works but not properly. If I use "say .svpass 12345" via console, it works. But it doesnt when I try do this by pressing "y" key to say, then type .svpass 12345 , nothing happens. Here is what I coded : PHP Code:
|
Re: problem while handling a say command
edit:
tested and works: PHP Code:
|
Re: problem while handling a say command
hmm, maybe it works. But I didn't like this method. Do we have to catch svpass in this way? Coz I have more "say" commands and I dont want to use all in one function and using if/elses :shock:
|
Re: problem while handling a say command
You could use just IF :lol:
PHP Code:
|
Re: problem while handling a say command
thank you anyway, is it possible to use more than one register to "say" command? like ;
public plugin_init() { register_clcmd("say", "SVPass") register_clcmd("say", "HostName") } |
Re: problem while handling a say command
Yes (I think, try it and find out). Also, I don't see why your first code won't work.
|
Re: problem while handling a say command
Quote:
|
Re: problem while handling a say command
Quote:
|
Re: problem while handling a say command
lol, sorry, but i don't really know why it's like that, i just know it is.
|
| All times are GMT -4. The time now is 01:31. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.