27.09.2017, 15:05
You have to change query:
Correct:
After that, you can fetch like that:
First 0 = row
Second 0 = column
Also you can't use mysql_tquery like that.
tquery = threaded queries, you have to make callback for them.
In your case use mysql_query (non threded query).
And read about cleaning cache in non threaded queries - https://sampwiki.blast.hk/wiki/MySQL/R40#mysql_query
Код:
mysql_format(g_SQL, query, sizeof query, "SELECT FROM `players` WHERE `skin` = %d LIMIT 1", _tempskin);
Код:
mysql_format(g_SQL, query, sizeof query, "SELECT skin FROM `players` WHERE `id` = %d LIMIT 1", Player[playerid][ID]);
Код:
if(cache_num_rows()) { cache_get_value_index_int(0, 0, _tempskin); }
Second 0 = column
Also you can't use mysql_tquery like that.
tquery = threaded queries, you have to make callback for them.
In your case use mysql_query (non threded query).
And read about cleaning cache in non threaded queries - https://sampwiki.blast.hk/wiki/MySQL/R40#mysql_query