Fakedamage doesnt damage?
Why isnt it working? I used code from blockmaker, and it isnt working even though when i use blockmaker damage works fine.
PHP Code:
|
Re: Fakedamage doesnt damage?
Do you even know if that code is being executed? Just because it "works in blockmaker" does not guarantee that it will work outside of blockmaker unless you make it work.
You need to try and debug it and see what is and isn't being executed. Then, when you find that out you will likely be able to solve the problem yourself. If you can't solve it and you at least have it narrowed down then you have a valid reason for posting. Even then, you should post the whole code to get the quickest response, so instead of writing this essay I could be checking your code. /rant |
Re: Fakedamage doesnt damage?
Quote:
|
Re: Fakedamage doesnt damage?
have you even added the float gfNextDamageTime? and what is executing it?
-----EDIT----- and btw as said many many times don't copy paste -.- |
Re: Fakedamage doesnt damage?
http://www.amxmodx.org/funcwiki.php?...mage&go=search
The damage parameter is a float value, not an integer. |
Re: Fakedamage doesnt damage?
And 2nd param isn't a "message", it's the attacking entity's classname.
Quote:
Still, it's more efficient to use ham: Code:
ExecuteHam(Ham_TakeDamage, this, idinflictor, idattacker, Float:damage, damagebits) |
Re: Fakedamage doesnt damage?
Yes fysiks, it is being executed. I thought i said it wasnt damaging. It IS in fact making noise and emitting blood. So it must be executing. Hunter-Digital, what would a players classname be? ERox, of course i have..thats quite obvious i would have to do that. Most of my errors i have solved myself before checking back at this thread, but it still isnt damaging unless i set the players health -5
Quote:
Yes, i am trying to recreate igz's damage on top thing full code: PHP Code:
Edit: of course. I somehow fixed it. I think it was exolents post that did it. But i have a new problem, it doesnt emit the blood anymore, and when i die from being stepped on it says i killed myself instead of the player whos stepping on me. How can i fix that? Oh and im pretty sure the else code from get_user_health > 0 isnt being called. How do i get it to call without constantly giving score? I get warning about vidOrigin from the blood message also. |
Re: Fakedamage doesnt damage?
Like I said, the classname is the created entity which attacks... I dunno what happens if you create a "player" entity.
Still, why don't you just use ham, you can trigger damage from another player, choose weapon and damage type. |
Re: Fakedamage doesnt damage?
Quote:
edit: how can i somehow hook when a player kills another player that way? I added client prints all over the code and i found that when a person dies the else code isnt being executed |
Re: Fakedamage doesnt damage?
:D
PHP Code:
|
All times are GMT -4. The time now is 22:43. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.