English Heal with gutbomb

5 replies
Goto Page
To the start Previous 1 Next To the start
09.09.11 01:38:33 am
Up
Flame
BANNED
Offline Off
Can sombody make a normal working heal script ?
When a guy throws at u a gutbomb then u heal +15 hp
Rainbow for ever
09.09.11 02:07:27 am
Up
DragonAwper
User
Offline Off
Easy
Code:
1
2
3
4
5
6
addhook("hit","hitgutbomb")
function hitgutbomb(id,source,wpn,hpdmg)
if wpn == 86 then
parse("sethealth "..id.." "..player(id,"health")+15)
end
end
09.09.11 03:01:05 am
Up
archmage
User
Offline Off
@DragonAwper
That will work, but it will also inflict the damage of a gut bomb. To change that use this:

Code:
1
2
3
4
5
6
7
addhook("hit","hitgutbomb")
function hitgutbomb(id,source,wpn,hpdmg)
     if wpn == 86 then
          parse("sethealth "..id.." "..player(id,"health")+15)
          return 1 -- don't inflict dmg
     end
end
We must secure the existence of our people and a future for white children. 14/88
09.09.11 06:31:21 pm
Up
DragonAwper
User
Offline Off
Oh. I forgot the return
24.06.12 04:46:22 am
Up
unstable
User
Offline Off
Thanks for this. Now I can make glock healing
Code:
1
2
3
4
5
6
7
addhook("hit","hitglock")
function hitglock(id,source,wpn,hpdmg)
     if wpn == 2 then
          parse("sethealth "..id.." "..player(id,"health")+15)
          return 1 -- no damage
     end
end
edited 2×, last 27.06.12 02:06:07 am
24.06.12 09:13:55 am
Up
Time
User
Offline Off
Too bad mp_wpndamage doesn't accept negative values, it would make things so much easier.
IMG:https://sc-cdn.scaleengine.net/i/3a137042de3c79a4d3c69b1f036866e92.jpg
To the start Previous 1 Next To the start