PHP Code:
public Load_Status(id)
{
new szSteamId[32], szTemp[512]
get_user_authid(id, szSteamId, charsmax(szSteamId))
new Data[1]
Data[0] = id
format(szTemp,charsmax(szTemp),"SELECT nick, skill FROM %s WHERE steamID = '%s'",Table,szSteamId)
SQL_ThreadQuery(g_SqlTuple,"Load_Status2",szTemp,Data,1)
}
public Load_Status2(FailState,Handle:Query,Error[],Errcode,Data[],DataSize)
{
if(FailState == TQUERY_CONNECT_FAILED)
{
log_amx("Load - Could not connect to SQL database. [%d] %s", Errcode, Error)
}
else if(FailState == TQUERY_QUERY_FAILED)
{
log_amx("Load Query failed. [%d] %s", Errcode, Error)
}
new id
id = Data[0]
if(SQL_NumResults(Query) < 1)
{
// some code here
}
else
{
SQL_ReadResult(Query, 0, nick[id], 32)
SQL_ReadResult(Query, 1, Skill[id], 32)
}
return PLUGIN_HANDLED
}
Player1- quark
Player2- Player
So, this is loading the nickname currectly, but if 2 players enter the server, it says that the first player is quark, but when the second player enter, it says that the second player name is Player, and the first player is qPlayer.
All help are welcome
__________________