Bind ... noclip + forward?

I know all commands, but how do I make it so it does both of them? I want it to be like :
Bind g “+forward noclip”
But that doesn’t work.

I don’t know if that’s gonna work well, but it should be:

bind g "+forward; noclip"

i don’t think you can bind people’s keys with lua. it’s one of those blacklisted commands.

Well Actually I meant the console command, but ok.

You can, you just need to use a different technique than RunConsoleCommand’ing it :wink:

The way with the “Bind g “+forward; Noclip”” worked.

How’d you do that then? It would help a bunch, I’ve always been wondering how to do that.

I think he means the LocalPlayer():ConCommand("") way.

Isn’t it restricted too? Oh well, I’ll try it.

Doesn’t work either.

I’d say using a Source entity, like point_clientcommand then. Or is it an even more hacky way? :q:

An awful lot hackier.

Using a module then? If that’s wrong, I give up.

It is wrong :wink:


<Rambo_Sesh> the lua scripting shitlord cabal: overv, flapjack, stoned, lexi, fptje, lua*, deco da man, levybreak, tomylobo

Cool. I’m in a secret society of Lua shitlords.

hardly secret

I really should lurk more in #lauhelp then.

[lua]local longjump_mindist = CreateClientConVar(“longjump_mindist”,200,true,false)

local jumping = false

local sbox_noclip = GetConVar(“sbox_noclip”)

hook.Add(“PlayerBindPress”, “longjump”, function(ply, bind, pressed)
if bind ~= “+jump” then return end

if ply:KeyDown(IN_DUCK) then return end
if not sbox_noclip:GetBool() then return end -- noclip not allowed? bleh, then not
if jumping then return end -- prevent jump spamming from breaking the script
if ply:GetMoveType() ~= MOVETYPE_WALK then return end -- don't do anything if already in noclip

local aim = ply:GetAimVector()
if ply:KeyDown(IN_BACK) then -- dont longjump at the floor
	if aim.z &gt;= 0 then return end -- looking up while going backwards? that'd make us jump into the floor.
	if aim.z &lt;= 0 then return end -- looking down while not going backwards? nah, don't wanna

local mindist = longjump_mindist:GetFloat()
if mindist &lt; 0 then return end -- longjump_mindist -1 =&gt; disable longjump

local forward = (ply:KeyDown(IN_FORWARD ) and 1 or 0)-(ply:KeyDown(IN_BACK     ) and 1 or 0)
local left    = (ply:KeyDown(IN_MOVELEFT) and 1 or 0)-(ply:KeyDown(IN_MOVERIGHT) and 1 or 0)
aim = Vector(
local tr = {
	start  = ply:GetShootPos(),
	endpos = ply:GetShootPos() + aim*mindist,
	filter = { ply },
local trace = util.TraceLine(tr)
if trace.Hit and not trace.StartSolid then return end -- if we'd hit a wall, don't longjump. if we're already IN a wall, longjump anyway.

jumping = true
timer.Create("longjump", 0.1, 1, function(ply)
	jumping = false
return forward ~= 0 -- block +jump if jumping forward/backward

to use:
look above the horizon, press run+forward+jump

jump through the map pretty quickly

The answer was given a long time ago.