Raised This Month: $ Target: $400
 0% 

[Solved] questions about read_data


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
breaddawson
Senior Member
Join Date: Jul 2004
Location: Beijing,China
Old 10-18-2004 , 00:51   [Solved] questions about read_data
Reply With Quote #1

i found this script in Statsx.sma
and i can't understand it

Code:
public eventSpecMode( id ) {   new sData[12]   read_data( 2, sData, 11 )   g_izSpecMode[id] = ( sData[10] == '2' )   return PLUGIN_CONTINUE }

and i found the explain of "read_data" in the amxmodx.inc
but it's too brief for me to understand it
Code:
/* Gets value from client messages.
* When you are asking for string the array and length is needed (read_data(2,name,len)).
* Integer is returned by function (new me = read_data(3)).
* Float is set in second parameter (read_data(3,value)). */
native read_data(value, {Float,Sql,Result,Regex,_}:... );
another question is about "register_event"
i also find its explain

Code:
/* Registers event on which a given function will be called
* Flags:
* "a" - global event.
* "b" - specified.
* "c" - send only once when repeated to other players.
* "d" - call if is send to dead player.
* "e" - to alive.
* Examples for conditions:
* "2=c4" - 2nd parameter of message must be sting "c4".
* "3>10" - 3rd parameter must be greater then 10.
* "3!4" - 3rd must be different from 4.
* "2&Buy" - 2nd parameter of message must contain "Buy" substring.
* "2!Buy" - 2nd parameter of message can't contain "Buy" substring. */
native register_event(const event[],const function[],const flags[],cond[]="", ... );
i can understand this
but the one i'm puzzled is that if i do this
for example ,i write this line
Code:
register_event("TextMsg","setSpecMode","bd","2&ec_Mod")
then,what will happen?

is there anyone kindly explain these to me~~
thank u very much~~
__________________
i'm bread dawson ,a chinese boy
wish u be happy~
breaddawson is offline
Send a message via ICQ to breaddawson Send a message via MSN to breaddawson
 


Thread Tools
Display Modes

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 17:22.


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