Proszę o poprawienie kodu jeżeli to możliwe, chciałbym dodać że gdy włączyłem pokazywanie napisu 'Headshot' w pluginie bullet_damage również mi to nie działało, choć wszystkie wymagane moduły są odblokowane.
#include <amxmodx>
#include <hamsandwich>
#include <fakemeta>
#pragma semicolon 1
#define VERSION "1.0.0"
#define get_user_last_hitgroup(%1) (get_pdata_int(%1, m_LastHitGroup, 5))
new const m_LastHitGroup = 75;
new const g_szSound[] = "misc/5gheadshot.wav";
public plugin_precache()
precache_sound(g_szSound);
public plugin_init()
{
register_plugin("Headshot Sound", VERSION, "Drekes");
RegisterHam(Ham_Killed, "player", "FwdPlayerKilledPost", 1);
}
public FwdPlayerKilledPost(iVictim, iInflictor, iKiller, Float: flDamage, iDmgBits)
{
if(iKiller && iVictim != iKiller && get_user_last_hitgroup(iVictim) == HIT_HEAD)
{
client_cmd(iVictim, "spk ^"%s^"", g_szSound);
client_cmd(iKiller, "spk ^"%s^"", g_szSound);
set_hudmessage (255, 000, 000, -1.0, 0.61, 2, 0.02, 6.0, 0.01, 0.1, -1);
show_hudmessage(iVictim, "HEADSHOT!");
set_hudmessage(000, 255, 000, -1.0, 0.61, 2, 0.02, 6.0, 0.01, 0.1, -1);
show_hudmessage(iKiller, "HEADSHOT!");
}
}
Z góry dzięki za pomoc.


Dodatki SourceMod



Temat jest zamknięty











