NEVERMIND ive figured it out, I had the wrong keydown function, I kept putting if ply.KeyDown(IN_STRAFE) -- being wasd movement
but it was actually ply.KeyDown(IN_FORWARD) -- which strangely enough also means left right and back.
here's the code I used.
function ITEM:Think(ply, modifications)
if ply:KeyDown(IN_FORWARD) then
ply:SetRunSpeed(250) -- default/normal run speed set 500 for double speed or 300 for sprint.
end
end
SO IF ANYONE WANTS TO ADD SPEED FREAK TO THEIR POINTSHOP HERE IS THE SCRIPT MY FIRST PROJECT I WROTE MYSELF. WOOT WOOT!!!
ITEM.Name = 'Speed Freak'
ITEM.Price = 20000
ITEM.Model = 'models/props_junk/garbage_glassbottle003a.mdl'
ITEM.Bone = 'ValveBiped.Bip01_Spine2'
ITEM.NoPreview = true
function ITEM:OnEquip(ply, modifications)
ply:PS_AddClientsideModel(self.ID)
end
function ITEM:OnHolster(ply)
ply:PS_RemoveClientsideModel(self.ID)
end
function ITEM:Think(ply, modifications)
if ply:KeyDown(IN_FORWARD) then
ply:SetRunSpeed(400)
end
end