[Lua] Thread

Section's for general approaches on hacking various options in games. No online-related discussions/posts OR warez!
Post Reply
UltimatePoto42
Expert Cheater
Expert Cheater
Posts: 120
Joined: Tue May 02, 2017 6:00 am
Reputation: 15

[Lua] Thread

Post by UltimatePoto42 »

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
Last edited by TimFun13 on Tue May 01, 2018 1:08 am, edited 4 times in total.

Post Reply

Who is online

Users browsing this forum: No registered users