My Pointshop speed boots problem.

Ok i made me some custom speed boots that set the players speed when they run. it makes them faster. Anyways, when the player that’s wearing the boots dies. It kills them in console like 2000 times and it almost crashes my server. Can anyone help? No errors or anything just kills the player alot of times. here is my code, Feel free to copy it and use it on your server(When its fixed :wink:


ITEM.Name = 'Mystical Sneaks'
ITEM.Price = 5000
ITEM.Model = 'models/props_junk/Shoe001a.mdl'
ITEM.Bone = 'ValveBiped.Bip01_L_Foot'

function ITEM:OnHolster(ply)
       ply:Kill()
end

function ITEM:Think(ply, modifications)
	if ply:KeyDown(IN_SPEED) then
	 ply:SetRunSpeed( 300 )
	end
end

Why are you killing the player when he unequips them? If you remove that, it should work fine.

It don’t. it still has run speed even after you take them off.


ITEM.Name = 'Mystical Sneaks'
ITEM.Price = 5000
ITEM.Model = 'models/props_junk/Shoe001a.mdl'
ITEM.Bone = 'ValveBiped.Bip01_L_Foot'

function ITEM:OnHolster(ply)
	if ply:KeyDown(IN_SPEED) then
	 ply:SetRunSpeed( 250 )
end

function ITEM:Think(ply, modifications)
	if ply:KeyDown(IN_SPEED) then
	 ply:SetRunSpeed( 300 )
	end
end



Not really good at coding, But try that.

Ahh yes, that would work… It does not need the ply:keydown but it did work for me. Thank you Hydreh!