help with reduce damage
Hello all,
i need help for plugin for reduce damage if victim is have admin flag. every shot to get random heal from 1 to 5 heal without any reason what is the weapon that shoot to admin. I tryed to change one script awp_damage but does not work :( Here are a code: Code:
#include <amxmodx> |
I would just use on damage event, i'm not quite sure how the procedure you posted is called.
Code:
That will randomly heal an admin 1 - 5 hp everytime he gets shot. If you want to know what weapon, use the numeric constants e.x. CSW_HEGRENADE. Hope it helps. |
If i understand this will give heal to admin, but i want to reduce damage, to give only 5 heal from admin witout reason if has been shooted with awp or ak.
|
rofl bio, just heal the users after they get headshotted with an AWP, maybe it'll bring them back to life! ;-)
*sigh* No one understands me OR my coding. |
well that code is called BEFORE they get shot!! so.. if you wanted to, just do
if((get_user_health(Target) - Damage) < 5) set_user_health(Target, Damage + 5) That would leave them with 5 hp after the shot I believe. But personally, I think you need to learn to play cs, not have "hax" (scripts) so admins have an unfair advantage over others. |
Yes i know, this is for one my friend.
Target i replace with id but what can be Damage ? how i say how to be or what to be ? Sorry for my questions but i am newbie in cs scriptnig. |
look through the code, damage is set in this line:
new Attacker = get_user_attacker(id,Weapon,HitZone) It sets Damage to the amount of HP the shot is about to take off. |
I recive follow errors:
damage.sma(28) : error 017: undefined symbol "Target" damage.sma(29) : error 017: undefined symbol "Target" damage.sma(29) : warning 217: loose indentation damage.sma(29) : error 017: undefined symbol "Damage" damage.sma(29) : warning 215: expression has no effect damage.sma(29) : error 001: expected token: ";", but found ")" damage.sma(29) : fatal error 107: too many error messages on one line and my script is: Code:
sorry, i am really newbie with this, do you can fix my error ? |
Quote:
So Avalanche was right in his post, but he knew that.. Quote:
Maybe you just posted the wrong line of code you were talking about? Anyway, I hope that lil' bit helps.. |
Quote:
I am not sure exactly what you want, but maybe this helps (I put some comments in there): Code:
Oh, and I changed your PLUGIN_HANDLED's to PLUGIN_CONTINUE's, read comments.. I hope that helps.. |
| All times are GMT -4. The time now is 16:42. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.