Jump to content

Multi Choice in lua script


SHELL_SCRIPT
 Share

Recommended Posts

Multi Choice in lua script


--MULTI CHOICE BY SHELL_SCRIPT

HOME = 1

function HOME()
multi = gg.multiChoice({
"CHOICE 1",
"CHOICE 2",
"CHOICE 3",
"CHOICE 4",

},nil,'MULTI CHOICE BY SHELL_SCRIPT')

if multi == nil then else
if multi[1] == true then ch1() end
if multi[2] == true then ch2() end
if multi[3] == true then ch3() end
if multi[4] == true then ch4()
end
end
HOMEDM = -1
end

function ch1()
gg.alert('CHOICE 1')
end

function ch2()
gg.alert('CHOICE 2')
end

function ch3()
gg.alert('CHOICE 3')
end

function ch4()
gg.alert('CHOICE 4')
end


while true do 
  if gg.isVisible(false) then 
   HOMEDM = 1
    gg.setVisible(false) 
  end 
  if HOMEDM == 1 then HOME() end 
 end


 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.