The online racing simulator
random message generator
(6 posts, started )
random message generator
hi,
since i got the free server campaign...
i would like an insim app that sends a predifined message every 30seconds, wheel4hummer made it for me, but he deleted it and doesnt feel like rewriting(he was coding for me all day poor guy)
whoever makes this app will be mentioned on the site
Is this where I say: "luaLFS could do this easily"?

For example:
announce_co = nil
announce_end = 0
announce_message = "Hello world!"

function announce()
luaLFS:mst(announce_message)
print("running thread")
announce_last_time = os.time()
while announce_end ~= 1 do
if (os.difftime(os.time(), announce_last_time) >= 30) then
luaLFS:mst(announce_message)
announce_last_time = os.time()
end
end
end

function start_announce()
announce_co = coroutine.create(announce)
coroutine.resume(announce_co)
end

function stop_annouce()
announce_end = 1
end

evt_bind(EVT_CONNECTED, start_announce)
evt_bind(EVT_DISCONNECTED, stop_annouce)

The down side is that:
* luaLFS will only work against InSim v4 now (i.e. test patches and patch X)
* This example is designed for luaLFS 0.4 and WILL hammer the computer running it - my version has a few more functions and stuff than 0.4 - expect this to be fixed in the next "release" with an updated version.
* It requires running luaLFS

Edit: If you want something specially created, let me know and I'll throw something together quickly.
nice little app wheel4hummer
thanks, will come in use for a lot of server owners.

random message generator
(6 posts, started )
FGED GREDG RDFGDR GSFDG