English Healing Gun

7 replies
Goto Page
To the start Previous 1 Next To the start
03.06.19 11:42:58 pm
Up
DOOMPIXELATOR
User
Offline Off
All I want is a gun that heals allies a bit and does a little bit of damage on enemies that's all.
03.06.19 11:53:11 pm
Up
gamus
User
Offline Off
Same. √
03.06.19 11:53:28 pm
Up
Seekay
Reviewer
Offline Off
ok
I know a good slipgate to shove you in
04.06.19 12:15:54 am
Up
KimKart
Idiot
Offline Off
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
04.06.19 01:31:30 pm
Up
Edik
User
Offline Off
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
04.06.19 01:43:31 pm
Up
Bowlinghead
User
Offline Off
cs2d lua hook hit
Code:
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
Share time limited free games here
04.06.19 02:04:25 pm
Up
DOOMPIXELATOR
User
Offline Off
i can't find the gun itself but i added the full code
edited 2×, last 04.06.19 02:41:34 pm
04.06.19 02:54:52 pm
Up
Gaios
Security Supporter
Offline Off
Negative dmg value for weapons, heal.
cs2d cmd mp_wpndmg
Spoiler >
To the start Previous 1 Next To the start