PHP Code:
#include <amxmodx>
#define VERSION "1.0"
new const g_szSound[][] = {
"headshot/headshot1",
"headshot/headshot2",
"headshot/headshot3"
}
public plugin_precache() {
for(new i = 0; i < sizeof(g_szSound); i++) {
precache_sound(g_szSound[i]);
}
}
public plugin_init() {
register_plugin("Headshot Sound", VERSION, "NapoleoN#");
register_event("DeathMsg", "eDeath", "a", "1>0", "2>0", "3=1");
}
public eDeath() {
client_cmd( 0, "spk ^"%s^"", g_szSound[ random_num( 0, sizeof g_szSound ) ] );
}
Old plugin from me... Got some help from xPaw with this so we were discussing what's the best way to make a headshot sound plugin, and it looks like this way is the best way
__________________