I have this: (Code is not mine)
PHP Code:
public OrpheuHookReturn:OnSV_ConnectClientPre( )
{
handlePrintf = OrpheuRegisterHook( OrpheuGetFunction( "Con_Printf" ), "Con_Printf" , OrpheuHookPre );
return OrpheuIgnored;
}
public OrpheuHookReturn:Con_Printf( const a[ ], const message[ ] )
{
if( containi( message,"^" connected, address ^"" ) != -1 )
{
static len
len = 255;
static str_right[ 256 ], str_left[ 256 ], ip[ 256 ], Msg[ 256 ];
formatex( Msg,charsmax( Msg ),"%s", message );
split( Msg, str_left, len, str_right, len, "^" connected, address ^"" );
strtok( str_right, ip, len, str_right, len, ':' );
log_amx( "IP: %s", ip );
}
return OrpheuIgnored;
}
Can I get SteamID and player name where I take client IP ?
__________________