local ply = LocalPlayer()
local boohbah = {}
boohbah.Target = nil
boohbah.Attacking = false
function boohbah.FindTarget()
boohbah.Target = nil
local idx = #player.GetAll()
for i = 1, idx do
local v = player.GetAll()[i]
if !v or v == ply or !IsValid(v) or !IsEntity(v) or 0 >= v:Health() or v:IsDormant() then continue end
local tdata = {
start = ply:GetShootPos(),
endpos = v:GetAttachment(v:LookupAttachment("forward")).Pos,
filter = {ply, v},
mask = MASK_SHOT,
}
local trace = util.TraceLine(tdata)
if trace.Fraction == 1 then
boohbah.Target = v
end
end
end
function boohbah.Attack(cmd)
if boohbah.Attacking then
cmd:RemoveKey(IN_ATTACK)
boohbah.Attacking = false
else
cmd:SetButtons(bit.bor(cmd:GetButtons(), IN_ATTACK))
boohbah.Attacking = true
end
end
function boohbah.Aimbot(cmd)
if boohbah.Target != nil then
local tpos = (boohbah.Target:GetAttachment(boohbah.Target:Looku pAttachment("forward")).Pos - ply:GetShootPos()):Angle()
cmd:SetViewAngles(tpos)
boohbah.Attack(cmd)
end
end
hook.Add("Think", "boohbah.FindTarget", boohbah.FindTarget)
hook.Add("CreateMove", "boohbah.Aimbot", boohbah.Aimbot)
no toggle or switch thank me for the pro codes ok bye
Originally Posted by pcdriza
yes this is an actual tv show but why
Code:
local ply = LocalPlayer()
local boohbah = {}
boohbah.Target = nil
boohbah.Attacking = false
function boohbah.FindTarget()
boohbah.Target = nil
local idx = #player.GetAll()
for i = 1, idx do
local v = player.GetAll()[i]
if !v or v == ply or !IsValid(v) or !IsEntity(v) or 0 >= v:Health() or v:IsDormant() then continue end
local tdata = {
start = ply:GetShootPos(),
endpos = v:GetAttachment(v:LookupAttachment("forward")).Pos,
filter = {ply, v},
mask = MASK_SHOT,
}
local trace = util.TraceLine(tdata)
if trace.Fraction == 1 then
boohbah.Target = v
end
end
end
function boohbah.Attack(cmd)
if boohbah.Attacking then
cmd:RemoveKey(IN_ATTACK)
boohbah.Attacking = false
else
cmd:SetButtons(bit.bor(cmd:GetButtons(), IN_ATTACK))
boohbah.Attacking = true
end
end
function boohbah.Aimbot(cmd)
if boohbah.Target != nil then
local tpos = (boohbah.Target:GetAttachment(boohbah.Target:Looku pAttachment("forward")).Pos - ply:GetShootPos()):Angle()
cmd:SetViewAngles(tpos)
boohbah.Attack(cmd)
end
end
hook.Add("Think", "boohbah.FindTarget", boohbah.FindTarget)
hook.Add("CreateMove", "boohbah.Aimbot", boohbah.Aimbot)
no toggle or switch thank me for the pro codes ok bye
I recognise this TV Show, I watched it as a kid a few times I think ;-;
Originally Posted by snipwnage3
I recognise this TV Show, I watched it as a kid a few times I think ;-;
you've had a very bad life haven't you
hahhahah xD
Originally Posted by pcdriza
Code:
local idx = #player.GetAll()
for i = 1, idx do
local v = player.GetAll()[i]
if !v or v == ply or !IsValid(v) or !IsEntity(v) or 0 >= v:Health() or v:IsDormant() then continue end
...
Please stop with this.
funny thing is i bet you actually do player iterations like this. Also remember; it's slower.
Originally Posted by ehex
Please stop with this.
funny thing is i bet you actually do player iterations like this. Also remember; it's slower.
no dude calling player.GetAll() is faster since it will actually look for players twice
when you loose an object and you search twice, you have even more chance of finding it
maybe if player.GetAll() looses some players the second call will find them back?