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~~
__________________