Top kills
#1

PHP код:
CMD:top(playeridparams[])
{
    if(
LoggedIn[playerid] == false) return SendClientMessage(playeridCOLOR_RED"ERROR: You must be logged in.");
    
mysql_query(MySQL"SELECT `User`, `Kills` FROM `UserData` ORDER BY `Kills` DESC LIMIT 5");
    
mysql_store_result();
    new 
string[128], pName[24], pKills[5], query[256];
    if(
mysql_num_rows() != 0)
    {
        while(
mysql_fetch_row_format(query"|"))
        {
            
mysql_fetch_field_row(pName"User");
            
mysql_fetch_field_row(pKills"Kills");
            
format(stringsizeof(string), "User: %s. Kills: %i"pNamepKills);
            
SendClientMessage(playeridCOLOR_REDstring);
        }
    }
    
mysql_free_result();
    return 
1;

Kills doesn't return correct number.. it is different every time but not correct.. what am I doing wrong?
Reply


Messages In This Thread
Top kills - by C5Perfect - 15.03.2018, 23:43
Re: Top kills - by Jefff - 15.03.2018, 23:54
Re: Top kills - by C5Perfect - 16.03.2018, 00:03
Re: Top kills - by Jefff - 16.03.2018, 00:40
Re: Top kills - by C5Perfect - 16.03.2018, 00:51
Re: Top kills - by Jefff - 16.03.2018, 01:16
Re: Top kills - by C5Perfect - 16.03.2018, 02:36

Forum Jump:


Users browsing this thread: 1 Guest(s)