ULX

Author Topic: Anyone have experience with the PlayerFootstep hook?  (Read 2136 times)

0 Members and 1 Guest are viewing this topic.

Offline MrPresident

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 2728
  • Karma: 430
    • |G4P| Gman4President
Anyone have experience with the PlayerFootstep hook?
« on: May 04, 2014, 11:05:15 AM »
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: [Select]
function footsteps( ply )
print("STEP")
if ply.sneaking then
print( "SNEAKING" )
return true
end
end
hook.Add("PlayerFootstep", "footsteps", footsteps )

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