Allied Modders en español
[Solucionado] Líder del Mapa - Versión para impresión

+- Allied Modders en español (https://amxmodx-es.com)
+-- Foro: AMX Mod X - Plugins (https://amxmodx-es.com/Forum-AMX-Mod-X-Plugins)
+--- Foro: Pedido de Plugins (https://amxmodx-es.com/Forum-Pedido-de-Plugins)
+--- Tema: [Solucionado] Líder del Mapa (/Thread-Solucionado-L%C3%ADder-del-Mapa)



[Solucionado] Líder del Mapa - Donald Duckling - 13/08/2019

Hola gente bella, espero que se estén bien. Estoy buscando este plugin que muestra el líder del mapa cada vez que empieza una nueva ronda, sus muertes y sus matanzas/puntos. Osea así [Imagen: Screenshot-2.png]

Espero que puedan ayudarme. Ante todo Gracias Mario


RE: Lider del Mapa - Nelo - 13/08/2019

https://forums.alliedmods.net/showthread.php?t=259825


RE: Lider del Mapa - totopizza - 13/08/2019

(20/11/2018, 05:29 PM)totopizza escribió: https://amxmodx-es.com/Thread-mejor-jugador-de-la-ronda-Pedido?pid=181068#pid181068

Es adaptable Whatever



RE: Lider del Mapa - Donald Duckling - 14/08/2019

(13/08/2019, 06:12 PM)totopizza escribió:
(20/11/2018, 05:29 PM)totopizza escribió: https://amxmodx-es.com/Thread-mejor-jugador-de-la-ronda-Pedido?pid=181068#pid181068

Es adaptable Whatever

Gracias me ha servido, lo he adaptado para que aparezca el mensaje en cada ronda, pero cuando empieza nueva ronda las kills y muertes siempre marcan 0. Pueden ayudarme?

Código PHP:
#include <amxmodx>
new const PluginInfo[][] = { "Round Best Player""v1.0""totopizza" };

new 
g_MaxPlayers;
new 
g_iCheckConnected;
public 
plugin_init() {
    
register_plugin(PluginInfo[0],PluginInfo[1],PluginInfo[2]);
    
    
register_event("HLTV""RoundStart""a""1=0""2=0")
    
g_MaxPlayers get_maxplayers();
    
}
public 
RoundStart(id)
{
    
    
g_iCheckConnected 0;
    new 
iBestPlayer;
    
    
iBestPlayer get_best_player();
    
    new 
asesinatosmuertes;
    
asesinatos get_user_frags(id);
    
muertes get_user_deaths(id);
    
    if(!
is_user_connected(iBestPlayer) || !iBestPlayer)
        return;
    
    new 
szPlayerName[32];
    
get_user_name(iBestPlayerszPlayerName31);
    
    
chatcolor(0,"!t%s !nes el lider del mapa con %d kills y %d muertes!"szPlayerName,asesinatos,muertes)
}

get_best_player()
{
    new 
idiLeaderiKillsiDeathsiHighestKillsiLowestDeaths;
    
    
iHighestKills = -99999;
    
iLowestDeaths =  99999;
    
    
iLeader = -1;
    new 
name[32]; 
    for( new 
1<= g_MaxPlayersi++)
    {
        
id i;
        
        if(!
is_user_connected(id))
            continue;
            
        
get_user_name(idname31);
        
iKills get_user_frags(id);
        
iDeaths get_user_deaths(id);
        
        if( 
iKills iHighestKills)
        {
            
iLeader id;
            
iLowestDeaths iDeaths;
            
iHighestKills iKills;
        }
        
        if(
iDeaths iLowestDeaths)
        {
            if( 
iKills >= iHighestKills)
            {
                
//Es el nuevo lider
                
iLeader id;
                
iLowestDeaths iDeaths;
                
iHighestKills iKills;
            }
        }
    }
    
    if(
g_iCheckConnected >= 3)
        return -
1;
    
    if(!
is_user_connected(iLeader))
    {
        
g_iCheckConnected++
        
get_best_player();
    }
        
    return 
iLeader;
}

stock chatcolor(const id, const input[], any:...)
{
    new 
count 1players[32]
    
    static 
msg[191]
    
    
vformat(msg190input3)
    
    
replace_all(msg190"!g""^4")
    
replace_all(msg190"!n""^1")
    
replace_all(msg190"!t""^3")
    
replace_all(msg190"!t2""^0")
    
    if (
idplayers[0] = id; else get_players(playerscount"ch")
    {
        for (new 
0counti++)
        {
            if (
is_user_connected(players[i]))
            {
                
message_begin(MSG_ONE_UNRELIABLEget_user_msgid("SayText"), _players[i])
                
write_byte(players[i])
                
write_string(msg)
                
message_end()
            }
        }
    }




RE: Lider del Mapa - matrix123 - 14/08/2019

Código PHP:
asesinatos get_user_frags(id);
    
muertes get_user_deaths(id); 

---------->
Código PHP:
asesinatos get_user_frags(iBestPlayer);
    
muertes get_user_deaths(iBestPlayer); 

fijate ahi.


RE: Lider del Mapa - Donald Duckling - 14/08/2019

(14/08/2019, 12:46 PM)matrix123 escribió:
Código PHP:
asesinatos get_user_frags(id);
    
muertes get_user_deaths(id); 

---------->
Código PHP:
asesinatos get_user_frags(iBestPlayer);
    
muertes get_user_deaths(iBestPlayer); 

fijate ahi.

Cool! gracias por tu ayuda Gran sonrisa. Solucionado