Garry's Mod Wiki

GM:PlayerFootstep

boolean GM:PlayerFootstep( Player ply, Vector pos, number foot, string sound, number volume, CRecipientFilter filter )

Description

Called whenever a player steps. Return true to mute the normal sound.

Arguments

1 Player ply
The stepping player
2 Vector pos
The position of the step
3 number foot
Foot that is stepped. 0 for left, 1 for right
4 string sound
Sound that is going to play
5 number volume
Volume of the footstep
6 CRecipientFilter filter
The Recipient filter of players who can hear the footstep

Returns

1 boolean
Prevent default step sound

Example

Disables default player footsteps and plays custom ones.

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

Page Links


Special Pages


Wikis

?

Render Time: 38ms

Session 0
DB GetPage 2
Generate Html 15
SaveChanges 12
Render Body 0
Render Sidebar 6