Posted: Tue Jan 05, 2021 5:08 am Post subject: Re: disable script/table based on value
CHEAT EXE wrote:
how to disable script/table based on value
for example if a value is 0 then script/table enabled
if value +1 then disable script/table
I Didn't understand exactly what you meant, if you were thinking of something else than what I've done there, let me now.
Code:
local script = getAddressList().getMemoryRecordByDescription("Script_to_enable") -- getting the script (you want to enable or disable) by its description
local based_value= getAddressList().getMemoryRecordByDescription("Flight_Address_With_Value") -- getting the "based value" as you needed : how to disable script/table based on value
function CheckTheThing()
if based_value.Value == "20" then
script.Active = true -- enable the script, if you want you can even call print to be sure
else
script.Active = false -- disable the script
end
end
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum