Thread
:
To help new plug-in
View Single Post
wy19850
Member
Join Date: Feb 2020
Location: suzhou
02-17-2020 , 11:49 Re: To help new plug-in
#
12
#include <amxmodx>
#define PLUGIN "Headshot Sound"
#define VERSION "1.0"
#define AUTHOR "Author"
new const soundfile[]="misc/head.wav" //soundfile name here
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
}
public plugin_precache() precache_sound(soundfile)
public client_death(iKiller, iVictim, iWpnIndex, iHitPlace)
{
if(iHitPlace == HIT_HEAD)
{
client_cmd(iKiller, "wav play %s", soundfile)
}
}
wy19850
View Public Profile
Send a private message to wy19850
Find More Posts by wy19850