Jump to content
  • 0

seekbar help multiple values


karbiner98O

Question

Posted

if gg.isVisible(true) 
then gg.setVisible(false)
end
HOME=1
function MENU()
n = gg.prompt({'X:[-150; 150]','Y:[-150; 150]','Z:[-3; 150]', 'exit' }, {0, false}, {'number','number','number','checkbox'})
if n == nil then os.exit()
else
if n[1] and n[2] and n[3] then Teleport() end
if n[4] then exit() end


end
HOME=-1
end

function Teleport()
gg.getResults(3)
gg.editAll('n[1];n[2];n[3]', gg.TYPE_FLOAT) 
gg.toast('Teleported')
end

function exit()
gg.toast('script exit')
os.exit()
end


while(true)
do
  if gg.isVisible(true) then
    HOME=1
    gg.setVisible(false) 
  end 
  if HOME==1 then MENU() end
end

[added 3 minutes later]
Just now, karbiner98O said:

if gg.isVisible(true) 
then gg.setVisible(false)
end
HOME=1
function MENU()
n = gg.prompt({'X:[-150; 150]','Y:[-150; 150]','Z:[-3; 150]', 'exit' }, {0, false}, {'number','number','number','checkbox'})
if n == nil then os.exit()
else
if n[1] and n[2] and n[3] then Teleport() end
if n[4] then exit() end


end
HOME=-1
end

function Teleport()
gg.getResults(3)
gg.editAll('n[1];n[2];n[3]', gg.TYPE_FLOAT) 
gg.toast('Teleported')
end

function exit()
gg.toast('script exit')
os.exit()
end


while(true)
do
  if gg.isVisible(true) then
    HOME=1
    gg.setVisible(false) 
  end 
  if HOME==1 then MENU() end
end

the problem is it edits the three values as 1 2 & 3 not to the value set in the seekbar.  its a teleportation script so i want to be able to see where im heading rather than everytime touching ok

3 answers to this question

Recommended Posts

Posted


gg.editAll('n[1];n[2];n[3]', gg.TYPE_FLOAT) 

 

is there any way? .with ' ' it reads it as string or is it possible to make it like ignore the other two values they are always ordered x y &z

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.