Forum

> > CS2D > Scripts > Healing Gun
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch Healing Gun

7 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt Healing Gun

DOOMPIXELATOR
User Off Offline

Zitieren
All I want is a gun that heals allies a bit and does a little bit of damage on enemies that's all.

alt Schnitzel Peter

KimKart
Idiot Off Offline

Zitieren
OK, but how would that work? How would you tell the projectile to hurt a specific person, but heal the other one? That's not how bullets work man. Even if it didn't use bullets, how would it work?

alt Re: Healing Gun

Bowlinghead
User Off Offline

Zitieren
cs2d lua hook hit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
-- untested
myGun = 2


addhook("hit","HealOrFeel")
function HealOrFeel(vic, kil, wpn)
	if (wpn ~= myGun) then return 0 end	

	if (player(vic,"team") == player(kil,"team")) then
		parse("sethealth "..vic.." "..player(vic,"health") + 10)
		return 1
	else
		parse("sethealth "..vic.." "..player(vic,"health") - 10)
		return 1
	end
end

alt where

DOOMPIXELATOR
User Off Offline

Zitieren
i can't find the gun itself but i added the full code
2× editiert, zuletzt 04.06.19 14:41:34
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht