06.12.2015, 21:31
Since I don't know exactly how you want the textdraw to look, I can only point you in the right direction.
Start from this link and from TexDrawCreate. Experiment with all the functions.
Now for the SQL start from here
It might look something like this:
NOTE. code not tested
Start from this link and from TexDrawCreate. Experiment with all the functions.
Now for the SQL start from here
It might look something like this:
Код:
enum tPlayers{ new userName[MAX_PLAYER_NAME], new score }; new topPlayers[10][tPlayersyers] forward OnDataLoad(); mysql_format(MySQL, query, sizeof(query), "SELECT `userName`, `score` from usersTable ORDER BY `score` DESC LIMIT 10", pname); mysql_pquery(MySQL, query, "OnDataLoad"); public OnDataLoad() { for (int i = 0; i < cache_get_row_count(); i++) { cache_get_field_content(i, "userName", topPlayers[i][userName]); topPlayers[i][score] = cache_get_field_content_int(i, "score"); } return 1; }