27.06.2016, 17:40
"u" isn't an actual thing for callbacks, it only works in sscanf.
It should be i or d (integer)
You shouldn't use a loop for that.
Just use something like this:
It should be i or d (integer)
You shouldn't use a loop for that.
Just use something like this:
Код:
mysql_tquery(connection, "SELECT * FROM helplist WHERE active = 1", "helplist", "i", playerid); forward helplist(playerid); public helplist(playerid) { new rows = cache_num_rows(); if (!rows) return SendClientMessage(playerid, -1, "No active questions."); new id, temp_sentby[35], tmp_wat[144]; for (new i = 0; i < rows; i++) { id = cache_get_field_content_int(i, "ID"); cache_get_field_content(i, "sentby", temp_sentby); cache_get_field_content(i, "wat", temp_wat); format(temp_wat, sizeof (temp_wat), "{FFFFFF}[{6f757d}Help ID%d{FFFFFF}] {6f757d}%s{FFFFFF}:'{6f757d}%s{FFFFFF}'",id,temp_sentby,temp_wat); SendClientMessage(playerid, color, temp_wat); } return 1; }