changing speed to slow doesn't make footstep sound

I have this inside a PlayerThink


	--Sets Cremator characters correct speed and also to make animations look smoother.
	if (faction == FACTION_CREMATOR) then
		if (!infoTable.isJogging) then
			infoTable.walkSpeed = 59.97
		end;


function PLUGIN:PlayerThink(player, curTime, infoTable)

basically like


--Called every second.
function PLUGIN:PlayerThink(player, curTime, infoTable)
	--Sets Cremator characters correct speed and also to make animations look smoother.
	if (faction == FACTION_CREMATOR) then
		if (!infoTable.isJogging) then
			infoTable.walkSpeed = 59.97
		end;
	end;
end;

My problem is I don’t hear its footsteps anymore because the walking speed is so slow, if I run or crouch I hear it or jumping.


-- Called when a player's footstep sound should be played.
function PLUGIN:PlayerFootstep(player, position, foot, sound, volume, recipientFilter)
	local clothes = player:GetCharacterData("clothes");
	local model = string.lower( player:GetModel() );
	local faction = player:GetFaction();
	
	-- if (PLUGIN:PlayerIsCremator(faction)) then
-- 	if ( faction == FACTION_CREMATOR )
	if (string.find(model, "cremator")) then
			if (foot == 0) then
				local randomSounds = {1, 2, 3};
				local randomNumber = math.random(1, 3);
				
				sound = "npc/cremator/foot"..randomSounds[randomNumber]..".wav";
			end;
		end;
	
	player:EmitSound(sound);
	
end;

The framework has this thing inside it


-- Called when a player's footstep sound should be played.
function Clockwork:PlayerFootstep(player, position, foot, sound, volume, recipientFilter)
	if (CLIENT) then return true; end;

	if (!self.plugin:Call("PrePlayerDefaultFootstep", player, position, foot, sound, volume, recipientFilter)) then
		local itemTable = player:GetClothesItem();
			
		if (itemTable) then
			if ( player:IsRunning() or player:IsJogging() ) then
				if (itemTable.runSound) then
					if (type(itemTable.runSound) == "table") then
						sound = itemTable.runSound[ mathRandom(1, #itemTable.runSound) ];
					else
						sound = itemTable.runSound;
					end;
				end;
			elseif (itemTable.walkSound) then
				if (type(itemTable.walkSound) == "table") then
					sound = itemTable.walkSound[ mathRandom(1, #itemTable.walkSound) ];
				else
					sound = itemTable.walkSound;
				end;
			end;
		end;

		player:EmitSound(sound);
		
		return true;
	end;
end;

How can I make the footsteps work now?

Or you need more informations?

Using this hook

GM:PlayerStepSoundTime

In clockwork it should be something like:



function PLUGIN:PlayerStepSoundTime(ply, type, walking)
end


inside of it you’ll have to check the players faction and return the custom time between each footstep. And if not dont do anything, because if you return something it will override other hooks that change the step time.

It depends on the velocity still.
If the velocity isn’t something like 100 then the footstep is not getting played