Raised This Month: $ Target: $400
 0% 

Get the player with the most frags being made


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Al3
Member
Join Date: Sep 2015
Location: Bulgaria
Old 09-28-2015 , 14:18   Get the player with the most frags being made
Reply With Quote #1

PHP Code:
get_leaders (&team1, &team2)
{
    new 
team1Frags 0team1ID 0;
    new 
team2Frags 0team2ID 0;
    
    for(new 
1<= 32i++)
    {
        new 
iFrags=        get_user_frags        (i);
        new 
CsTeams:iTeam=    cs_get_user_team    (i)
        
        if(
iFrags team1Frags && iTeam == CS_TEAM_T)
        {
            
team1Frags iFrags;
            
team1ID i;
            continue;
        }
        if(
iFrags team2Frags && iTeam == CS_TEAM_CT)
        {
            
team2Frags iFrags;
            
team2ID i;
        }
    }
    
team1 team1ID;
    
team2 team2ID;

is that the only way I can get the index of the client with the highest score ?

Last edited by Al3; 09-28-2015 at 14:19.
Al3 is offline
Send a message via Skype™ to Al3
 


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 22:15.


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