Jump to content
  • 0

Prompt Remember Checkbox and Seek Bar


1x1

Question

So i have a prompt menu that have Seek bar and 3 checkbox.

 

I wanna make a seek bar that doesn't require remember data.

But please include so maybe i will make extra.

 

So i have 3 checkbox called:

Skip Game (No Save)

God Mode (Save)

Fly Mode (Save)

 

I want to make remember and not remember, same goes to seek bar. 

 

sorry for my English.

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

13 hours ago, 1x1 said:

So i have a prompt menu that have Seek bar and 3 checkbox.

 

I wanna make a seek bar that doesn't require remember data.

But please include so maybe i will make extra.

 

So i have 3 checkbox called:

Skip Game (No Save)

God Mode (Save)

Fly Mode (Save)

 

I want to make remember and not remember, same goes to seek bar. 

 

sorry for my English.

 

So the seekber will not be saved and one of the checkbox will not be saved 

local configFile = gg.EXT_CACHE_DIR .. "/" .. gg.getFile():match("[^/]+$") .. ".cfg"
local data = loadfile(configFile)
if data ~= nil then
  data = data()
test1 = data[1]
test2 = data[2]
end
function test()
mo = gg.prompt({"test1","test2","test3","test4 [1; 200]"},{test1,test2},{"checkbox","checkbox","checkbox","number"})
if mo == nil then test() else
gg.saveVariable(mo,configFile)
os.exit()
end
end
test()

 

Link to comment
Share on other sites

21 hours ago, 1x1 said:

So i have a prompt menu that have Seek bar and 3 checkbox.

 

I wanna make a seek bar that doesn't require remember data.

But please include so maybe i will make extra.

 

So i have 3 checkbox called:

Skip Game (No Save)

God Mode (Save)

Fly Mode (Save)

 

I want to make remember and not remember, same goes to seek bar. 

 

sorry for my English.

Read (search) in this site before asking (that's better).

https://gameguardian.net/forum/topic/20568-examples-of-lua-scripts/?do=findComment&comment=76273

Link to comment
Share on other sites

On 1/14/2023 at 8:37 AM, MANDO01 said:

 

So the seekber will not be saved and one of the checkbox will not be saved 

local configFile = gg.EXT_CACHE_DIR .. "/" .. gg.getFile():match("[^/]+$") .. ".cfg"
local data = loadfile(configFile)
if data ~= nil then
  data = data()
test1 = data[1]
test2 = data[2]
end
function test()
mo = gg.prompt({"test1","test2","test3","test4 [1; 200]"},{test1,test2},{"checkbox","checkbox","checkbox","number"})
if mo == nil then test() else
gg.saveVariable(mo,configFile)
os.exit()
end
end
test()

 

Is perfect but the problem is that it writes a file and save. I just want it to save it is on file.

 

I already got the code for multiChoice but replacing it in Prompt just get an error with it.

23 hours ago, HEROGAMEOfficial said:

Oh i didn't know that exist, thanks for it! 

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.