Raised This Month: $ Target: $400
 0% 

register srvcmd help.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ShAyA
Member
Join Date: Oct 2005
Old 07-09-2006 , 06:37   register srvcmd help.
Reply With Quote #1

When you do for example:
Quote:
register_srvcmd("nekoMsg", "coreMsg")
in the function coreMsg, how do I get the paramaters supplied?

read_data (which is what I would presume it be), always returns 0... sooooo is there something I'm missing?

Thanks,
Shaya
ShAyA is offline
karlos
Veteran Member
Join Date: Apr 2004
Location: Germany/Poland
Old 07-09-2006 , 06:49   Re: register srvcmd help.
Reply With Quote #2

read_data is for register_event
you need read_argv

like this:
Code:
public coreMsg( )

if ( read_argc() < 1 )  // if no argument stop here
	return PLUGIN_HANDLED

new arg1[32]
read_argv(1, arg1, 31)  // first argument

new arg2[32]
read_argv(2, arg2, 31)  // second argument

...
__________________
alias White Panther
karlos is offline
Reply



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 07:57.


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