GM:PlayerFootstep

From Garry's Mod
Jump to: navigation, search
 GM:PlayerFootstep( )

Contents

Description

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

Arguments

Player ply

The stepping player

Arguments

Vector pos

The position of the step

Arguments

number foot

Foot that is stepped. 0 for left, 1 for right

Arguments

string sound

Sound that is going to play

Arguments

number volume

Volume of the footstep

Arguments

CRecipientFilter filter

The Recipient filter of players who can hear the footstep

Returns

boolean

Prevent default step sound

Examples

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


Personal tools
Navigation