I using MySQL plugin R6
Yes, I know that ... I don't know how to load the names, what have the IP, for exemple: "127.0.0.1"
---------
I make this:
Код:
CMD:aka( playerid, params[ ] )
{
VACheck( playerid, 3, 2 );
new
Player
;
if ( sscanf( params, "u", Player ) )
return SendClientMessage( playerid, COLOR_ULTRARED, "USAGE: {33CCFF}/aka [PlayerID]" );
if ( !IsPlayerConnected( Player ) )
return SendError( playerid, "Player is not connected!" );
if ( PlayerInfo[ Player ][ Level ] > PlayerInfo[ playerid ][ Level ] )
return SendError( playerid, "You cannot use this command on this admin" );
new
sz_Query[ 128 ]
;
format( sz_Query, sizeof sz_Query, "SELECT `Name` FROM `Accounts` WHERE `IP` LIKE '%s'", GetPlayerIPEx( Player ) );
mysql_query( sz_Query, THREAD_LOAD_AKA, playerid );
return 1;
}
In
OnQueryFinish callback, I put these codes:
Код:
...
case THREAD_LOAD_AKA:
{
mysql_store_result( );
if ( !IsPlayerConnected( extraid ) )
return mysql_free_result( );
new
pAKA[ 256 ],
p_Aka_Names[ 25 ]
;
while( mysql_fetch_row_format( pAKA ) )
{
sscanf( pAKA, "p<|>s[25]", p_Aka_Names );
printf( "%s", p_Aka_Names );
}
FormatMSG( extraid, COLOR_ABLUE, "Aka: %s,", p_Aka_Names );
}
...
But it don't load just the last account what have IP "127.0.0.1"