Raised This Month: $12 Target: $400
 3% 

Solved headshot sound


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
luciaus18
Senior Member
Join Date: Dec 2014
Old 02-21-2021 , 13:31   headshot sound
Reply With Quote #1

Hi! I have this headshot plugin but idk why it doesn't play the sound. Sound have the good format.
Code:
#include <amxmodx>

new const sound_hohoho[] = "gooba/headhunter.wav";

public plugin_init()
{
	register_plugin("HoHoHo", "0.1", "Devil.");
	register_event("DeathMsg", "ev_DeathMsg", "a");
}

public plugin_precache()
{
	precache_sound(sound_hohoho);
}

public ev_DeathMsg()
{
	new id_Killer = read_data(1);
	new iHeadShot = read_data(3);

	if (iHeadShot)
	{
		client_cmd(id_Killer, "spk ^"%s^"", sound_hohoho);
		set_hudmessage(255, 0, 0, 0.4, 0.22, 0, 6.0, 12.0);
		show_hudmessage(id_Killer, "Head Hunter!");
	}	
}

Last edited by luciaus18; 02-21-2021 at 16:39.
luciaus18 is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 02-21-2021 , 16:10   Re: headshot sound
Reply With Quote #2

Does the sound play when you type "spk gooba/headhunter.wav" in the console?
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
luciaus18
Senior Member
Join Date: Dec 2014
Old 02-21-2021 , 16:39   Re: headshot sound
Reply With Quote #3

Yes and after that it worked the plugin too as I see. Thanks!
luciaus18 is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 20:22.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode