Raised This Month: $ Target: $400
 0% 

Rank, possibility lag?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
spamipolito
Junior Member
Join Date: Jun 2018
Old 06-15-2020 , 22:41   Re: Rank, possibility lag?
Reply With Quote #1

Solution:

PHP Code:
public clcmd__Rank(const id)

    static 
iData[1];
    
formatex(g_szQuerycharsmaxg_szQuery ), "select * from ( select T.*,(@rownum := @rownum + 1) as posicion from ( select * from %s group by PJ_ID order by Level DESC, KILLS DESC ) as T JOIN (SELECT @rownum := 0) r ) as w where PJ_ID = ^"%d^""szTableDatag_CharacterID[id]);

    
iData[0] = id;
    
mysql_query(g_Connection"show__Rank"g_szQueryiData1);
}

public 
show__Rank(failstateerror[], errnumdata[], sizeFloat:queuetime)  
{  
    if(
failstate == TQUERY_CONNECT_FAILED || failstate == TQUERY_QUERY_FAILED)  
    {  
        
log_to_file"SQL_LOG_TQ.txt""Error en la consulta al MySQL [%i]: %s"errnumerror );
        return;
    }
    else
    {
        new 
id data[0]

        
g__RankPosition[id] = mysql_read_result(mysql_fieldnametonum("posicion"))    

        
colorChat(id_"!g[%s]!y Rank position #%i / #%d"COMMUNITYg__RankPosition[id], g__GlobalTotalCharacters)
    }


Last edited by spamipolito; 06-15-2020 at 22:42.
spamipolito is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 17:09.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode