Red faceHelpNeed help with making a lua autoshoot.

Posts 16–27 of 27 · Page 2 of 2
Quote Originally Posted by kingboy111 View Post
enjoy!! originally made by nanocat
thenk you nenocat thenk y-
whut the phh nenocat
thenk you
thenk you nenocattttt
thenk you
Quote Originally Posted by kingboy111 View Post
Code:
local curtime = 0

function ProperCurtime()
	if (IsFirstTimePredicted()) then
		curtime = CurTime()
	end
end
hook.Add("Move", "\0", ProperCurtime)

function CreateMove(cmd)
	local w = LocalPlayer():GetActiveWeapon()

	if (w:IsValid()) then
		if (w:GetNextPrimaryFire() > curtime) then
			cmd:RemoveKey(IN_ATTACK)
		end
	end
end
hook.Add("CreateMove", "\0", CreateMove)
enjoy!! originally made by nanocat
good job ruining the code
Quote Originally Posted by D3M0L1T10N View Post
good job ruining the code
what the fuck its basically the same thing
Quote Originally Posted by suchisgood View Post
Considering you don't even know how to detour CUserCmd I don't think you have any room to talk :^)
>CUserCmd
>detour
^because you can totally detour a class

glad to see you don't know what you're talking about
Quote Originally Posted by Kona-chan View Post
>CUserCmd
>detour
^because you can totally detour a class

glad to see you don't know what you're talking about
Because you don't know what you're talking about, a "class" lmao! @D3M0L1T10N
Quote Originally Posted by suchisgood View Post
Code:
local hook = hook
local CreateConVar = CreateConVar
local GetConVarString = GetConVarString
local RunConsoleCommand = RunConsoleCommand
local debug = debug
local a = hook.Add
local c = CreateConVar
local g = GetConVarString
local _R = debug.getregistry()
local r = RunConsoleCommand
local cmd = {"CreateMove","as"}

c("auto",1, {FCVAR_ARCHIVE})

_R.Player.GetEyeTrace = _R.Player.GetEyeTrace
local e = _R.Player.GetEyeTrace

a(cmd[1],cmd[2], function( c )
	if g("auto") == "0" then return end
	local eye = e(LocalPlayer()).Entity
	if eye:IsPlayer() then
		r("+attack")
	else
		r("-attack")
	end
end)
Enjoy this, Auto 0 in the console to turn off auto shooting.
Aside from the fact that he's using cvars for the trigger bot, @suchisgood has the best example code in this thread. I haven't looked at the entire script, but everything seems to be localized and referencing registry. I'd use his.
Quote Originally Posted by Flying Gooby View Post
Aside from the fact that he's using cvars for the trigger bot, @suchisgood has the best example code in this thread. I haven't looked at the entire script, but everything seems to be localized and referencing registry. I'd use his.
lel wtf

this thread man

Code:
hook.Add( "CreateMove", "", function( cmd )
 local trace = util.TraceLine( util.GetPlayerTrace( LocalPlayer() ) )

 if ( IsValid( trace.Entity ) ) then
  cmd:SetButtons( bit.bor( cmd:GetButtons(), IN_ATTACK ) )
 end
end )
Quote Originally Posted by D3M0L1T10N View Post
lel wtf

this thread man

Code:
hook.Add( "CreateMove", "", function( cmd )
 local trace = util.TraceLine( util.GetPlayerTrace( LocalPlayer() ) )

 if ( IsValid( trace.Entity ) ) then
  cmd:SetButtons( bit.bor( cmd:GetButtons(), IN_ATTACK ) )
 end
end )
You should probably add a check to see if they're lookig at a player. As it currently stands, you're just checking if they're looking at a valid entity at all.
Quote Originally Posted by Flying Gooby View Post
You should probably add a check to see if they're lookig at a player. As it currently stands, you're just checking if they're looking at a valid entity at all.
look at how TraceLine and GetPlayerTrace work
Quote Originally Posted by D3M0L1T10N View Post
lel wtf

this thread man

Code:
hook.Add( "CreateMove", "", function( cmd )
 local trace = util.TraceLine( util.GetPlayerTrace( LocalPlayer() ) )

 if ( IsValid( trace.Entity ) ) then
  cmd:SetButtons( bit.bor( cmd:GetButtons(), IN_ATTACK ) )
 end
end )
This is actually the best method to use!

- - - Updated - - -

I should've used
Code:
cmd:SetButtons( bit.bor( cmd:GetButtons(), IN_ATTACK ) )
instead of +attack my bad since +attack is detected by anticheats!

- - - Updated - - -

Although mine is better just change the +attack and -minus attack to the above!
Won't this shoot them through walls :$
Quote Originally Posted by CSGOBooster View Post
Won't this shoot them through walls :$
no, traces stop usually when they hit a wall
Posts 16–27 of 27 · Page 2 of 2
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Talk with us