HelpTroubles with Chams

Posts 1–6 of 6 · Page 1 of 1
Troubles with Chams
So I keep running into the problem where my chams, when turned on, messes with all other HUDPaint functions; including but not limited to: Other cheats I've made such as player info display (like names and shit tru walls), and also the main problem, the scroll wheel hud doesn't appear when tryna switch weapons. Since I am a #LuaNoob, and tryna do this by learning, can someone help inform me? Here's the code:

Code:
hook.Add( "HUDPaint", "PlayerChams", function()
	for k, v in pairs (ents.FindByClass("player")) do
			cam.Start3D(EyePos(), EyeAngles())
				if UtilityCheck(v) == true then
					render.SuppressEngineLighting(true)
					render.SetModelLighting(255, 255, 255)
					v:DrawModel()
					render.SuppressEngineLighting(false)
			cam.End3D()
		end
	end
end)
https://hastebin com/udetenubum.lua

here's a working one. no custom material, so if you want that you have to add it yourself. look at it and figure out how to fix yours if you want, idk how you could've messed up your other shit with your chams
Quote Originally Posted by negroid View Post
https://hastebin com/udetenubum.lua

here's a working one. no custom material, so if you want that you have to add it yourself. look at it and figure out how to fix yours if you want, idk how you could've messed up your other shit with your chams
i think he'll learn more if he actually gets someone to explain what's going wrong with his code and not just a copy paste.
not that i know lol
Quote Originally Posted by ThatPurpleGuy View Post
i think he'll learn more if he actually gets someone to explain what's going wrong with his code and not just a copy paste.
not that i know lol
if he knows anything he'll be able to piece together what i made with what other people have made and figure out what's going wrong by looking at one that works.
Quote Originally Posted by JayFromSubway View Post
So I keep running into the problem where my chams, when turned on, messes with all other HUDPaint functions; including but not limited to: Other cheats I've made such as player info display (like names and shit tru walls), and also the main problem, the scroll wheel hud doesn't appear when tryna switch weapons. Since I am a #LuaNoob, and tryna do this by learning, can someone help inform me? Here's the code:

Code:
hook.Add( "HUDPaint", "PlayerChams", function()
	for k, v in pairs (ents.FindByClass("player")) do
			cam.Start3D(EyePos(), EyeAngles())
				if UtilityCheck(v) == true then
					render.SuppressEngineLighting(true)
					render.SetModelLighting(255, 255, 255)
					v:DrawModel()
					render.SuppressEngineLighting(false)
			cam.End3D()
		end
	end
end)
HUDPaint -> http://wiki.garrysmod.com/page/GM/Re...enspaceEffects

cam.Start3D(EyePos(), EyeAngles()) -> cam.Start3D()

ents.FindByClass("player") do -> player.GetAll()

call cam.Start3D and your render functions before looping through the players to cut down on function calls.

Set enginelighting to false after the loop.

also remember to restore your other render functions back to normal or unexpected problems may occur

edit: late but whatever
what's the difference between hudpaint and renderscreenspaceevents?
Posts 1–6 of 6 · Page 1 of 1

Post a Reply

Similar Threads

Talk with us