
Forum




Check if two players are facing each other
26 replies
Then just give him something like Medic Armour and 250 Health Points.
Also, you'd need to have the function get called on the

Once you've done that, just try and hit the bot from different places, and you'd notice that the function will sometimes print true when it's not supposed to, or vice-versa.
But if you urgently need images, I can try and get some, perhaps even a video.



return 1on the



Solving "facing each other" does not replicate shield behavior whatsoever.



@

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
-- pid1 - source -- pid2 - victim -- works only after bullet hit check function ShieldHit(pid1, pid2) if (player(pid1, "exists") == false or player(pid2, "exists") == false) then return(false) end if (player(pid1, "health") < 1 or player(pid2, "health") < 1) then return(false) end local p1, p2 = {}, {} p1.x = player(pid1, "x") -- + weapon offset p1.y = player(pid1, "y") -- + weapon offset p2.x = player(pid2, "x") p2.y = player(pid2, "y") p2.rot = player(pid2, "rot") local rot = math.deg(math.atan2(p1.x - p2.x, p2.y - p1.y)) local angleDif = ((p2.rot - rot + 180) % 360) - 180 return(math.abs(angleDif) < 55) end function always() if ShieldHit(1, 2) then parse("msg shieldhit *"..os.clock()) end end addhook("always", "always")
edited 5×, last 02.06.21 10:36:00 am
