Jump to content
  • 0

Seekbar help


YeetMeister

Question

Im making a Critical ops FoV Hack but i have trouble with it pls help.

So my fov script is working fine but i want that the seekbar is displays the current FoV Value

Mine displays 0 always but i want that it displays 360 if the current fov is 360

Is that even possible? If yes pls help

@Enyby

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

According to the documentation for prompt function, "default" parameter of the function can be used to set default value for any prompt type.

Example code for seek bar that "remembers" previous values:

local input
local defaultValue = 50
while true do
  if gg.isVisible() then
    gg.setVisible(false)
    input = gg.prompt({'Test seek bar [10; 100]'}, {defaultValue}, {'number'})
    if input ~= nil then
      defaultValue = input[1]
    end
  end
  gg.sleep(100)
end

 

Link to comment
Share on other sites

(fovs = saved fov value)
local input
local defaultValue = gg.getListItems(fovS)
while true do
  if gg.isVisible() then
    gg.setVisible(false)
    input = gg.prompt({'Test seek bar [10; 100]'}, {defaultValue}, {'number'})
    if input ~= nil then
      defaultValue = input[1]
    end
  end
  gg.sleep(100)
end
19 minutes ago, CmP said:

According to the documentation for prompt function, "default" parameter of the function can be used to set default value for any prompt type.

Example code for seek bar that "remembers" previous values:


local input
local defaultValue = 50
while true do
  if gg.isVisible() then
    gg.setVisible(false)
    input = gg.prompt({'Test seek bar [10; 100]'}, {defaultValue}, {'number'})
    if input ~= nil then
      defaultValue = input[1]
    end
  end
  gg.sleep(100)
end

 

Huh.... Thx alot

If i save the FoV Value to a Table i could use it like that

 

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.