Forum

> > CS2D > Scripts > Healing Gun
Forums overviewCS2D overview Scripts overviewLog in to reply

English Healing Gun

7 replies
To the start Previous 1 Next To the start

old Healing Gun

DOOMPIXELATOR
User Off Offline

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

old Schnitzel Peter

KimKart
Idiot Off Offline

Quote
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?

old Re: Healing Gun

Bowlinghead
User Off Offline

Quote
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

old where

DOOMPIXELATOR
User Off Offline

Quote
i can't find the gun itself but i added the full code
edited 2×, last 04.06.19 02:41:34 pm
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview