28.08.2015, 15:17
Sadly to return the string, you cant thread the query. So;
Код:
GetFactionLeader(id) { mysql_format(g_SQL, Query, sizeof (Query), "SELECT `Nick` FROM `Factions` WHERE `id` = '%i'", id); new name[MAX_PLAYER_NAME + 1], Cache:result = mysql_query(g_SQL, Query) ; if (cache_num_rows()) { cache_get_field_content(0, "Nick", name); } else { format(name, sizeof (name), "None"); } cache_delete(result); return name; }