Fall damage?
Well, Hi. Another problem here...
Code:
public Ham_Damage(id, inflictor, attacker, Float:damage, Damage) |
Re: Fall damage?
Gosh, I'm so stupid :D.
Fixed, but if somebody has a problem like this here is the answer: Code:
public Ham_Damage(id, inflictor, attacker, Float:damage, Damage) |
Re: Fall damage?
Quote:
|
Re: Fall damage?
And his problem is ? I don't get it, the title says "Fall damage ?" and the code checks for knife and team... WTF ?!
It's not even a good method, if player is killed by a grenade the hook will still continue if player has knife in his hand while the grenade explodes. So, you might want to explain what you want to do, expecially if you have foreign language variable names (zwiadowca[attacker]). |
Re: Fall damage?
Quote:
|
Re: Fall damage?
Well topic name isn't really bad, because it is basicaly about fall damage.
Quote:
|
Re: Fall damage?
No it's not, you should check inflictor if it's a player index, if it is then get the player's weapon... if not, then it's a nade, c4, map entity or map itself.
Just replace "attacker != 0" with "1 <= inflictor <= maxplayers" (maxplayers is the get_maxplayers() global var) |
Re: Fall damage?
There is no need for fixing the knife kill, because somebody who has knife can't actually have c4, granade and anything what allows you to change weapon before it damages.
But thanks for the second tip, I'll try it. |
| All times are GMT -4. The time now is 00:14. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.