this all was wrong. i mean, i had a problem the new player was getting mysql info from last disconnected player (when server is 32/32 so its always switching players)...my bad is that i thought map_end or smth like that was making a big mess...so fix is:
Code:
//Load_MySql( task )
new Data[ 2 ]
Data[ 0 ] = id
Data[ 1 ] = get_user_userid( id )
formatex(szTemp,charsmax(szTemp),"SELECT * FROM players WHERE steamid = '%s';", szSteamId)
SQL_ThreadQuery(g_SqlTuple,"register_client",szTemp,Data, sizeof( Data ) )
//and then later in register_client:
new id, uid
id = Data[ 0 ]
uid = Data[ 1 ]
if( !is_user_connected( id ) || uid != get_user_userid( id ) )
return PLUGIN_HANDLED
//and on other ThreadQueries, just to be sure
}
didnt test yet, but i see the logic here
big thanks to lazarev for pointing that out for me
__________________