Se bugea el "timeprojector"
#1
Holaa a todos estoy usando un plugins "calentamiento de cuchilla" (al empezar la partida es de 1 minutos de calentamient de cuchillos) no tiene mucha explicacion. la cuestion, me sale en la parte central superior "Que 60 seg para finalizar el calentamiento" y tengo instalado el "Timeprojector" el caso que hace interferencia los dos plugins "PARPADEAN LOS DOS." Como puedo solucionar ese problema? no quiero desactivar ningun plugin.
Responder
#2
Pasa el plugin de calentamiento...

Tienes que crear un canal especifico porque si no sucede eso.
Responder
#3
(13/05/2020, 02:44 PM)Chema escribió: Pasa el plugin de calentamiento...

Tienes que crear un canal especifico porque si no sucede eso.

Como hago eso? y le puedes hechar un vistaso al plugin "calentamiento" me gustaria que diga con una voz "Ah empezamos el calentamiento" y "Falta 10 segundo para que termine el calentamiento" algo asi. para darle mas de motivacion.

Te lo agradezco <3


Archivos adjuntos
.sma   Descargar AMXX / calentamiento.sma (Tamaño: 3.27 KB / Descargas: 61)
Responder
#4
Acabo de ver que el calentamiento tiene canal propio, pero el timeprojector no, así que te modifiqué el timeprojector y debería funcionar..


Los sonidos tienes que buscarlos tu mismo, acá no creamos sonidos xD. (al menos yo)


Código PHP:
/*
*  AMX X Mod script.
*
* (c) Copyright 2003, ST4life
* Remade by TaL
* This file is provided as is (no warranties).
*/

#include <amxmodx>

/*
* TimeProjector displays the remaining time and the next map on the top right corner of the client
* display as a hudmessage.
*
* History:
*
* v0.1: - first release
*/

new g_hud_timer;

public 
show_timer(){
    new 
nextmap[32];
    
get_cvar_string("amx_nextmap",nextmap,31);
    new 
timeleft get_timeleft();
    
set_hudmessage(255,255,255,0.015,0.35,01.01.00.10.213);
    
ShowSyncHudMsg(0g_hud_timer"Tiempo restante: %d:%02d^nSiguiente mapa: %s"timeleft 60timeleft 60,nextmap);
    return 
PLUGIN_CONTINUE
}

public 
plugin_init()
{
    
register_plugin("TimeProjector","0.1","ST4life");
    
set_task(1.0"show_timer",0,"",0,"b");

    
g_hud_timer CreateHudSyncObj();
    return 
PLUGIN_CONTINUE;

Responder
#5
(13/05/2020, 03:10 PM)Chema escribió: Acabo de ver que el calentamiento tiene canal propio, pero el timeprojector no, así que te modifiqué el timeprojector y debería funcionar..


Los sonidos tienes que buscarlos tu mismo, acá no creamos sonidos xD. (al menos yo)



Código PHP:
/*
*  AMX X Mod script.
*
* (c) Copyright 2003, ST4life
* Remade by TaL
* This file is provided as is (no warranties).
*/

#include <amxmodx>

/*
* TimeProjector displays the remaining time and the next map on the top right corner of the client
* display as a hudmessage.
*
* History:
*
* v0.1: - first release
*/

new g_hud_timer;

public 
show_timer(){
    new nextmap[32];
    get_cvar_string("amx_nextmap",nextmap,31);
    new timeleft get_timeleft();
    set_hudmessage(255,255,255,0.015,0.35,01.01.00.10.213);
    ShowSyncHudMsg(0g_hud_timer"Tiempo restante: %d:%02d^nSiguiente mapa: %s"timeleft 60timeleft 60,nextmap);
    return PLUGIN_CONTINUE
}

public 
plugin_init()
{
    register_plugin("TimeProjector","0.1","ST4life");
    set_task(1.0"show_timer",0,"",0,"b");

    g_hud_timer CreateHudSyncObj();
    return PLUGIN_CONTINUE;


Muchisimas gracias <3 una consulta una pagina especifica de sonidos para plugin? Whatever
Responder
#6
(13/05/2020, 03:18 PM)MatiasGFaria escribió: Muchisimas gracias <3 una consulta una pagina especifica de sonidos para plugin?  Whatever

No hay una página especifica para 'sonidos de plugins'. xD

Lo que puedes hacer es grabar tu mismo el sonido y meterle efectos (? Trolleyes
Responder
#7
(13/05/2020, 03:29 PM)Chema escribió: No hay una página especifica para 'sonidos de plugins'. xD

Lo que puedes hacer es grabar tu mismo el sonido y meterle efectos (?  Trolleyes

ya eh creado algunos sonidos, como puedo ponerlo en cada sitio su sonidos?

ejemplo:
sonido.mp3 (Ah empezado el calentamiento)
sonido2.mp3 (Falta 10 segundo para terminar que termine el calentamiento)
sonido3.mp3 (5, 4, 3, 2, 1. El calentamiento a finalizado.)

hice esos 3 sonido como se lo puedo implementar al plugin?
Responder
#8
Código PHP:
new SOUND_1[] = "sounds/sonido.mp3";
new 
SOUND_2[] = "sounds/sonido2.mp3";
new 
SOUND_3[] = "sounds/sonido3.mp3";

public 
plugin_precache()
{
 
precache_generic(SOUND_1);
 
precache_generic(SOUND_2);
 
precache_generic(SOUND_3);
}


//donde quieras reproducir el sonido...
client_cmd(id"mp3 play ^"%s^""SOUND_1); // SONIDO 1

client_cmd(id"mp3 play ^"%s^""SOUND_2); // SONIDO 2

client_cmd(id"mp3 play ^"%s^""SOUND_3); // SONIDO 3 
Responder
#9
(13/05/2020, 03:54 PM)Chema escribió:
Código PHP:
new SOUND_1[] = "sounds/sonido.mp3";
new 
SOUND_2[] = "sounds/sonido2.mp3";
new 
SOUND_3[] = "sounds/sonido3.mp3";

public 
plugin_precache()
{
 
precache_generic(SOUND_1);
 
precache_generic(SOUND_2);
 
precache_generic(SOUND_3);
}


//donde quieras reproducir el sonido...
client_cmd(id"mp3 play ^"%s^""SOUND_1); // SONIDO 1

client_cmd(id"mp3 play ^"%s^""SOUND_2); // SONIDO 2

client_cmd(id"mp3 play ^"%s^""SOUND_3); // SONIDO 3 

Me sale error. ( en rojo )
{
precache_generic(SOUND_1);

Tengo que hacer un plugin aparte con esto? o pegarlo en el sma de calentamiento?
Responder
#10
Código PHP:
#include <amxmodx>
#include <amxmisc>
#include <hamsandwich>

#define PLUGIN "Simple Knife Warump"
#define VERSION "1.0"
#define AUTHOR "Sn!ff3r"

#define TASKID 1234

new hudtimercvar_timerhudhandlermp_freezetimevalue
new bool:isCalentamiento;
new 
cvar_respawnTime;

new 
SOUND_1[] = "sounds/carpeta/sonido.mp3";
new 
SOUND_2[] = "sounds/carpeta/sonido2.mp3";
new 
SOUND_3[] = "sounds/carpeta/sonido3.mp3";

public 
plugin_init() 
{
    register_plugin(PLUGINVERSIONAUTHOR)
        
    register_message
(get_user_msgid("TextMsg") ,"message_TextMsg")    
    
    register_event
("CurWeapon","switchweapon","be","1=1","2!29"
    
    
//register_dictionary("simple_warmup.txt")
    
    cvar_timer 
register_cvar("warmuptimer""60"// Duracion del calentamiento
    cvar_respawnTime register_cvar("tiempo_respawn""1.5"// Tiempo que tardarán en respawnear los usuarios
    
    mp_freezetime 
get_cvar_pointer("mp_freezetime")
    
    hudhandler 
CreateHudSyncObj()
    
}

public 
plugin_precache()
{
 
precache_generic(SOUND_1);
 
precache_generic(SOUND_2);
 
precache_generic(SOUND_3);
}

public 
plugin_cfg() 
{
    set_task(10.0"read_vars")
}

public 
read_vars()
{
    
    value 
get_pcvar_num(mp_freezetime)
}

public 
message_TextMsg(const MsgId, const MsgDest, const MsgEntity)
{
    
    
static message[64]
    get_msg_arg_string(2messagecharsmax(message))
    
    
if(equal(message"#Game_Commencing"))
    {
        hudtimer get_pcvar_num(cvar_timer)
        
        
if(hudtimer == -1)
            return
        
        
//formatex(message, charsmax(message), "%L", LANG_PLAYER, "WARUMP_START") Tienes desactivado el diccionario a si que esto sobre :v
        set_msg_arg_string(2"Ha iniciado el calentamiento")
        // client_cmd(id, "mp3 play ^"%s^"", sonido) es pa todos la musica xd
        client_cmd(0"mp3 play ^"%s^""SOUND_1);
        set_task(1.0"restart"TASKID__"b")        
        set_pcvar_num
(mp_freezetime0)
        isCalentamiento true;
    }
    if(equal(message"#Game_will_restart_in"))
    {
        //formatex(message, charsmax(message), "%L", LANG_PLAYER, "WARUMP_END") Tienes desactivado el diccionario a si que esto sobre :v
        client_cmd(0"mp3 stop")
        set_msg_arg_string(2"Ha finalizado el calentamiento")
        isCalentamiento false;
    }
}

public 
restart()
{
            
    
if(hudtimer <= 0)
    {
        remove_task(TASKID)
        set_cvar_num("sv_restartround"1)
        set_pcvar_num(mp_freezetimevalue)        
    

    else 
    {
    if (hudtimer 11)
    client_cmd(0"mp3 play ^"%s^""SOUND_2);
    else if (hudtimer 6)
    client_cmd(0"mp3 play ^"%s^""SOUND_3);
    
        set_hudmessage
(255255255, -1.00.150float(get_pcvar_num(cvar_timer)), 1.00.10.2)
        ShowSyncHudMsg(0hudhandler"Queda%s %i segundo%s para finalizar el calentamiento"hudtimer "n":""hudtimerhudtimer "s":"")
        //ShowSyncHudMsg(0, hudhandler, "%L", LANG_PLAYER, "COUNTING", hudtimer) Tienes desactivado el diccionario a si que esto sobre :v
    }    
    hudtimer
--
}

public 
switchweapon(id)
{
    if(task_exists(TASKID)) 
    {
        engclient_cmd(id"weapon_knife")
    }
}

public 
client_death(attackervictim)
{
    if(is_user_connected(victim) && isCalentamiento)
        set_task(get_pcvar_float(cvar_respawnTime), "respawn"victim)
    
    
return PLUGIN_CONTINUE
}

public 
respawn(id)
{
    if(isCalentamiento)
          ExecuteHamB(Ham_CS_RoundRespawnid

Responder


Salto de foro:


Usuarios navegando en este tema: 1 invitado(s)