Jump to content
  • 0

can anyone help me?


Krojzanovic

Question

anyone knows how to deal with it like this when I press cancel the script back to the language selection, there are those who know how to click on the English, still in the English menu

_______________________________________________
added 1 minute later

@Revoxtical @bukandewa can u help me bro hehehe

_______________________________________________
added 4 minutes later

@XxhentaixX @Enyby

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

2 hours ago, Krojzanovic said:

anyone knows how to deal with it like this when I press cancel the script back to the language selection, there are those who know how to click on the English, still in the English menu

_______________________________________________
added 1 minute later

@Revoxtical @bukandewa can u help me bro hehehe

_______________________________________________
added 4 minutes later

@XxhentaixX @Enyby

Call the select language function before "while true do"

Example :

local lang = {}
local indo = {}
local eng = {}
indo.menu = {"Pilih Menu 1", "Pilih Menu 2", "Keluar"}
indo.title = {"Pilih Menu"}
indo.toast = {"Kamu pilih menu 1", "Kamu pilih menu 2"}
eng.menu = {"Select Menu 1", "Select Menu 2", "Exit"}
eng.title = {"Select Menu"}
eng.toast = {"You select menu 1", "You select menu 2"}

function Language()
  local l = gg.choice({"English","Indonesia"}, nil, "Select Language")
  if not l then os.exit() end
  if l == 1 then lang = eng end
  if l == 2 then lang = indo end
end

function MainMenu()
  local menu = gg.choice(lang.menu, nil, lang.title[1])
  if menu ~= nil then
    if menu == 1 then gg.toast(lang.toast[1]) end
    if menu == 2 then gg.toast(lang.toast[2]) end
    if menu == 3 then os.exit() end
  end
end

Language() -- first run not repeat

-- always repeat
while true do
  if gg.isVisible() then
    gg.setVisible(false)
    MainMenu() 
  end
  gg.sleep(100)
end

 

Link to comment
Share on other sites

3 hours ago, Revoxtical said:

Call the select language function before "while true do"

Example :


local lang = {}
local indo = {}
local eng = {}
indo.menu = {"Pilih Menu 1", "Pilih Menu 2", "Keluar"}
indo.title = {"Pilih Menu"}
indo.toast = {"Kamu pilih menu 1", "Kamu pilih menu 2"}
eng.menu = {"Select Menu 1", "Select Menu 2", "Exit"}
eng.title = {"Select Menu"}
eng.toast = {"You select menu 1", "You select menu 2"}

function Language()
  local l = gg.choice({"English","Indonesia"}, nil, "Select Language")
  if not l then os.exit() end
  if l == 1 then lang = eng end
  if l == 2 then lang = indo end
end

function MainMenu()
  local menu = gg.choice(lang.menu, nil, lang.title[1])
  if menu ~= nil then
    if menu == 1 then gg.toast(lang.toast[1]) end
    if menu == 2 then gg.toast(lang.toast[2]) end
    if menu == 3 then os.exit() end
  end
end

Language() -- first run not repeat

-- always repeat
while true do
  if gg.isVisible() then
    gg.setVisible(false)
    MainMenu() 
  end
  gg.sleep(100)
end

 

thanks u ?

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.