Raised This Month: $ Target: $400
 0% 

TOP 15 Function [Remove SQL]


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
BaD CopY
Senior Member
Join Date: Oct 2014
Location: Home
Old 05-16-2015 , 06:20   TOP 15 Function [Remove SQL]
Reply With Quote #1

Can anyone remove SQL from this code:

PHP Code:
public TopFunction(StateQueryError[], ErrorCodeData[])
{
    static 
ClientBuffer[4096], Line[4096], PlacePlaceString[16], Name[32], ScoreScoreString[16], KillsKillsString[16], DeathsDeathsString[16], PointsPointsString[16], TimeTimeString[16];

    
Buffer[0] = '^0';

    
Client str_to_num(Data);

    
Place 0;

    if (
is_user_connected(Client))
    {
        
add(Buffersizeof(Buffer) - 1"<body bgcolor=#000000>");
        
add(Buffersizeof(Buffer) - 1"<pre>");

        
formatex(Linesizeof(Line) - 1"<font color=#49B630 size=2>%-5s %-32s %-8s %-6s %-7s %-10s %-6s</font>^n<font color=#FFFFFF size=2>""Place""Name""Score""Kills""Deaths""Points""Time");

        
add(Buffersizeof(Buffer) - 1Line);

        while (
SQL_MoreResults(_:Query))
        {
            
SQL_ReadResult(_:Query0Namesizeof(Name) - 1);

            
replace_all(Namesizeof(Name) - 1"<""*");
            
replace_all(Namesizeof(Name) - 1"<""*");

            
Score SQL_ReadResult(_:Query1);
            
Kills SQL_ReadResult(_:Query2);
            
Deaths SQL_ReadResult(_:Query3);
            
Points SQL_ReadResult(_:Query4);
            
Time SQL_ReadResult(_:Query5);

            
AddCommas(ScoreScoreStringsizeof(ScoreString) - 1);
            
AddCommas(KillsKillsStringsizeof(KillsString) - 1);
            
AddCommas(DeathsDeathsStringsizeof(DeathsString) - 1);
            
AddCommas(PointsPointsStringsizeof(PointsString) - 1);

            
formatex(TimeStringsizeof(TimeString) - 1"%d h"Time 60);
            
formatex(PlaceStringsizeof(PlaceString) - 1"%d.", ++Place);

            
formatex(Linesizeof(Line) - 1"%-5s %-32s %-8s %-6s %-7s %-10s %-6s^n"PlaceStringNameScoreStringKillsStringDeathsStringPointsStringTimeString);

            
add(Buffersizeof(Buffer) - 1Line);

            
SQL_NextRow(_:Query);
        }

        
add(Buffersizeof(Buffer) - 1"</font></pre>");

        
show_motd(ClientBuffer"Ranking");
    }

    
SQL_FreeHandle(_:Query);

I want TOP 15 like this one just remove SQL and Points. THX in advance
BaD CopY is offline
Send a message via Yahoo to BaD CopY Send a message via Skype™ to BaD CopY
Reply


Thread Tools
Display Modes

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 20:09.


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