AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   register srvcmd help. (https://forums.alliedmods.net/showthread.php?t=41101)

ShAyA 07-09-2006 06:37

register srvcmd help.
 
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

karlos 07-09-2006 06:49

Re: register srvcmd help.
 
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

...



All times are GMT -4. The time now is 07:57.

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