|
超级娱乐
static output[256];
vformat( output, 255, msg, 4 );
static debug_key[51];
get_ppcvar_string( pm_debug_key, debug_key, 50 );
if( debug_key[0] != '\0' && containi(output,debug_key) == -1 )
return; //it didn't have the debug key in it
if( id > 0 && id <= MAX_PLAYERS ){
static lastid;
static name[32],authid[32], pname[NAME_LENGTH], userid;
if( lastid != id ){
lastid = id;
get_user_name( id, name, 31 );
get_user_authid( id, authid, 31 );
userid = get_user_userid( id );
}
PokeToName(Pokemon[id],pname);
if( userid > 0 )
format( output, 255, "\"%s<%d><%s><%s>\" %s", name,userid,authid,pname, output );
}
if( output[0] == '\0' )
return;
if( debugMode )
format( output, 255, "DEBUG: %s", output );
switch(debugMode){
case 0: log_amx( output ); //no matter what, were going to log it
case 1: log_amx( output ); //log it completely
case 2..9:{
if( debugger )
console_print( debugger, output ); //only put it in console
console_print( 0, output ); //higher the number, more it outputs
}
case 10: log_amx( output ); //log everything (this is extremely crazy!)
}
}
|
|