Quote:
Originally Posted by PyKw
Yeah I know it sucks, currently I'm trying to use only threaded query. Can you help me? Any tips how to solve? Or can you provide me a quick snippet
|
Just change the disconnect function to :
PHP Code:
public void OnClientDisconnect(int client)
{
if(!IsFakeClient(client) && g_Database != null)
{
char query[256], steamid[32];
GetClientAuthId(client, AuthId_Steam2, steamid, sizeof(steamid));
FormatEx(query, sizeof(query), "UPDATE jailbreak_test SET valoare = %i WHERE steamid = '%s'", tigari[client], steamid);
g_Database.Query(T_Generic, query);
}
}
I tested this and it's working.You already insert the data if the user is not in the database when he is connecting.