Informacion de mapa en chat
#1
Nose se si ya existe pero busco un plugin que al comensar un ronda se muestre un mensaje en el chat con colores:

.:: Ronda: %| Players: %/32 | Mapa actual: % | Proximo mapa: % ::.


Psdt: Como puedo poner bots spectadores con nick de publicidad?
[Imagen: b_560_95_1.png]
Responder
#2
Código PHP:
#include <amxmodx>

#define R random(256)
#define G random(256)
#define B random(256)
#define time_hud 10.0

new round_countmsgsaytext
new cvar_show_msgcvar_nextmap

public plugin_init()
{
    
register_plugin("Round Info""0.2""P.Of.Pw")
    
    
register_event("TextMsg""game_comenc""a""2&#Game_C")

    
register_logevent("roundstart"2"1=Round_Start")
    
    
cvar_show_msg register_cvar("round_msg""1"// 1- msg chat color ; 2-msg hud
    
cvar_nextmap get_cvar_pointer("amx_nextmap")

    
msgsaytext get_user_msgid("SayText")
}

public 
game_comenc() 

    
round_count 0
}

public 
roundstart()
{
    new 
nextmap[32]
    
get_pcvar_string(cvar_nextmapnextmap31)

    new 
current_map[32]
    
get_mapname(current_map31)

    new 
playersnum get_playersnum()
    new 
maxplayers get_maxplayers()
    
    if (
get_pcvar_num(cvar_show_msg) == 1)
    {
        
print_color(0"^x01--[ ^x04Ronda: ^x03%d ^x01| ^x04Jugadores: ^x03%d/%d ^x04Mapa actual: ^x03%s ^x01| ^x04Siguiente mapa: ^x03%s ^x01]--",
        
round_count+=1playersnummaxplayerscurrent_mapnextmap)
    }

    else if (
get_pcvar_num(cvar_show_msg) == 2)
    {
        
set_hudmessage(RGB, -1.00.406.0time_hud)
        
show_hudmessage(0"--[ Ronda: %d | Jugadores: %d/%d^n Mapa actual: %s | Siguiente mapa: %s ]--",
        
round_count+=1playersnummaxplayerscurrent_mapnextmap)
    }
}

stock print_color(id, const message[], {Float,Sql,Result,_}:...)
{
    new 
Buffer[128],Buffer2[128],
    
players[32], indexnumi

    formatex
(Buffer2sizeof Buffer2 1"%s"message)
    
vformat(Buffersizeof Buffer 1Buffer23)
    
get_players(playersnum"c")

    if (
id
    {
        
message_begin(MSG_ONEmsgsaytext_id)
        
write_byte(id)
        
write_string(Buffer)
        
message_end()
    } 

    else 
    {
        for (
0num;i++)
        {
            
index players[i]
            if (!
is_user_connected(index)) 
                continue

            
message_begin(MSG_ONE,msgsaytext,_,index)
            
write_byte(index)
            
write_stringBuffer )
            
message_end()
        }
    }

Aprendiendo scripting Excitedeyes || Tratare ayudar en lo que pueda Trolleyes || PD: Soy pobre Cutecry
Responder
#3
Gracias :3
[Imagen: b_560_95_1.png]
Responder


Salto de foro:


Usuarios navegando en este tema: 1 invitado(s)