client_PreThink Crashing Server...
Hey all :)
I'm just trying to make someone invulnerable for a single shot (telling them they dodged it)... here's my code, not sure how it works. (I tried calling godmode from damageevent, but problem is they already do damage, then damageevent is not called again cuz they are god) Code:
Any idea whats wrong/how i can fix it/ a better way to do this? |
Use the damage event, check how much damage they did, and then add that health back to the victim!! It is easier, but it will not work for HS and stuff that does more than 100 damage.. an easy work-around is to set the users HP to something like 356, then the HUD will only show 100 HP but the user will have 356, so HS are taken care of.. then, when a users HP is below 256 just kill them!!
|
I tried that xero.. cuz that's what wc3 code did, and it did not work properly (hs = kill) on top of that you are still gushing blood everywhere, and your armour gets hurt :( :(
|
I helped him out a bit on MSN.. :)
|
OK.. getting spammed with this error:
Quote:
Quote:
Code:
|
Update....
Changed code to this:
Code:
and it works fine, except for the fact that it runs around 6 - 8 times per shot (tested with usp) is there any way to stop this? I only want it ran once per shot. EDIT: Found this off a post and added it to help, but didn't work :cry: Code:
|
Quote:
The only down-side is that you have to manage HP yourself, and spectators/dead people will see the users true HP as 1000+ even though they will die after 100 HP damage.. (Some people see this in-game and don't understand that, so they think people really have 1000+ hP :P) Seems simpler then what you are attempting with PreThink, and also would be less laggy, since PreThink is always called (and usually more than once before any action is done), whereas HP management is only done when needed, as in the Damage/Death events, and any other special effects you add.. Just my 0.5 cents! :D |
ok.. i guess I could do that, but it just seems stupid to have blood gushing out of somones head and be like you dodged the bullet! also, how would you handle the loss in armour?
EDIT: Sweet I gained another rank! on my second week here :D |
Cause you post same damn much! But, you must work on a lot of plugins to have so many questions.
|
lol, most of my days have been spent working on my new matrix mod... technically one plugins, with (currently) about 6 .inc files ... about 1000 lines in total so far. I'd love to help more, but I can't really without knowing how stuff works myself :(
|
| All times are GMT -4. The time now is 16:41. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.