need simplest code!
Hello,
I need a simplest code which plays a sound when a player is knifed ! |
Re: need simplest code!
Not tested, but it should work:
On death: PHP Code:
PHP Code:
|
Re: need simplest code!
FYI, TakeDamage can be compared with HL1 event "Damage". They get executed as many times as you hit and damage a player. In other words, it's a massively overloaded function, hence not good for hooking simple events like Death. However, just in case, to provide an intuition, it's lately considered by some scripters that this event can be hooked to predict Pre-Death which is absolutely wrong. In practice, DeathMsg gets executed much before Damage during death. So, you can expect some accuracy in kill detection especially during RoundEnd which is another event to define Round Ending. So, if you ask me which event would be better, I would naturally go for "DeathMsg".
|
Re: need simplest code!
Quote:
1. When the player take a damage from knife. 2. When the player is killed by a knife. |
Re: need simplest code!
okay, if you consider that way
|
| All times are GMT -4. The time now is 06:02. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.