Gamemode.PlayerFootstep

From GMod Wiki

Revision as of 18:01, 25 July 2010 by Zoey (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Event Hook
Hook NamePlayerFootstep
SyntaxGM:PlayerFootstep( Player Activator, Vector Position, Integer Foot, String SoundName, Float Volume, CRecipientFilter Players )
DescriptionCalled whenever a player footstep is going to be played.
ReturnsNil
Lua StateNewerShared.png
BBCode[b][url=wiki.garrysmod.com/?title=Gamemode.PlayerFootstep]Gamemode.PlayerFootstep [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]

Examples

DescriptionDisables default player footsteps(CLIENTSIDE) and plays custom ones(SERVERSIDE)
Used onNewerShared.png
Code
function GM:PlayerFootstep( ply, pos, foot, sound, volume, rf ) 
     ply:EmitSound("NPC_Hunter.Footstep") -- Play the footsteps hunter is using
     return true -- Don't allow default footsteps
 end
Outputplays a different sound when you're moving


Additional Notes

See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox