Having trouble with timers

So I have been messing around with timers to try and run a mapvote in sandbox (cause I want the map to change every now and then)
I am using willox’s mapvote addon

Here is where things get messy.
The code is ran from /lua/autorun/server/blah.lua
when I run:

timer.Simple( 3600, MapVote.Start(30, true, gm_) )

The server executes the vote on map load… Wich causes a lot of rejoins and all that.
I also tried running:

timer.Create( "mapvotestart1hour", 3600, 0, MapVote.Start(30, true, 9, "gm_") )

Only to get the same results…

Can anybody help me with this ?

you need to create a function for the mapvote

timer.Simple( 3600, function() MapVote.Start(30, true, gm_) end )
timer.Create( “mapvotestart1hour”, 3600, 0, function() MapVote.Start(30, true, 9, “gm_”) end )

Going to try it in a bit :slight_smile:

[editline]18th August 2016[/editline]

This actually worked! thanks Luke :slight_smile: