I want to customize a job with a different footstep sound.
The footstep sound is working, but I want to have the sound only when a player is running.
code:
hook.Add( "PlayerFootstep", "CustomFootstep", function( ply, pos, foot, sound, volume, rf )
if ply:getDarkRPVar("job") == "Trooper" then
ply:EmitSound( "npc/metropolice/gear5.wav" ) -- Play the footsteps hunter is using
return true -- Don't allow default footsteps, or other addon footsteps
end
end )
Garry's Mod
Need help with lua (footstep sound)
Submitted by Praindom, 05-01-2021, 12:28 PM, Thread ID: 192690
Thread Closed