Raised This Month: $ Target: $400
 0% 

Ban the worst player and map end


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 07-20-2011 , 15:56   Re: Ban the worst player and map end
Reply With Quote #3

PHP Code:
public plugin_end()
{
    new 
players[32], pnumplayerfrags[33]
    
get_players(playerspnum)
    
    for(new 
0pnumi++)
    {
        
player players[i]
        
        if(!
zaklad[player])
            
players[i--] = players[--pnum]
        else
            
frags[player] = get_user_frags(player)
    }
    
    if(
pnum 2) return
    
    
SortCustom1D(playerspnum"SortWorstPlayers"fragssizeof(frags))
    
    new 
stop 0
    player 
players[0]
    while(++
stop pnum && frags[players[stop]] == frags[player]) { }
    
    if(
stop == pnum) return
    
    for(new 
0stopi++)
    {
        
player players[i]
        
        
get_user_name(playerfragscharsmax(frags))
        
        
server_cmd("amx_ban %d #%d ^"ReasonYou suck.^""czasget_user_userid(player))
        
log_to_file("logs.log""Zbanowany na %s"frags)
    }
}

public 
SortWorstPlayers(player1player2players[], frags[], frag_size)
{
    return 
clamp((frags[player1] - frags[player2]), -11)

__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
 



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 00:48.


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