General > Developers Corner
Anyone have experience with the PlayerFootstep hook?
(1/1)
MrPresident:
In a gamemode I'm writing, I'm trying to give players the ability to sneak. I have it working all except for the hiding footstep sounds.
--- Code: ---function footsteps( ply )
print("STEP")
if ply.sneaking then
print( "SNEAKING" )
return true
end
end
hook.Add("PlayerFootstep", "footsteps", footsteps )
--- End code ---
All of the debug messages are printing so I know the logic and the hook are being called, but I still hear the footsteps.
Any ideas?
An Error Has Occurred!
array_keys(): Argument #1 ($array) must be of type array, null given
[0] Board index
Go to full version