• Garry's Mod - 146 update issue. timer.Create()
    5 replies, posted
Hey, everyone, After new update ( 146 ), function timer.Create(), seems to ignore second argument after first it's delay. e.g. "timer.Create( string identifier, number delay, number repetitions, function func )" function: [B]timer.Create( "timer", 10, 0, function() LocalPlayer():ChatPrint( "Example" ) end)[/B] -- It should type in console every 10 second message "Example". But what it does is after 10 second messages "Example" keeps flooding the chat. It can be something wrong with code, but yesterday I didn't had such issue. Thanks, sOur. *UPDATED Seems [B]timer.Create( "timer", 10, 0, function() LocalPlayer():ChatPrint( "Example" ) end)[/B] is working, but code like: [code]local function GiveHint() for k,v in pairs( player.GetAll() ) do if !v:Alive() then return end v:ChatPrint( " Example " ) end end timer.Create("hints", 30, 0, GiveHint) [/code] Keeps spaming "Example", no matter that there is 30 sec. delay. Looks like after, triggering loop once it starts constantly looping through player.GetAll() and keeps ignoring timer. It can be problem either with "in pairs" loop.
garry already fixed this, wait for the next update
OK, thanks for reply.
This isn't fixed, paydays are on a mega loop
I thought that there was just an update.
[url]https://github.com/ColonelThirtyTwo/GM-Improvements[/url]
Sorry, you need to Log In to post a reply to this thread.