Raised This Month: $51 Target: $400
 12% 

Leader of the round


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
BaD CopY
Senior Member
Join Date: Oct 2014
Location: Home
Old 03-30-2015 , 16:43   Leader of the round
Reply With Quote #1

Can anyone create plugin who show best player of the round. At end of the round, plugin shows message: "Best player of the round is %s with %s kill%s (%s damage)". If 2 or more players make same number of kills in the round, frag leader will be player who taked more damage thet round!

I found one good frag leader but It's shows only nick of leader and kills in one map (not one round):

PHP Code:
public frag_leader()
{
    new 
iFrags
    
new iLeader GetLeader_Frags(iFrags)
    new 
Players UsersGetPlaying()
    new 
iPlayers[32], iNumOthers
    
new szName[32]
    
get_user_nameiLeaderszName31 )
    
get_playersiPlayersiNum"ch" )
    
    for ( new 
0iNumi++ )
    {
        
Others get_user_frags(i)
    }
    
    if ( 
Players == )
    {
        return;
    }
    
    else if ( 
iFrags == Others )
    {
        return;
    }
    else
    {
        
ColorChat(0GREEN"!g%s !yis !gleader !ywith !w%d !gkills"szNameiFrags)
    }
}

GetLeader_Frags( &iFrags )
{
    new 
iPlayers[32], iNumidiiLeaderiFrag
    get_players
iPlayersiNum"ch" )
    
    for ( 
0iNumi++ )
    {
        
id iPlayers[i]
        
iFrag get_user_frags(id)
        
        if ( 
iFrag iFrags )
        {
            
iFrags iFrag
            iLeader 
id
        
}
    }
    return 
iLeader;
}

UsersGetPlaying()
{
    static 
iPlayingid
    iPlaying 
0
    
    
for ( id 1id <= iMaxPlayersid++ )
    {
        if ( 
is_user_connected(id) )
        {
            if ( 
get_user_team(id) == || get_user_team(id) == )
            {
                
iPlaying++
            }
        }
    }
    return 
iPlaying;

BaD CopY is offline
Send a message via Yahoo to BaD CopY Send a message via Skype™ to BaD CopY
Shiina.Mashiro
Senior Member
Join Date: Sep 2014
Location: Vietnam
Old 03-31-2015 , 04:05   Re: Leader of the round
Reply With Quote #2

https://forums.alliedmods.net/showthread.php?t=237079
__________________
Shiina.Mashiro 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 08:19.


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