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

Solved [REQ] Hitmarker Sounds


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 01-21-2020 , 17:07   [REQ] Hitmarker Sounds
Reply With Quote #1

Some of you might have noticed my new published plugin.

Some of you may have played Call of Duty before and know that when u hit someone, there's also some kind of "HitSound" played. Now i'm looking for possible .mp3 sounds that i can add to my plugin. All suggestions are welcome.

The reason i won't be using .wav files is cause i'll have to use emit_sound(), and therefor everyone will hear the sound and not only the player who hits his victim. (Please tell me if i'm wrong on this one)

All suggestions welcome.
__________________

Last edited by Napoleon_be; 01-22-2020 at 09:53.
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 01-21-2020 , 18:00   Re: [REQ] Hitmarker Sounds
Reply With Quote #2

What are you going to use instead of "emit_sound"?
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 01-21-2020 , 18:01   Re: [REQ] Hitmarker Sounds
Reply With Quote #3

Quote:
Originally Posted by OciXCrom View Post
What are you going to use instead of "emit_sound"?
client_cmd("spk %s"), not certain if it's allowed though.
__________________

Last edited by Napoleon_be; 01-21-2020 at 18:01.
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 01-21-2020 , 20:53   Re: [REQ] Hitmarker Sounds
Reply With Quote #4

It is. That method is most often used for .wav files, so why so you need mp3? There's also the "mp3 play %s" command for .mp3 files.
__________________

Last edited by OciXCrom; 01-21-2020 at 20:55.
OciXCrom is offline
Send a message via Skype™ to OciXCrom
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 01-22-2020 , 06:23   Re: [REQ] Hitmarker Sounds
Reply With Quote #5

Quote:
Originally Posted by OciXCrom View Post
It is. That method is most often used for .wav files, so why so you need mp3? There's also the "mp3 play %s" command for .mp3 files.
Okay didn't know that, thanks. So .wav files and .mp3 files are both fine if suggested
__________________
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
ZaX
Senior Member
Join Date: Jan 2015
Old 01-22-2020 , 07:10   Re: [REQ] Hitmarker Sounds
Reply With Quote #6

https://www.youtube.com/watch?v=RaMIIpc46gM
https://www.youtube.com/watch?v=nK71NEluAqA
https://www.youtube.com/watch?v=jgKQUpQ7RC0
ZaX is offline
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 01-22-2020 , 07:45   Re: [REQ] Hitmarker Sounds
Reply With Quote #7

Okay i have a problem here, when i precache my sound and put it in the right folder, it gets downloaded after i restart the server. But the problem is that it doesn't get downloaded the correct way, the sound is suddenly damaged or has the wrong extension.

this is how i use it

PHP Code:
new const szSound[] = "sound/hitmarkers/HitMarker.mp3";

precache_generic(szSound);

client_cmd(iAttacker"mp3 play %s"szSound); 
By the way, thanks for the suggestions ZaX
__________________

Last edited by Napoleon_be; 01-22-2020 at 07:45.
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
iceeedr
Veteran Member
Join Date: Apr 2017
Location: Brazil
Old 01-22-2020 , 08:50   Re: [REQ] Hitmarker Sounds
Reply With Quote #8

Why not?

PHP Code:
new const szSound[] = "hitmarkers/HitMarker.mp3";

precache_sound(szSound);

client_cmd(iAttacker"mp3 play %s"szSound); 
__________________


Quote:
Originally Posted by fysiks View Post
Please stop trying to help. You appear to just be posting random stuff. Wait until you actually understand more about AMX Mod X and how the game works.
https://iceeedr.com.br/
iceeedr is offline
Send a message via Skype™ to iceeedr
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 01-22-2020 , 08:52   Re: [REQ] Hitmarker Sounds
Reply With Quote #9

Quote:
Originally Posted by iceeedr View Post
Why not?

PHP Code:
new const szSound[] = "hitmarkers/HitMarker.mp3";

precache_sound(szSound);

client_cmd(iAttacker"mp3 play %s"szSound); 
Thought mp3 files should be precached using precache_generic() and not precache_sound()?
__________________
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 01-22-2020 , 09:09   Re: [REQ] Hitmarker Sounds
Reply With Quote #10

So this is what i get when i try to play the precached sound

This file cannot be played. This could be caused because the file type isn't supported, the file extension is wrongor because the file is damaged.

0xc00d36c4

EDIT: Fixed it. There was a line in my server.cfg that causes my files not to be downloaded properly amx_cvar sv_downloadurl "http://****************"
__________________

Last edited by Napoleon_be; 01-22-2020 at 09:53.
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
Reply



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 08:52.


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