16.03.2014, 14:59
(
Последний раз редактировалось Guest4390857394857; 05.04.2015 в 09:05.
)
topic solved
ShowPlayerDialog(playerid,1,DIALOG_STYLE_LIST,"Score",szMessage,"Ok","Exit");
format(szMessage, sizeof(szMessage), "%d. %s - %d score", i, playerName, playerScore);
format(szMessage, sizeof(szMessage), "%d. %s - %d score\n", i, playerName, playerScore);
new szMessages[64];
format(szMessage, sizeof(szMessage), "%d. %s - %d score", i, playerName, playerScore);
format(szMessages, sizeof(szMessages), "%d. %s - %d score\n", i, playerName, playerScore); strcat(szMessage,szMessages);
CMD:top10(playerid, params[]) {
new Query[789];
format(Query, sizeof(Query), "SELECT `PlayerName`, `Kills` FROM `Account` WHERE `Kills` > 0 ORDER BY `Kills` DESC LIMIT 10");
if(mysql_ping(gSQL))
{
mysql_query(Query, _THREAD_TOP_KILLER, playerid, gSQL);
}
mysql_store_result();
if(mysql_num_rows() > 0) {
new
playerName[MAX_PLAYER_NAME],
playerScore[128],
i = 1,
szMessage[64],
dialog_Body[640],
szReturn[64];
while(mysql_fetch_row(szReturn)) {
sscanf(szReturn, "p<|>sd", playerName, playerScore);
format(szMessage, sizeof(szMessage), "\n%d. %s - %d score", i, playerName, playerScore);
strcat(dialog_Body, szMessage);
i++;
}
ShowPlayerDialog(playerid, 5012, DIALOG_STYLE_LIST, "Top Killers", dialog_Body, "OK", "");
return mysql_free_result();
}
return 1;
}
Its already threaded, but idk how to use them ((((
mysql ping _thread_something idk i'm new to Mysql and was better with R6 ,, recently updated to r7 thats y This was your result! Thank you very much +repped! Moderators can now /lock the topic! |