Latido del corazón
#1
Busco el plugin "Latido del corazón de baja Hp"

Responder
#2
Prueba este. con la cvar heartbeat_hp configuras el valor que tu quieras para que empiece a sonar cuando tenga bajo HP.
Código PHP:
/*================================================================================
    
    ---------------------------------
    -*- Low HP Heartbeat 1.1 -*-
    ---------------------------------
    
    ~~~~~~~~~~~~~~~
    - Description -
    ~~~~~~~~~~~~~~~
    
    This plugin plays a heartbeat sound on humans when their health
    is under certain amount.
    
    ~~~~~~~~~
    - CVARS -
    ~~~~~~~~~
    
    * heartbeat_hp <50> - Heartbeats start when HP is lower than this
    
    ~~~~~~~~~~~~~~
    - Credits to -
    ~~~~~~~~~~~~~~
    
    * ConnorMcLeod, AlexBreems: for the original plugin
    
================================================================================*/

#include <amxmodx>

/*================================================================================
 [Plugin Customization]
=================================================================================*/

// Sounds
new const g_heartbeat[] = "player/heartbeat1.wav"

/*============================================================================*/

new cvar_heartbeathp

public plugin_precache()
{
    precache_sound(g_heartbeat)
}

public 
plugin_init()
{
    register_plugin("[ZP] Low HP Heartbeat""1.1""ConnorMcLeod/MeRcyLeZZ")
    
    register_event
("Damage""event_damage""be""2>0")
    register_event("DeathMsg""event_deathmsg""a")
    register_event("ResetHUD""event_resethud""be")
    register_event("Spectator""event_spectator""a")
    
    cvar_heartbeathp 
register_cvar("heartbeat_hp""50")
}

public 
event_damage(id)
{
    if (get_user_health(id) > get_pcvar_num(cvar_heartbeathp) )
        return;
    
    
// * Replaced with emit_sound so players near us can hear it too *
    //client_cmd(id, "spk %s", g_heartbeat)
    //emit_sound(id, CHAN_STATIC, g_heartbeat, 0.0, 0.0, SND_STOP, PITCH_NORM)
    
    emit_sound
(idCHAN_AUTOg_heartbeat1.0ATTN_NORM0PITCH_NORM)
}

public 
event_deathmsg()
{
    emit_sound(read_data(2), CHAN_AUTOg_heartbeat1.0ATTN_NORMSND_STOPPITCH_NORM)
}

public 
event_resethud(id)
{
    emit_sound(idCHAN_AUTOg_heartbeat1.0ATTN_NORMSND_STOPPITCH_NORM)
}

public 
event_spectator()
{
    emit_sound(read_data(1), CHAN_AUTOg_heartbeat1.0ATTN_NORMSND_STOPPITCH_NORM)

"Cada golpe es una lección, y cada lección te hace mejor."

[Imagen: b_350_20_000000_8a7300_ffffff_eeff00.png]
[Imagen: 76561198371193937.png]
Responder
#3
El .wav alguien lo tiene?
Responder
#4
(18/09/2020, 01:52 PM)Raemix01 escribió: El .wav alguien lo tiene?

Ese archivo viene por defecto en el juego.

En el caso de que no lo tengas...


Archivos adjuntos
.zip   heartbeat1.zip (Tamaño: 2.99 KB / Descargas: 3)
Responder


Salto de foro:


Usuarios navegando en este tema: 1 invitado(s)