13.11.2013, 10:49
It it possible to add Kills board inside 1 dialog? It would be something like this. Im using my mobile i will edit something
Here is the script for top score.
Here is the script for top score.
Код HTML:
COMMAND:top(playerid, params[]) { mysql_function_query(gSQL, "SELECT `Score`, `PlayerName` FROM `"#MYSQL_TABLE"` ORDER BY `Score` ASC LIMIT 10", true, "TopPlayers", "d", playerid); return 1;
Код HTML:
forward TopPlayers(playerid); public TopPlayers(playerid) { new rows, fields, string[512], name[MAX_PLAYER_NAME], score[20], gscore; cache_get_data(rows, fields); if(rows > 0) { for(new i = 0; i < 10; i++) { cache_get_field_content(i, "Score", score); gscore = strval(score); if(gScore != 0) cache_get_field_content(i, "PlayerName", name); format(string, sizeof(string), "%s%d. %s: %d\n", string, i + 1, (gscore == 0) ? ("Slot Empty") : (name), gscore); } } format(string, sizeof(string), "Most Scored Player\n%s", string); ShowPlayerDialog(playerid, 1223, DIALOG_STYLE_MSGBOX, "Top 10", string, "Close"); return 1; }
Quote:
Top 5 //dialog title Most Scored Player 1. Empty Slot: 0 2. Empty Slot: 0 3. Empty Slot: 0 4. Empty Slot: 0 5. Empty Slot: 0 Most Killer Player 1. Empty Slot: 0 2. Empty Slot: 0 3. Empty Slot: 0 4. Empty Slot: 0 5. Empty Slot: 0 Close //close the dialog |