Forum

> > CS2D > Scripts > Heal with gutbomb
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch Heal with gutbomb

5 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt Heal with gutbomb

Flame
BANNED Off Offline

Zitieren
Can sombody make a normal working heal script ?
When a guy throws at u a gutbomb then u heal +15 hp

alt Re: Heal with gutbomb

DragonAwper
User Off Offline

Zitieren
Easy
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

alt Re: Heal with gutbomb

archmage
User Off Offline

Zitieren
@DragonAwper
That will work, but it will also inflict the damage of a gut bomb. To change that use this:

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

alt You are awesome :D

unstable
User Off Offline

Zitieren
Thanks for this. Now I can make glock healing
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
2× editiert, zuletzt 27.06.12 02:06:07

alt Re: Heal with gutbomb

Time
User Off Offline

Zitieren
Too bad mp_wpndamage doesn't accept negative values, it would make things so much easier.
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht