InfoGarry's Mod Script Thread

Posts 211–219 of 219 · Page 15 of 15
Quote Originally Posted by poopsnake159 View Post
Still don't know what to do with this can anyone make it?
Code:
hook.Add("Think","DarkRPWeaponStealer", function()
		for k, v in pairs( ents.FindByClass( "spawned_weap*" ) ) do
			local ply = LocalPlayer()
			local target = v
			local targetpos,targetang = target:OBBCenter()
			ply:SetEyeAngles((targetpos - ply:GetShootPos()):Angle())
		end
end )
Remember to press the Thanks button.
Quote Originally Posted by Trollaux View Post


Code:
hook.Add("Think","DarkRPWeaponStealer", function()
		for k, v in pairs( ents.FindByClass( "spawned_weap*" ) ) do
			local ply = LocalPlayer()
			local target = v
			local targetpos,targetang = target:OBBCenter()
			ply:SetEyeAngles((targetpos - ply:GetShootPos()):Angle())
		end
end )
Remember to press the Thanks button.
Holy Fuck, kill me.
Use CreateMove instread of Think, it's WAYS faster.

Quote Originally Posted by Trollaux View Post


Actually I coded that myself, I don't see why I would credit him.
And I just realized I had that in there lmfao.
There's the same code in gDaap but anyway.
Just a tip, use surface.DrawLine
Quote Originally Posted by Doremi Harukaze View Post
Holy Fuck, kill me.
Use CreateMove instread of Think, it's WAYS faster.



There's the same code in gDaap but anyway.
Just a tip, use surface.DrawLine
I never knew that, thanks.

I honestly have no idea what gDaap is
I have been trying out surface.DrawLine but I cant figure out how to make it work. The lines just get glitched everywhere.
Quote Originally Posted by Trollaux View Post


Code:
hook.Add("Think","DarkRPWeaponStealer", function()
		for k, v in pairs( ents.FindByClass( "spawned_weap*" ) ) do
			local ply = LocalPlayer()
			local target = v
			local targetpos,targetang = target:OBBCenter()
			ply:SetEyeAngles((targetpos - ply:GetShootPos()):Angle())
		end
end )
Remember to press the Thanks button.
Have you tried this script? all it's doing for me is making me look in a random direction where there is no gun.
From now on, there will be no more offtopic posting in this thread.
It has become way too messy. If you instead have any questions or need help with anything in this thread
Refer to this thread. Script Thread Help & Discussion

If I see anything that isn't a script beyond this point, it will be removed.
Code:
	ANTI BLIND
		if LocalPlayer():GetNWBool("EV_Blinded") then
			LocalPlayer():SetNWBool("EV_Blinded", false)
		end
Quote Originally Posted by makee View Post
Script Name:Basic Aimbot
Description:Basic aimbotscript
Credits:Shen(NOTICE i havent done any of this code)
Code:
function aimbot()
	local ply = LocalPlayer() 
	local trace = util.GetPlayerTrace( ply )
	local traceRes = util.TraceLine( trace )
	if traceRes.HitNonWorld then
		local target = traceRes.Entity
		if target:IsPlayer() then
			local targethead = target:LookupBone("ValveBiped.Bip01_Head1")
			local targetheadpos,targetheadang = target:GetBonePosition(targethead)
			ply:SetEyeAngles((targetheadpos - ply:GetShootPos()):Angle())
		end
	end
end
hook.Add("Think","aimbot",aimbot)
There ya go your first comment on this thread
ูhow to bind a key for it ?
Quote Originally Posted by sharkybrain View Post
ูhow to bind a key for it ?
add a input.IsKeyDown check
Free Script
Script Name: TTT Traitor Wallhack
Description: Finds a Traitor when he buys a weapon in the Traitor shop, displays his name in red and shows his health.
Code:
CreateClientConVar( "wallhackttt_enabled", 0, true, false )
traitors = {"Default"}
hook.Add( "HUDPaint", "Wallhackttt", function()
    local twep = {"spiderman's_swep", "weapon_ttt_trait_defilibrator", "weapon_ttt_xbow", "weapon_ttt_dhook", "weapon_awp", "weapon_ttt_ak47", "weapon_jihadbomb", "weapon_ttt_knife", "weapon_ttt_c4", "weapon_ttt_decoy", "weapon_ttt_flaregun", "weapon_ttt_phammer", "weapon_ttt_push", "weapon_ttt_radio", "weapon_ttt_sipistol", "weapon_ttt_teleport", "weapon_ttt_awp", "weapon_mad_awp", "weapon_real_cs_g3sg1", "weapon_ttt_cvg_g3sg1", "weapon_ttt_g3sg1", "weapon_ttt_healthstation5", "weapon_ttt_sentry", "weapon_ttt_poison_dart", "weapon_ttt_trait_defibrillator"}
	if ConVarExists( "wallhackttt_enabled" ) and GetConVar("wallhackttt_enabled"):GetInt() == 1 then
 
		for k,v in pairs ( player.GetAll() ) do
 
		local Position = ( v:GetPos() + Vector( 0,0,80 ) ):ToScreen()
        local Position2 = ( v:GetPos() + Vector( 0,0,70 ) ):ToScreen()
		local Name = ""
 
		if v == LocalPlayer() then Name = "" else Name = v:Name() end
        color = Color( 255, 255, 255, 255 )
        
        
        
        if GAMEMODE****und_state == ROUND_ACTIVE then
            if has_value(traitors, v:Name()) then color = Color(255, 0, 0, 255) end    
            if not v:IsSpec() then
                draw.DrawText( Name, "Trebuchet18", Position.x, Position.y, color, 1 )
                hex = gradient(0, 100, v:Health())
                healthcolor = Color(hex2rgb(hex))
                draw.DrawText( v:Health(), "Trebuchet18", Position2.x, Position2.y, healthcolor, 1 )   
            end
	    end
        
        for _,v in pairs( ents.GetAll() ) do
            if v and IsValid(v) and (table.HasValue(twep, v:GetClass()) and !v.HatESPTracked) then
                local pl = v.Owner
                if pl and IsValid(pl) and pl:IsTerror() then
                    local Position = ( pl:GetPos() + Vector( 0,0,80 ) ):ToScreen()
		            local Name = ""
		            if pl == LocalPlayer() then Name = "" else Name = pl:Name() end
                    
                    if pl:IsDetective() then
                        color = Color(0, 0, 255, 255)
                    else
                        traitor = pl:Name()
                        color = Color(255, 0, 0, 255)
                        if not (table.HasValue(traitors,traitor)) then
                            chat.AddText( pl, Color(255,125,0), " is a ",Color(255,0,0), "TRAITOR",Color(255,125,0), " with a ",Color(255,0,0),v:GetClass().."!")
                            table.insert(traitors,#traitors+1, traitor)
                            for k, v in pairs( traitors ) do
                                print(k, v)
                            end
                        end
                    end
                    draw.DrawText( Name, "Trebuchet18", Position.x, Position.y, color, 1 )
                end
            end
        end
	end
end
end)

function hex2rgb(hex)
    hex = hex:gsub("#","")
    return tonumber("0x"..hex:sub(1,2)), tonumber("0x"..hex:sub(3,4)), tonumber("0x"..hex:sub(5,6))
end

function gradient(min, max, val)
  if (val > max) then val = max end
  if (val < min) then val = min end

  local v = val - min
  local d = (max - min) * 0.5
  local red, green

  if (v <= d) then
    green = math.floor((255 * v) / d + 0.5)
    red = 255
  else
    green = 255
    red = math.floor(255 - (255 * (v-d)) / (max - min - d) + 0.5)
  end

  return string.format("#%02x%02x00", red, green)
end
Posts 211–219 of 219 · Page 15 of 15

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us