Raised This Month: $ Target: $400
 0% 

Winner map


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
daNzEt
Senior Member
Join Date: Sep 2010
Location: Romania
Old 12-26-2013 , 15:25   Winner map
Reply With Quote #1

Hello,

Can someone show me or make me a plugin that:

At the end of map to show in hudmessage (0.02, 0.70) the winner of current map (by number of frags) and play 1 sound (winner.wav)

Thank you.

Last edited by daNzEt; 12-26-2013 at 15:31.
daNzEt is offline
Send a message via Yahoo to daNzEt Send a message via Skype™ to daNzEt
daNzEt
Senior Member
Join Date: Sep 2010
Location: Romania
Old 12-27-2013 , 13:25   Re: Winner map
Reply With Quote #2

Any help with this? ...
daNzEt is offline
Send a message via Yahoo to daNzEt Send a message via Skype™ to daNzEt
d3L
BANNED
Join Date: Apr 2012
Location: Timisoara
Old 12-27-2013 , 15:24   Re: Winner map
Reply With Quote #3

Yep, also need it... but with motd insted of hud message, like that one from gungame mode.. I've seen one of this before but.. it's not working
d3L is offline
Send a message via Yahoo to d3L
Old 12-30-2013, 10:12
daNzEt
This message has been deleted by YamiKaitou. Reason: wait 14 days before you bump
daNzEt
Senior Member
Join Date: Sep 2010
Location: Romania
Old 01-02-2014 , 04:56   Re: Winner map
Reply With Quote #5

No help for this? ...
daNzEt is offline
Send a message via Yahoo to daNzEt Send a message via Skype™ to daNzEt
daNzEt
Senior Member
Join Date: Sep 2010
Location: Romania
Old 01-02-2014 , 09:11   Re: Winner map
Reply With Quote #6

I found something but i need 1 more change:

PHP Code:
#include < amxmodx > 
#include < amxmisc > 
#include < hamsandwich > 
#include < cstrike > 

#define CharsMax(%1) sizeof %1 - 1

new g_iKills[32], g_iHS[32], g_iDmg[32

public 
plugin_init() 
{     
    
RegisterHam(Ham_TakeDamage"player""hamTakeDamage"
    
    
register_event("DeathMsg""EventDeathMsg""a"
    
    
register_logevent("RoundEnd"2"1=Round_End")
}

public 
hamTakeDamage(victiminflictorattackerFloat:damageDamageBits

    if( 
<= attacker <= 32
    { 
        if(
cs_get_user_team(victim) != cs_get_user_team(attacker))
        {
            
g_iDmg[attacker] += floatround(damage
        }
        
        else
        {
            
g_iDmg[attacker] -= floatround(damage)
        }
    } 
}

public 
EventDeathMsg() 

    new 
killer     read_data(1
    new 
victim     read_data(2
    new 
is_hs     read_data(3
     
    if(
killer != victim && killer && cs_get_user_team(killer) != cs_get_user_team(victim)) 
    { 
        
g_iKills[killer]++; 
         
        if(
is_hs)
        {
            
g_iHS[killer]++;
        }
    } 
    
    else
    {
        
g_iKills[killer]--;
    }


public 
RoundEnd(id
{
    new 
iBestPlayer get_best_player()
     
    new 
szName[32
    
get_user_name(iBestPlayerszNamecharsmax(szName)) 
     
    
client_print(0print_chat"Best player of this map is %s"szName
    
client_print(0print_chat"Kills: %i (%i HS) cu %i damage"g_iKills[iBestPlayer], g_iHS[iBestPlayer], g_iDmg[iBestPlayer]) 

    for(new 
i31i++) 
    { 
        
g_iDmg[i]     = 0
        
g_iHS[i]     = 0
        
g_iKills[i] = 0
    }
    
    static 
sBuffer[1024];
    static 
iLen;
    
    
iLen formatex(sBuffersizeof sBuffer 1"<body bgcolor=#000000><font color=#7b68ee><pre>");
    
iLen += formatex(sBuffer[iLen], CharsMax(sBuffer) - iLen,"<center><h2><font color=^"red^"><B>Best player of this map is %s</B></font></h2></center>^n^n"szName);
     
    
show_motd(idsBuffer"Best Player");
}

get_best_player() 

    new 
players[32], num
    
get_players(playersnum);
    
    
SortCustom1D(playersnum"sort_bestplayer"
     
    return 
players[0]


public 
sort_bestplayer(id1id2

    if(
g_iKills[id1] > g_iKills[id2])
    {
        return -
1;
    }
    
    else if(
g_iKills[id1] < g_iKills[id2]) 
    {
        return 
1;
    }
    
    else 
    { 
        if(
g_iDmg[id1] > g_iDmg[id2]) 
        {
            return -
1;
        }
        
        else if(
g_iDmg[id1] < g_iDmg[id2]) 
        {
            return 
1;
        }
        
        else
        {
            return 
0;
        }
    } 
     
    return 
0
}

public 
client_disconnect(id

    
g_iDmg[id]         = 0
    
g_iKills[id]     = 0
    
g_iHS[id]         = 0

How can i make this to show the message in last 1 min of current map, current script show at the end for every round but i need only at the end of map before map change(last 1 min).
daNzEt is offline
Send a message via Yahoo to daNzEt Send a message via Skype™ to daNzEt
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 20:31.


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