LynxzGaming Posted April 24, 2018 Share Posted April 24, 2018 How to make when the choice is pressed ::begin:: menu = gg.choice({'On'}) if menu == 1 and menu(1)text is On then --menu(1) will change text to 'Off' goto begin end if menu == 1 and menu(1)text is off then --menu(1) will change text to 'On' goto begin end Link to comment Share on other sites More sharing options...
Administrators Enyby Posted April 24, 2018 Administrators Share Posted April 24, 2018 menu = gg.choice({'A', 'B'}) if menu == 1 then -- A end if menu == 2 then -- B end Link to comment Share on other sites More sharing options...
LynxzGaming Posted April 24, 2018 Author Share Posted April 24, 2018 but i want it to change the text too Link to comment Share on other sites More sharing options...
Administrators Enyby Posted April 24, 2018 Administrators Share Posted April 24, 2018 Learn Lua. Link to comment Share on other sites More sharing options...
CmP Posted April 24, 2018 Share Posted April 24, 2018 menuText = 'On' ::begin:: menu = gg.choice({menuText}) if menu == 1 and menuText == 'On' then menuText = 'Off' goto begin elseif menu == 1 and menuText == 'Off' then menuText = 'On' goto begin end Link to comment Share on other sites More sharing options...
LynxzGaming Posted April 24, 2018 Author Share Posted April 24, 2018 Thanks CmP and Enyby Link to comment Share on other sites More sharing options...
Question
LynxzGaming
How to make when the choice is pressed
::begin::
menu = gg.choice({'On'})
if menu == 1 and menu(1)text is On then
--menu(1) will change text to 'Off'
goto begin
end
if menu == 1 and menu(1)text is off then
--menu(1) will change text to 'On'
goto begin
end
Link to comment
Share on other sites
5 answers to this question
Recommended Posts
Archived
This topic is now archived and is closed to further replies.