RESULT.Name = "run"
run2b = math.random(2,10)
runtime = math.random(15,60)
function RESULT:Trigger(ply)
local plyname = ply:GetName( )
RunConsoleCommand("ulx", "sprintspeed", plyname, run2b*240)
RunConsoleCommand("ulx", "walkspeed", plyname, run2b*220)
timer.Simple(runtime, function()
if (ply and ply:IsValid()) then
RunConsoleCommand("ulx", "sprintspeed", plyname, 240)
RunConsoleCommand("ulx", "walkspeed", plyname, 220)
ply:ChatPrint("Returned to normal speed.")
RTD:SendColoredChatMessage(ply, "Has returned to their normal speed.")
end
end)
end
function RESULT:ShowMessage(ply)
RTD:BroadcastMessageAboutPlayer(ply, "has been sped up / slowed down by", Color(0, 255, 0), run2b, color_white, " for ", Color(0, 255, 0), runtime, color_white," Seconds ", Color(0, 255, 0))
end
This seems to have worked the way i would like it to.