forked from hkc/cc-stuff
1
0
Fork 0

wallhack: use string.format to limit number precision

This commit is contained in:
Vftdan 2023-10-13 15:45:10 +03:00
parent f53440be79
commit 317930d80f
1 changed files with 1 additions and 1 deletions

View File

@ -80,7 +80,7 @@ return function()
if player.isSneaking then if player.isSneaking then
cache[id].text.setText(entity.name .. "\n" .. textutils.serialize(entity)) cache[id].text.setText(entity.name .. "\n" .. textutils.serialize(entity))
else else
cache[id].text.setText(entity.name .. "\n{" .. entity.x .. ", " .. entity.y .. ", " .. entity.z .. "}") cache[id].text.setText(("%s\n{%.2f, %.2f, %.2f}"):format(entity.name, entity.x, entity.y, entity.z))
end end
if entityFront.flipped then if entityFront.flipped then
cache[id].text.setColor(0x00FFFFFF) cache[id].text.setColor(0x00FFFFFF)