HelpWall Detection Help

Posts 16 of 6 · Page 1 of 1
Wall Detection Help
So Im making an aimbot but it aims at people through walls, I have started the code but when it activates it only works when i look directly at them.


code:
local ply = LocalPlayer()

function test()
local Target = LocalPlayer():GetEyeTrace().Entity
if Target:IsPlayer() then
print("Bugger Targeted")
else
print("Bugger Is Not Visible")
end
end

hook.Add( "Think", "WallDetect", test)

Anyhelp you may give would be great. Thanks.
ValveBiped.Bip01_Head1 vnicecheat
Quote Originally Posted by poonystalker View Post
So Im making an aimbot but it aims at people through walls, I have started the code but when it activates it only works when i look directly at them.


code:
local ply = LocalPlayer()

function test()
local Target = LocalPlayer():GetEyeTrace().Entity
if Target:IsPlayer() then
print("Bugger Targeted")
else
print("Bugger Is Not Visible")
end
end

hook.Add( "Think", "WallDetect", test)

Anyhelp you may give would be great. Thanks.
http://wiki.garrysmod.com/page/util/TraceLine
make a trace and check the fraction or compare the entity
Quote Originally Posted by poonystalker View Post
So Im making an aimbot but it aims at people through walls, I have started the code but when it activates it only works when i look directly at them.


code:
local ply = LocalPlayer()

function test()
local Target = LocalPlayer():GetEyeTrace().Entity
if Target:IsPlayer() then
print("Bugger Targeted")
else
print("Bugger Is Not Visible")
end
end

hook.Add( "Think", "WallDetect", test)

Anyhelp you may give would be great. Thanks.
You need to hook the global function "Virtualprotect" to see if someone is behind you will wall.
Quote Originally Posted by poonystalker View Post
So Im making an aimbot but it aims at people through walls, I have started the code but when it activates it only works when i look directly at them.


code:
local ply = LocalPlayer()

function test()
local Target = LocalPlayer():GetEyeTrace().Entity
if Target:IsPlayer() then
print("Bugger Targeted")
else
print("Bugger Is Not Visible")
end
end

hook.Add( "Think", "WallDetect", test)

Anyhelp you may give would be great. Thanks.


As help for the OP since this still isn't marked solved and others may need help... just drawl a line between you and the target (normally v, but in this case is literally Target) and then use the this: LINENAME.HitNonWorld <--- Just use that shit and check to see if the line you drew between the LocalPlayer and the Target hits the map, and if not, continue, else...don't.
Posts 16 of 6 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Need help?