Code: Select all
local function luaThread(thread)
while RunLuaThread do
-- Body
sleep(0)
end
thread.terminate()
end
RunLuaThread = true
createThread(luaThread)
Code: Select all
{$lua}
------------------------------ ENABLE ------------------------------
[ENABLE]
local function luaThread(thread)
while RunLuaThread do
-- Body
sleep(0)
end
thread.terminate()
end
----------------------------------
if syntaxcheck then return end
RunLuaThread = true
createThread(luaThread)
------------------------------ DISABLE ------------------------------
[DISABLE]
if syntaxcheck then return end
RunLuaThread = false