• How To Stop And Start A Timer.Create?
    1 replies, posted
I'm trying to create a script which will run 2 server commands every 10 minutes or so. Here is what I have got running, which works perfectly: [CODE]timer.Create("AutoULXFreezeProps", 600,0, function() game.ConsoleCommand( "ulx freezeprops\n" ) end) timer.Create("AutoULXClearDecals", 600,0, function() game.ConsoleCommand( "ulx cleardecals\n" ) end) timer.Create("AutoULXNotifcation", 600,0, function() BroadcastLua("chat.AddText(Color(0,255,0), 'AutoULXCleaner ', Color(255,255,255), '- ', Color(82,82,82), 'Props Frozen + Decals Cleared!')") end) [/CODE] Now I want to be able to use something like [B]timer.Stop[/B] and [B]timer.Start[/B] so I can control the serverside timer but on my clientside. What I am thinking is like Client runs a console command, eg +autoclean Server recognises the command Server runs: timer.Start("AutoULXFreezeProps") timer.Start("AutoULXClearDecals") timer.Start("AutoULXNotifcation") Though I am not too sure how to accomplish that. I am kinda new to lua. The reason I want to be able to control the servers timer, is so I can control is clientside with a derma menu i made: [IMG]https://cdn.discordapp.com/attachments/181529537136427011/234368270550040576/ff85046cf2704068e4745c0aeddc95e0.png[/IMG]
You should be able to still use those clientside. Timers are shared.
Sorry, you need to Log In to post a reply to this thread.