Руслан Миронов
Пользователь
- Регистрация
- 24 Июн 2017
- Сообщения
- 276
- Симпатии
- 3
- Предупреждения
- 30
- Пол
- Мужской
Ищу плагин чтобы можно было заменить свои звуки sound головы и гранатой и ножа буду очень благодарен.
#include <amxmodx>
#define is_user_valid(%1) (1 <= %1 <= 32)
#define SOUND "misc/knifekill2_v2"
public plugin_init()
{
register_plugin("Grenade Kill", "1.0", "Sho0ter")
return register_event("DeathMsg", "player_death", "a")
}
public plugin_precache()
{
new temp[64]
formatex(temp, 63, "%s.wav", SOUND)
return precache_sound(temp)
}
public player_death()
{
new weapon[32]
read_data(4, weapon, 31)
if(weapon[1] != 'r')
{
return PLUGIN_CONTINUE
}
new killer = read_data(1)
new victim = read_data(2)
if(is_user_valid(killer) && is_user_valid(victim))
{
new kname[32], vname[32]
get_user_name(killer, kname, 31)
get_user_name(victim, vname, 31)
client_cmd(0, "spk %s", SOUND)
set_hudmessage(255, 0, 0, -1.0, 0.75, 0, 6.0, 4.0, 0.5, 0.5, -1)
show_hudmessage(0, "%s killed %s with hegrenade", kname, vname)
}
return PLUGIN_CONTINUE
}
#include <amxmodx>
#include <dhudmessage>
#include <hamsandwich>
#include <fakemeta>
#define PLUGIN "kill sound"
#define VERSION "1.0"
#define AUTHOR "LorGenom"
#define m_LastHitGroup 75
new const g_szSounds[][] =
{
"misc/knifekill3_v1.wav",
"misc/knifekill1_v1.wav",
"misc/headshot.wav"
}
public plugin_init()
{
register_plugin(PLUGIN,VERSION,AUTHOR)
register_event("DeathMsg","event_DeathMsg","a")
}
public plugin_precache()
{
for(new i = 0; i < sizeof(g_szSounds); i++)
precache_sound(g_szSounds[i])
}
public event_DeathMsg()
{
new id = read_data(2)
new iWeapon
new iAttacker = get_user_attacker(id, iWeapon)
new killer_name[32], victim_name[32]
get_user_name(iAttacker, killer_name, 31)
get_user_name(id, victim_name, 31)
new iLastHitGroup = get_pdata_int( id, m_LastHitGroup );
if(iWeapon == CSW_KNIFE)
{
set_hudmessage(243, 180, 48, -1.0, 0.13, 0, 1.0, 1.0, 0.1, 5.0)
show_hudmessage(0, "Игрок %s, зарезал игрока %s !!!", killer_name, victim_name)
switch(random_num(1,2))
{
case 1: client_cmd(0,"spk misc/knifekill3_v1")
case 2: client_cmd(0,"spk misc/knifekill1_v1")
}
}
if( iLastHitGroup == HIT_HEAD )
{
client_cmd(0,"spk misc/headshot")
}
return PLUGIN_CONTINUE
}