just like the title says, already looked truw wiki but dint saw any things like player:CanJump(false)
if ply:Crouching then
return end
I dont know if that that works
[code]hook.Add("PlayerSpawn", "AntiJump", function(ply)
ply:SetJumpPower(0)
end )[/code]
I don't know about crouching.
[code]if( bind == "+duck" ) then
return true;
end
[/code]
[QUOTE=Horsey;16284104][code]
if( ply:Crouching() ) then
return false;
end
[/code][/QUOTE]
That won't work. In response to your second idea,
[code]hook.Add("PlayerBindPress", "AntiCrouch", function(ply, bind)
if (string.find(bind, "+duck")) then return true end
end )
[/code]
(Untested)
The second one then.
[QUOTE=Skondra;16284114]That won't work. In response to your second idea,
[code]hook.Add("PlayerBindPress", "AntiCrouch", function(ply, bind)
if (string.find(bind, "+duck")) then return true end
end )
[/code]
(Untested)[/QUOTE]
and a workaround...
[code]hook.Remove("PlayerBindPress","AntiCrouch")[/code]
omg lulz
Besides, manually typing +duck still works.
Just use code similar to player resizer and make their size for crouching the same for standing and modify the animations so it doesn't acknowledge crouching? This would involve like copy pasting and replacing the iscrouching function.
Doesnt some gamemodes replace commands or something?
like if i hit the Q or C button it will run a command named +contextmenu or something, but the gamemode denies or replace that command somehow.
Try look in the go fish gamemode, i think it does something like what i said.
i overwrited the command +jump works the same like the other one, and it works ^^
On the GMod Wiki, there's a code snippet that disables jumping. Let me go find it.
[url]http://wiki.garrysmod.com/?title=Common_Code_Snippets#Disable_jumping_on_your_server[/url]
Sorry, you need to Log In to post a reply to this thread.