[Solucionado] Líder del Mapa
#1
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
Responder
#2
https://forums.alliedmods.net/showthread.php?t=259825
Responder
#3
(20/11/2018, 05:29 PM)totopizza escribió: https://amxmodx-es.com/Thread-mejor-juga...#pid181068

Es adaptable Whatever
[Imagen: b_350_20_323957_202743_f19a15_111111.png]

Estudia siempre; el tiempo es oro, lo material se puede recuperar pero el tiempo no se puede recuperar.
(02/10/2016, 05:05 PM)meTaLiCroSS escribió: Siempre me gusta ayudar cuando alguien esta interesado realmente en ver que esta programando.
(08/08/2019, 05:32 PM)meTaLiCroSS escribió: grax x el dato cr4ck


Mis aportes

PLUGINS
MAPAS
Menú LANG [SF] Sistema de Frags
Say System (Admin Prefix)
Responder
#4
(13/08/2019, 06:12 PM)totopizza escribió:
(20/11/2018, 05:29 PM)totopizza escribió: https://amxmodx-es.com/Thread-mejor-juga...#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()
            }
        }
    }

Responder
#5
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.
Responder
#6
(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
Responder


Salto de foro:


Usuarios navegando en este tema: 1 invitado(s)