top 10 query mysql
#1

PHP код:
CMD:top10(playeridparams[])
{
    new 
gString[900], query[70];
    new 
rows cache_num_rows();
    
    
mysql_format(g_SQLquerysizeof query"SELECT * FROM `players` WHERE `respect` > 0 ORDER BY `respect` DESC LIMIT 10"true);
    
mysql_tquery(g_SQLquery);
    
    if (
rows)
    {
        for (new 
0rows++)
        {
            
cache_get_value(i"username"pInfo[playerid][Name], MAX_PLAYER_NAME);
            
cache_get_value_int(i"respect"pInfo[playerid][Respect]);
            
format(gStringsizeof(gString), "%s%s (%s)"gStringpInfo[playerid][Name], pInfo[playerid][Respect]);
        }
        
ShowPlayerDialog(playeridDIALOG_TOPDIALOG_STYLE_LIST"/top10 players"gString"Ok""");
           
format(gStringsizeof(gString), "{99ff66}(INFO) %s ( %d ) is viewing /top10 table."PlayerName[playerid], playerid);
        
SendClientMessageToAll(-1gString);
    }
    
    return 
1;

What's wrong? even the SendClientMessageToAll not showing.
Reply


Messages In This Thread
top 10 query mysql - by wallen - 11.03.2018, 14:53
Re: top 10 query mysql - by AdamsLT - 11.03.2018, 15:07
Re: top 10 query mysql - by MBJ - 11.03.2018, 15:12
Re: top 10 query mysql - by Gammix - 11.03.2018, 16:17
Re: top 10 query mysql - by wallen - 11.03.2018, 17:09
Re: top 10 query mysql - by alanhutch - 11.03.2018, 17:20
Re: top 10 query mysql - by wallen - 11.03.2018, 17:28
Re: top 10 query mysql - by Gammix - 11.03.2018, 18:03
Re: top 10 query mysql - by AdamsLT - 11.03.2018, 18:08
Re: top 10 query mysql - by wallen - 11.03.2018, 18:13

Forum Jump:


Users browsing this thread: 1 Guest(s)