So, I've been trying to change the default player movement speed on my server. This is the changes I made to the SetSpeed function in the player_ext.lua.
The problem is when I save this to my server the code WORKS, but then it stops working again after a mapchange, and never works again unless I resave the file. I have no idea why this is the case.
[code]function plymeta:SetSpeed(slowed)
local mul = hook.Call("TTTPlayerSpeed", GAMEMODE, self, slowed) or 1
if slowed then
self:SetWalkSpeed(120 * mul)
self:SetRunSpeed(120 * mul)
self:SetMaxSpeed(120 * mul)
elseif ( self:KeyDown(IN_ALT2) ) then
self:SetWalkSpeed(330 * mul)
self:SetRunSpeed(330 * mul)
self:SetMaxSpeed(330 * mul)
else
self:SetWalkSpeed(220 * mul)
self:SetRunSpeed(220 * mul)
self:SetMaxSpeed(220 * mul)
end
end[/code]
Sorry, you need to Log In to post a reply to this thread.