Hi there, I've been trying to create a crappy Metal Gear-esque gamemode, and production has gone along fine... Until I came upon the issue of getting the alert working when a guard sees Snake.
I know I have to use a trace, and I've tried scouring the Gmod Wiki mirrors (other trace related searches only bring up clientside aimbots), but I'm still somewhat confused. I believe I have to use this to conduct the trace, but then I have no idea what to do from there.
function sight() if traceRes.HitNonWorld then sight = true else sight = false end end pl=player.GetByID(1) traceRes=pl:GetEyeTrace()
This is my coding for this part so far. As you can see, pretty lackluster. I need to make it so that sight only equals true if the guard see's Snake, who is on the opposite team (while ignoring the guard's teammates) but I haven't seen anything which discriminates based on team. Plus to add onto that, I need to make it so Snake can't use it, which makes it all the more worrying. Can anyone help me? It would be extremely appreciated!

Register
Events
Popular
More
Post #1



Lua Helper x 1