Raised This Month: $ Target: $400
 0% 

Registering cl_cmd


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Mankind
Member
Join Date: Jun 2009
Old 06-23-2011 , 20:33   Registering cl_cmd
Reply With Quote #1

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:
        client_print(0print_chat"%s example"name); 
And I want to make it so when you write again that /example it turns off and says Example turned off example.

PHP Code:
    register_clcmd("say /example""cmd_example_example"ADMIN_ALL); 
Do i need to write theese 2 lines or something more. And how do I specify that I want it just for counter-terrorists that plugin ( they dont need to be admins ).

Hope You understood me!
Thanks!
Mankind
Mankind 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 23:33.


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