AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Approved Plugins (https://forums.alliedmods.net/forumdisplay.php?f=8)
-   -   Helmet Hit Sound (https://forums.alliedmods.net/showthread.php?t=84707)

bomnacama 01-30-2009 14:53

Helmet Hit Sound
 
2 Attachment(s)
Helmet Hit Sound

Description:

This is my first plugin, its very simple because im still learning.
This plugin adds an diferent sound to the helmet hit.
Just put the sound in sound/misc.
Credits to joaquimandrade for the help

Please report if something is wrong/buggy.

Quote:

Originally Posted by devicenull http://forums.alliedmods.net/images/...s/viewpost.gif
Some examples of plugins that will not be approved:
Any plugin that lets you play one sound in response to one event.

Thats what my plugin does, but it can be put in other way. Just think of a plugin that custumizes an existing hit sount :)

Requires:

hamsandwich
fakemeta

Change-Log:

* 1.0
- First release

SnoW 01-30-2009 15:01

Re: Helmet Hit Sound
 
Quote:

Originally Posted by bomnacama (Post 752797)
Requires:

amxmodx
amxmisc
hamsandwich
fakemeta

Only FM and Ham are modules, so you can just remove the others.

Exolent[jNr] 01-30-2009 15:51

Re: Helmet Hit Sound
 
Quote:

Originally Posted by devicenull (Post 189810)
Some examples of plugins that will not be approved:
Any plugin that lets you play one sound in response to one event.

http://forums.alliedmods.net/newrepl...reply&p=189810

bomnacama 01-30-2009 15:56

Re: Helmet Hit Sound
 
ive missed that.every one understands why we cannot post slowhacking, offensive plugins etc.but I cant understant why we cant post a plugin that does that

ConnorMcLeod 01-30-2009 16:14

Re: Helmet Hit Sound
 
It's not really a response to an event, + this is a good idea (i haven't listened the sound yet but if it's a helmet sound this is cool).


You don't need to check if the victim is valid, the fact that you register the ham forward with classname "player" is suffisent.
Also, this is not a hudge optimisation, but you can save a var by doing :
get_user_attacker(victim, hitzone, hitzone)

Or you can even try :

get_user_attacker(victim, _, hitzone)
I don't know how the compiler will react as i've never seen native such as :
native get_user_attacker(index,...);

joaquimandrade 01-30-2009 16:25

Re: Helmet Hit Sound
 
Quote:

Originally Posted by ConnorMcLeod (Post 752831)
It's not really a response to an event, + this is a good idea (i haven't listened the sound yet but if it's a helmet sound this is cool).


You don't need to check if the victim is valid, the fact that you register the ham forward with classname "player" is suffisent.
Also, this is not a hudge optimisation, but you can save a var by doing :
get_user_attacker(victim, hitzone, hitzone)

Or you can even try :

get_user_attacker(victim, _, hitzone)
I don't know how the compiler will react as i've never seen native such as :
native get_user_attacker(index,...);

Yes you're right about the classname "player". It is sufficient.
Anyway this is a response to an event. The event is called "being hit in the head when with helmet".

ConnorMcLeod 01-30-2009 16:51

Re: Helmet Hit Sound
 
I would consider that a music or a funny sound is a sound in response to an event.
You plugin is more as a nice feature added to the game.

But call that as you want :mrgreen:

joaquimandrade 01-30-2009 16:58

Re: Helmet Hit Sound
 
Quote:

Originally Posted by ConnorMcLeod (Post 752864)
I would consider that a music or a funny sound is a sound in response to an event.
You plugin is more as a nice feature added to the game.

But call that as you want :mrgreen:

This plugin is not mine. Is from bomnacama. I also think that is a nice feature but anyway i think that we can agree that it qualifies as a response to an event. Anyway, if the rule was meant to forbid plugins like this, it is stupid.

PS: Connor, to do this: get_user_attacker(victim, hitzone, hitzone), you must be sure that it is assigned the value to the last parameter after being assigned to the second parameter but, anyway, the code is uglier.

ConnorMcLeod 01-30-2009 17:22

Re: Helmet Hit Sound
 
Quote:

Originally Posted by joaquimandrade (Post 752869)
you must be sure that it is assigned the value to the last parameter after being assigned to the second parameter

I'm affraid it's not the case :(

YamiKaitou 01-30-2009 18:49

Re: Helmet Hit Sound
 
Are you planning on adding more features to this plugin? If not, then I will unapprove it per the rules


All times are GMT -4. The time now is 16:39.

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