Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local a = ""
- local b = ""
- local c = ""
- local x = 1
- function onLoad()
- self.setName("The Position Checker")
- self.setDescription("Use this checker to find the cordinates on the table")
- button_parameters = {}
- button_parameters.click_function = 'Check_Position'
- button_parameters.function_owner = self
- button_parameters.label = 'Check'
- button_parameters.position = {0,0.2,0}
- button_parameters.rotation = {0,0,0}
- button_parameters.width = 500
- button_parameters.height = 500
- button_parameters.font_size = 100
- self.createButton(button_parameters)
- end
- function Check_Position()
- poss = self.getPosition()
- posX = round(tonumber(poss[1]), 2)
- posY = round(tonumber(poss[2]), 2)
- posZ = round(tonumber(poss[3]), 2)
- print(posX)
- print(posY)
- print(posZ)
- message = "{"..posX..","..posY..","..posZ.."}"
- b = "\nPosition" ..x .." = "..message
- a = a ..b
- c = a
- print(a)
- print(b)
- print(c)
- Notes.setNotes(c)
- x = x+1
- end
- function round(number, precision)
- local fmtStr = string.format('%%0.%sf',precision)
- number = string.format(fmtStr,number)
- return number
- end
Advertisement
Add Comment
Please, Sign In to add comment