hello again, here iam with my curiosity and experiment on lua scripting
today i will make menu and the goal is to switch between language using menu text
before making this, i ve read some past topic posted by RCPOLSKI
heres his topic link RCPOLSI's Topic Link
but i will try to make my version with the goal that i want.
local lang = {' English'. ' Español'}
local langC = 0
local hackEN = {'Position'. 'Teleport'}
local hackSP = {'Posición'. 'Teletransportarse'}
function SelectLanguage()
local menu = gg.choice({lang[1], lang[2]}, nil,'ONLY SELECT ONE LANGUAGE')
if menu == nil then os.exit end
if menu == 1 then
langC = 1
Main() end
end
if menu == 2 then
langC = 2
Main() end
end
end
function Main()
if langC == 1 then
local menu = gg.choice({hackEN[1], hackEN[2]}, nil,'ONLY SELECT ONE HACK')
if menu == nil then os.exit end
if menu == 1 then
--Position Hack
end
if menu == 2 then
--Teleport Hack
end
end
if langC == 2 then
local menu = gg.choice({hackSP[1], hackSP[2]}, nil,'ONLY SELECT ONE HACK')
if menu == nil then os.exit end
if menu == 1 then
--Position Hack
end
if menu == 2 then
--Teleport Hack
end
end
end
while true do
if gg.isVisible() then
gg.setVisible(false)
SelectLanguage()
end
gg.sleep(100)
end
i wonder what i write above is correct or not, i havent try it yet.
maybe perhaps, you can shorten the script text length?