It is basically intended for making hahaha sound to everybody on server and emitting local meat slash sound (based on HL zombie hit sound, no need to precache), also making blood splash after cutting somebody
I need help here. 3 issues.
1) not emitting laugh sound when clients cvar "Mp3Volume 0" or low values
2) not working flesh sound upon death (why?)
3) How can I make a little bit not so fast splash and coming out of the body but not appearing instantly as a cloud?
CODE:
Spoiler
//This plugin is combined from Shidla's spartaknifekill and anakin_cstrike's Deathtype Effects v1.0
#include <amxmodx>
#include <fakemeta>
#include <csx>
new const g_gomerhaha[] = "sound/gomerhaha.mp3"
new const g_meatslash1[] = "zombie/claw_strike1.wav"
new const g_meatslash2[] = "zombie/claw_strike2.wav"
new const g_meatslash3[] = "zombie/claw_strike3.wav"
public plugin_init()
{
register_plugin("KNife Kill Fx", "0.1", "paradox")
}
public plugin_precache()
{
precache_generic(g_gomerhaha);
precache_sound(g_meatslash1);
precache_sound(g_meatslash2);
precache_sound(g_meatslash3);
return PLUGIN_CONTINUE
}
public client_death(killer, victim, wpnindex, hitplace, TK)
{
if((wpnindex == CSW_KNIFE) && is_user_alive(killer))
{
client_cmd(0, "Mp3Volume 1") //I need help here. how can I get user's Mp3Volume cvar parameter in order to
client_cmd(0, "mp3 play %s", g_gomerhaha); //set it back after playing the sound to client? any efficient way to do this?
switch ( random_num( 0, 2 ) )
{
case 0: emit_sound(victim,CHAN_ITEM, "g_meatslash1", 1.0, ATTN_NORM, 0, PITCH_NORM)
case 1: emit_sound(victim,CHAN_ITEM, "g_meatslash2", 1.0, ATTN_NORM, 0, PITCH_NORM)
case 2: emit_sound(victim,CHAN_ITEM, "g_meatslash3", 1.0, ATTN_NORM, 0, PITCH_NORM)
}
new vOrigin[3],coord[3];
get_user_origin(victim,vOrigin);
vOrigin[2] -= 26
coord[0] = vOrigin[0] + 150;
coord[1] = vOrigin[1] + 150;
coord[2] = vOrigin[2] + 800;
create_blood(vOrigin);
}
}
I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).