[B]Hello :3[/B]
So I'm making a Gamemode - cause I'm bored - and I was wondering how I would spawn a prop every x minutes at x position.
[B]What commands would I use?[/B]
I know basic Lua and so on, but yeah.
Thanks.
[highlight](User was banned for this post ("Wrong section" - mahalis))[/highlight]
Create a timer that runs every x seconds
make a function that spawns a prop and make the timer run that function
il whip up an example
[editline]11:16PM[/editline]
This should do it :D
[lua]
-- Gamemode starts
function GM:Initialize()
timer.Simple(x, SpawnProps)
end
function SpawnProps()
-- codemonkying
end[/lua]
[editline]11:16PM[/editline]
oh, put it in init.lua :3
Ahh, thank you mate :3
Works fine ;D
That will only run once, use timer.Create to make it run every x seconds
[lua]
timer.Create("whatever",x,0,SpawnProps) --the zero tells it to repeat for infinity
[/lua]
right :p forgot about that
thats indeed what i was planning to show :x
Sorry, you need to Log In to post a reply to this thread.