MrMikeMichael Posted April 5, 2022 Share Posted April 5, 2022 Hey, In my mod menu I have a function that only will find and save values. Under that I have 3 other functions that only will work if the first hack had been activated. So I wonder if there's a way to make those 3 functions only appear in my submenu if the first function has been executed once. Theory crafting.txt Link to comment Share on other sites More sharing options...
Rs92ks Posted April 5, 2022 Share Posted April 5, 2022 Use variables, and do alter menu when your script sets true after searching your value. Or check your value availability and if not, call function search. Link to comment Share on other sites More sharing options...
MrMikeMichael Posted April 5, 2022 Author Share Posted April 5, 2022 27 minutes ago, Rs92ks said: Use variables, and do alter menu when your script sets true after searching your value. Or check your value availability and if not, call function search. Have you got a template of what this might look like? Link to comment Share on other sites More sharing options...
Rs92ks Posted April 5, 2022 Share Posted April 5, 2022 Template (not really executable) --script start line local gg=gg local search=false function menu() If search==true then m=GG .menu(extended) Else m=GGmenu(short) end Function search () --code search==true Link to comment Share on other sites More sharing options...
BadCase Posted April 5, 2022 Share Posted April 5, 2022 10 hours ago, MrMikeMichael said: Hey, In my mod menu I have a function that only will find and save values. Under that I have 3 other functions that only will work if the first hack had been activated. So I wonder if there's a way to make those 3 functions only appear in my submenu if the first function has been executed once. Theory crafting.txt 2.99 kB · 3 downloads I think this should work hasRun = false function SSM() local menu_items local menu_functions if hasRun == false then menu_items = {"Find Sprint Speed Value!", "Instructions", "Back", "Home"} menu_functions = {"FFS", "SSI", "Back", "start"} else menu_items = {"Find Sprint Speed Value!","Sprint Speed Normal", "Sprint Speed x 2.5", "Sprint Speed x 5","Instructions", "Back", "Home"} menu_functions = {"FFS", "SSN", "S25", "S5", "SSI", "Back", "start"} end gg.setVisible(false) local Menu = gg.choice(menu_items, nil, "SPRINT SPEED MENU") if Menu ~= nil then _G[menu_functions[Menu]] end end function FSS() hasRun == true gg.setRanges(gg.REGION_C_ALLOC) gg.searchNumber("1,999,410,999D;1F;688892D;16D;35165D::49", gg.TYPE_FLOAT) gg.refineNumber('1', gg.TYPE_FLOAT) local sprSpe = gg.getResults(gg.getResultsCount()) gg.saveVariable(sprSpe, gg.EXT_CACHE_DIR.."/SS") gg.clearResults() gg.toast("Sprint Speed Found!") SSM() end Link to comment Share on other sites More sharing options...
Rs92ks Posted April 5, 2022 Share Posted April 5, 2022 Coop menu method, but HasRun == true is not defines value. Location 2 hours ago, BadCase said: function FSS() hasRun == true I have same mistake Link to comment Share on other sites More sharing options...
BadCase Posted April 6, 2022 Share Posted April 6, 2022 Oops lol hasRun = true I pressed = twice by accident Link to comment Share on other sites More sharing options...
Question
MrMikeMichael
Hey,
In my mod menu I have a function that only will find and save values.
Under that I have 3 other functions that only will work if the first hack had been activated.
So I wonder if there's a way to make those 3 functions only appear in my submenu if the first function has been executed once.
Theory crafting.txt
Link to comment
Share on other sites
6 answers to this question
Recommended Posts
Archived
This topic is now archived and is closed to further replies.