Raised This Month: $ Target: $400
 0% 

[REQ] Hitsound plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Tournevis_man
Junior Member
Join Date: Apr 2008
Old 10-11-2008 , 06:26   [REQ] Hitsound plugin
Reply With Quote #1

Hello, anyone can make a hitsound plugin ? I need it for my hl2dm server.
Thanks
__________________
[IMG]http://img147.**************/img147/953/2398ka6.png[/IMG]
Tournevis_man is offline
FeuerSturm
AlliedModders Donor
Join Date: Apr 2004
Old 10-11-2008 , 07:08   Re: [REQ] Hitsound plugin
Reply With Quote #2

Quote:
Originally Posted by Tournevis_man View Post
Hello, anyone can make a hitsound plugin ? I need it for my hl2dm server.
Thanks
What exactly should the plugin do?

Just play a sound once you hit an enemy?
FeuerSturm is offline
Tournevis_man
Junior Member
Join Date: Apr 2008
Old 10-11-2008 , 07:19   Re: [REQ] Hitsound plugin
Reply With Quote #3

Yes, like the Keeper_hl2 MM/VSP plugin but for the sourcemod.
The plugins should just play a "hit sound" like "sound/buttons/blip1.wav" for head hit and "sound/buttons/button10.wav" for body hit or just hit, because grenade or crossbow dosen't register hitbox.

Thanks for you answer.
__________________
[IMG]http://img147.**************/img147/953/2398ka6.png[/IMG]

Last edited by Tournevis_man; 10-11-2008 at 07:23.
Tournevis_man is offline
FeuerSturm
AlliedModders Donor
Join Date: Apr 2004
Old 10-11-2008 , 08:24   Re: [REQ] Hitsound plugin
Reply With Quote #4

It seems that HL2DM doesn't have any event that i could
get the hitplace from, without that I won't be able to create an
easy and quick solution.

Maybe someone experienced in HL2DM scripting knows a solution,
I don't have one, sorry!
FeuerSturm is offline
Tournevis_man
Junior Member
Join Date: Apr 2008
Old 10-11-2008 , 09:15   Re: [REQ] Hitsound plugin
Reply With Quote #5

Player_hurt ? If hitbox are impossible, could you make it with only damage sound ?
__________________
[IMG]http://img147.**************/img147/953/2398ka6.png[/IMG]
Tournevis_man is offline
XARIUS
SourceMod Donor
Join Date: May 2008
Location: Atlanta, GA
Old 10-11-2008 , 09:39   Re: [REQ] Hitsound plugin
Reply With Quote #6

Quote:
Originally Posted by Tournevis_man View Post
Player_hurt ? If hitbox are impossible, could you make it with only damage sound ?
My headshot only plugin could be modified in about 60 seconds to handle this on HL2. Check my signature. It's a headshot only plugin for css. Just having my morning coffee here or I'd whip it up for ya right now. I need more brain activity before I start on anything. =)
__________________
XARIUS is offline
XARIUS
SourceMod Donor
Join Date: May 2008
Location: Atlanta, GA
Old 10-11-2008 , 09:51   Re: [REQ] Hitsound plugin
Reply With Quote #7

Looks like there are no hitboxes in the events, so here's a generic blip on any damage, played only to the attacker.

(This is for HL2/DM folks)
Attached Files
File Type: sp Get Plugin or Get Source (damagesound.sp - 776 views - 1.5 KB)
__________________

Last edited by XARIUS; 10-11-2008 at 10:12.
XARIUS is offline
FeuerSturm
AlliedModders Donor
Join Date: Apr 2004
Old 10-11-2008 , 10:03   Re: [REQ] Hitsound plugin
Reply With Quote #8

Quote:
Originally Posted by FeuerSturm View Post
It seems that HL2DM doesn't have any event that i could
get the hitplace from, without that I won't be able to create an
easy and quick solution.

Maybe someone experienced in HL2DM scripting knows a solution,
I don't have one, sorry!
Quote:
Originally Posted by XARIUS View Post
Looks like there are no hitboxes in the events, so here's a generic blip on any damage, played only to the attacker.

(This is for HL2/DM folks)
You'll run into problems with that as
- that will *try* to play a sound for fall damage, resulting in "invalid client index 0" errors
- play a sound to you if you hurt yourself with a grenade for example

so I'd change the hook's callback to:
PHP Code:
public Action:EventPlayerHurt(Handle:event, const String:name[],bool:dontBroadcast)
{
 if (
g_enabled)
 {
  new 
attacker GetClientOfUserId(GetEventInt(event"attacker"));
  new 
victim GetClientOfUserId(GetEventInt(event"userid"));
  if(
attacker != victim && attacker != && victim != 0)
  {
   
EmitSoundToClient(attackerDAMAGE_SOUND);
  }
 }
 return 
Plugin_Continue;

Just to be sure to avoid errors.
FeuerSturm is offline
XARIUS
SourceMod Donor
Join Date: May 2008
Location: Atlanta, GA
Old 10-11-2008 , 10:13   Re: [REQ] Hitsound plugin
Reply With Quote #9

Thanks for that! It certainly would have caused errors. (I'll Karma you since I already donated). =)

Oh, it won't let me. Apparently I have to spread the wealth first! Damn you for being so helpful. lol
__________________
XARIUS is offline
FeuerSturm
AlliedModders Donor
Join Date: Apr 2004
Old 10-11-2008 , 10:41   Re: [REQ] Hitsound plugin
Reply With Quote #10

Quote:
Originally Posted by XARIUS View Post
Thanks for that! It certainly would have caused errors. (I'll Karma you since I already donated). =)

Oh, it won't let me. Apparently I have to spread the wealth first! Damn you for being so helpful. lol
My motto is "To Protect and to serve", oh no, wait, that's the cops!

I'm always glad if I can help!
FeuerSturm is offline
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 07:44.


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