Healing Gun
7 replies



03.06.19 11:42:58 pm
All I want is a gun that heals allies a bit and does a little bit of damage on enemies that's all.
04.06.19 12:15:54 am
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?
my meme big
Medigun script
or else make your own script using this hook:
hit hook
to get player id and damage
get the team of the player with:
player
and set new health with:
sethealth
or else make your own script using this hook:
hit hook
to get player id and damage
get the team of the player with:
player
and set new health with:
sethealth

Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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
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
Share time limited free games here

04.06.19 02:04:25 pm
i can't find the gun itself but i added the full code
edited 2×, last 04.06.19 02:41:34 pm



