Help

Posts 115 of 17 · Page 1 of 2
Help
Hi I'm learning lua and I think I'm getting pretty good at it and I was wondering if anyone could teach me or link me to a tutorial on how to make an aimbot for gmod.
obbcenter relative aimbot
then just wait for @D3M0L1T10N to post here and he will surely help you out!
Vector oldAng = pCmd->viewangles;

HF!!!!!!!!!!
steps:

1. create a createmove hook so you can modify your local view angles and buttons (so you can shoot etc)
Code:
local function Aimbot( cmd )

end

hook.Add( "CreateMove", "aim butt", Aimbot )
2. loop through all the players and find a target, skipping players who are unsuitable (also grab our local entity cause we'll need it)
Code:
local function Aimbot( cmd )
 local lp = LocalPlayer()

 for k, v in pairs( player.GetAll() ) do
  if not ( v:Alive() ) or ( v == lp ) or ( v:IsDormant() ) then continue end
 end
end

hook.Add( "CreateMove", "aim butt", Aimbot )
3. find our aim position and call a function which does math for us to convert it into a angle (lookup "Math Behind the Hack #1 - Coding a Better Aimbot - Stop using CalcAngle" for good explanation and a better definition) and then set our angles to that
Code:
local function Aimbot( cmd )
 local lp = LocalPlayer()

 for k, v in pairs( player.GetAll() ) do
  if not ( v:Alive() ) or ( v == lp ) or ( v:IsDormant() ) then continue end

  local pos = ( v:GetPos() + v:OBBCenter() )
  local ang = ( pos - lp:GetShootPos() ):Angle()

  cmd:SetViewAngles( ang )
 end
end

hook.Add( "CreateMove", "aim butt", Aimbot )
doesn't include vischeck or autofire or anything fancy, figure that out on your own
aim pos is middle of their bounding box

untested
Wrong section. Just Google it.

- - - Updated - - -

Quote Originally Posted by D3M0L1T10N View Post
steps:

1. create a createmove hook so you can modify your local view angles and buttons (so you can shoot etc)
Code:
local function Aimbot( cmd )

end

hook.Add( "CreateMove", "aim butt", Aimbot )
2. loop through all the players and find a target, skipping players who are unsuitable (also grab our local entity cause we'll need it)
Code:
local function Aimbot( cmd )
 local lp = LocalPlayer()

 for k, v in pairs( player.GetAll() ) do
  if not ( v:Alive() ) or ( v == lp ) or ( v:IsDormant() ) then continue end
 end
end

hook.Add( "CreateMove", "aim butt", Aimbot )
3. find our aim position and call a function which does math for us to convert it into a angle (lookup "Math Behind the Hack #1 - Coding a Better Aimbot - Stop using CalcAngle" for good explanation and a better definition) and then set our angles to that
Code:
local function Aimbot( cmd )
 local lp = LocalPlayer()

 for k, v in pairs( player.GetAll() ) do
  if not ( v:Alive() ) or ( v == lp ) or ( v:IsDormant() ) then continue end

  local pos = ( v:GetPos() + v:OBBCenter() )
  local ang = ( pos - lp:GetShootPos() ):Angle()

  cmd:SetViewAngles( ang )
 end
end

hook.Add( "CreateMove", "aim butt", Aimbot )
doesn't include vischeck or autofire or anything fancy, figure that out on your own
aim pos is middle of their bounding box

untested
That code is a bit larger then needed, and is very buggy. But 110% does work.
Quote Originally Posted by D3M0L1T10N View Post
steps:

1. create a createmove hook so you can modify your local view angles and buttons (so you can shoot etc)
Code:
local function Aimbot( cmd )

end

hook.Add( "CreateMove", "aim butt", Aimbot )
2. loop through all the players and find a target, skipping players who are unsuitable (also grab our local entity cause we'll need it)
Code:
local function Aimbot( cmd )
 local lp = LocalPlayer()

 for k, v in pairs( player.GetAll() ) do
  if not ( v:Alive() ) or ( v == lp ) or ( v:IsDormant() ) then continue end
 end
end

hook.Add( "CreateMove", "aim butt", Aimbot )
3. find our aim position and call a function which does math for us to convert it into a angle (lookup "Math Behind the Hack #1 - Coding a Better Aimbot - Stop using CalcAngle" for good explanation and a better definition) and then set our angles to that
Code:
local function Aimbot( cmd )
 local lp = LocalPlayer()

 for k, v in pairs( player.GetAll() ) do
  if not ( v:Alive() ) or ( v == lp ) or ( v:IsDormant() ) then continue end

  local pos = ( v:GetPos() + v:OBBCenter() )
  local ang = ( pos - lp:GetShootPos() ):Angle()

  cmd:SetViewAngles( ang )
 end
end

hook.Add( "CreateMove", "aim butt", Aimbot )
doesn't include vischeck or autofire or anything fancy, figure that out on your own
aim pos is middle of their bounding box

untested
No duder just use trigonometry!!!!!!!!!!!!!!!!!!!
Quote Originally Posted by _Dannie_ View Post
Wrong section. Just Google it.

- - - Updated - - -



That code is a bit larger then needed, and is very buggy. But 110% does work.
it's not buggy, and if I wanted to I could make it in 1 line but I want him to understand
just play dota cheating is boring
Quote Originally Posted by Azrius View Post
just play dota cheating is boring
i hate that song
Quote Originally Posted by Azrius View Post
just play dota cheating is boring
inbe4 ******* on dota 2?
Posts 115 of 17 · Page 1 of 2

Post a Reply

Similar Threads

Tags for this Thread

None

Need help?