Raised This Month: $ Target: $400
 0% 

register_clcmd with parameter? [SOLVED]


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
schnitzelmaker
Senior Member
Join Date: Apr 2006
Location: HERE
Old 12-11-2006 , 16:30   Re: register_clcmd with parameter?
Reply With Quote #2

for say command you can use the say event here an code example
Code:
#include <amxmodx> #include <amxmisc> #define PLUGIN "New Plug-In" #define VERSION "1.0" #define AUTHOR "Administrator" public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)     register_clcmd("say", "handle_say") } public handle_say(id){ new nums = read_argc()//read_argc return how many parameter are given in the say client_print(id,print_chat,"You have say %d commands/parameter",nums) for (new i = 1; i < read_argc(); i++) {         new command[32]         read_argv(i, command, 31) //read_argv read the i parameter and store it into command         client_print(id,print_chat,"You %d paramter is %s",i,command)     } new say[128] read_args(say,127) //read_args return the fully string who was say client_print(id,print_chat,"You fully say is: %s",say) }
__________________
schnitzelmaker 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 06:57.


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