Se bugea el "timeprojector"
#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


Mensajes en este tema
Se bugea el "timeprojector" - por MatiasGFaria - 13/05/2020, 02:40 PM
RE: Se bugea el "timeprojector" - por Valentina. - 13/05/2020, 02:44 PM
RE: Se bugea el "timeprojector" - por MatiasGFaria - 13/05/2020, 02:49 PM
RE: Se bugea el "timeprojector" - por Valentina. - 13/05/2020, 03:10 PM
RE: Se bugea el "timeprojector" - por MatiasGFaria - 13/05/2020, 03:18 PM
RE: Se bugea el "timeprojector" - por Valentina. - 13/05/2020, 03:29 PM
RE: Se bugea el "timeprojector" - por MatiasGFaria - 13/05/2020, 03:50 PM
RE: Se bugea el "timeprojector" - por Valentina. - 13/05/2020, 03:54 PM
RE: Se bugea el "timeprojector" - por MatiasGFaria - 13/05/2020, 04:07 PM
RE: Se bugea el "timeprojector" - por Valentina. - 13/05/2020, 04:35 PM

Salto de foro:


Usuarios navegando en este tema: 1 invitado(s)