Jump to content
  • 0

need help with gg.prompt


zolotov123344

Question

I want to more accurately configure gg.prompt for my purposes and this is what information I need.
1. How to remove the keyboard in gg.prompt it gets in the way if I use the seek bar. 2. If I use gg.prompt for the user to enter a number from 0.01 to 0.02, how can I check that he did not enter any other number, the usual [if n ~ = 0.01 ~ 0.02 then end] does not work. 3. How to make a seek bar with decimal numbers for example 0.1 I did not find anything interesting on these issues on the forum

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

15 hours ago, zolotov123344 said:

How to remove the keyboard in gg.prompt it gets in the way if I use the seek bar.

i think its not possible.

 

15 hours ago, zolotov123344 said:

If I use gg.prompt for the user to enter a number from 0.01 to 0.02, how can I check that he did not enter any other number, the usual [if n ~ = 0.01 ~ 0.02 then end] does not work.

gg.prompt is table type.You need to use index. Use n[1], n[2] blah blah for value.

n = gg.prompt({'coin'})
a= tonumber(n[1])

if a<0.01 or a>0.02 then
return print('put between 0.01 and 0.02') end
print(n[1])

 

15 hours ago, zolotov123344 said:

How to make a seek bar with decimal numbers for example 0.1 I did not find anything interesting on these issues on the forum

Like this one.

slider (#d3genk8k)

 

 

Link to comment
Share on other sites

if it can help u take this exemple just u need to edit amount desired if 1 or 2 (etc)

local debug 

gg.clearResults()
gg.searchNumber("33;1114;3976::", gg.TYPE_DWORD, false, gg.SIGN_EQUAL, 0, -1, 0)
gg.refineNumber("3976", gg.TYPE_DWORD, false, gg.SIGN_EQUAL, 0, -1, 1)
gg.alert("⏩ SPEED LOADED NOW SET YOUR'S ⏩\n\n➡️1 = DEFAULT SPEED \n➡️2 = SPEED X 1,2\n➡️3 = SPEED = X 1,5\n➡️4= SPEED X1,785\n➡️5 = SPEED X 2\n➡️6 = SPEED X 2,5\n➡️7 = SPEED X 3 (good)\n➡️8 = SPEED X 3.5\n➡️9 = SPEED X 4\n➡️10 = SPEED X 5 (hard)")
gg.setVisible(true)

local addr = gg.getResults(1)[1].address
local values = {{
	address = addr + 0xF4,
	flags = gg.TYPE_FLOAT,
}}
values = gg.getValues(values)

local function home()
	debug = -1
	local input = gg.prompt({"SET SPEED ⏩ [1;10]"}, {1}, {'number'})
	if input == nil then return nil
	else
		local value = tonumber(input[1])
		                  gg.toast('▶️ DEFAULT ▶️')
		if value == 2 then value = 1.2
                          gg.toast(' SPEED ⏩⏩')
		elseif value == 3 then value = 1.5
		                  gg.toast(' SPEED ⏭⏩')
		elseif value == 4 then value = 1.785
		                  gg.toast(' SPEED ⏭⏩')
		elseif value == 5 then value = 2
		                  gg.toast(' SPEED ⏭⏭')
		elseif value == 6 then value = 2.5
		                  gg.toast(' SPEED ⏭⏭⏩')
		elseif value == 7 then value = 3
                          gg.toast(' SPEED ⏭⏭⏭')
        elseif value == 8 then value = 4
                          gg.toast(' SPEED ⏭⏭⏭⏭')
        elseif value == 9 then value = 5
                          gg.toast(' SPEED ⏭⏭⏭⏭⏩')
        elseif value == 10 then value = 10
                          gg.toast(' ⏭⏭⏭⏭⏭⏭⏭⏭⏭⏭')
	end
	
		values[1].value = value
		gg.setValues(values)
	end
end

 

credit to @MAARSfor this slider

 

Link to comment
Share on other sites

exemple  

if value == 2 then value = 999

               gg.toast(' COINS TO 999')

elseif value == 3 then value = 9999

               gg.toast(' COINS TO 9999')

Link to comment
Share on other sites

16 hours ago, zolotov123344 said:

3. How to make a seek bar with decimal numbers for example 0.1

From the documentation to "gg.prompt" function:

Quote

To display the seek bar, you must specify the type 'number', the minimum and maximum value at the end of the prompt text, separated by a semicolon and surrounded by square brackets. The minimum value must be less than the maximum. If the default value is not in the range, the closest match will be used. Only integers can be used. The step size is always 1.

https://gameguardian.net/help/classgg.html#afe6c5b86ba0ae295899fd259232aac2b

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.