Registering cl_cmd
Hello everyone, I was wondering how can you register a cl_cmd to a plugin, like for example there is this plugin that is on all the time, but i want it to be on when i a write a text like : /example, and it turns on and shows message that the player did that thing like turned on longjump stats (its not about lj stats, its just example).
PHP Code:
PHP Code:
Hope You understood me! Thanks! Mankind |
Re: Registering cl_cmd
What are you trying to turn on and off? Is it something in the same plugin or is it in another plugin controlled by a cvar or command? The answer to this question may change the answer to your question.
This is a simple example for doing this: PHP Code:
|
Re: Registering cl_cmd
It's the same plugin im trying to turn on and off.
And the plugin im trying to do this is : PHP Code:
PHP Code:
|
Re: Registering cl_cmd
Here is one way to do it. You should be able to add things on your own now. If you don't know if it will work, try it first, if it doesn't work try something else. If you can't get it after trying several times then you may post your question.
PHP Code:
|
Re: Registering cl_cmd
Thanks, works fine, but how do can i set the function client_print, so when the ct writes /toss, it shows %s turned on gun toss distance? I think it goes something like this, but im not completly sure :
PHP Code:
PHP Code:
Big thanks for helping me. |
Re: Registering cl_cmd
Quote:
Quote:
|
| All times are GMT -4. The time now is 23:33. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.