function getPosition(thePlayer, commandName) local x, y, z = getElementPosition(thePlayer) local rotation = getPedRotation(thePlayer) local dimension = getElementDimension(thePlayer) local interior = getElementInterior(thePlayer) outputChatBox("Position: " .. x .. ", " .. y .. ", " .. z, thePlayer, 255, 194, 14) outputChatBox("Rotation: " .. rotation, thePlayer, 255, 194, 14) outputChatBox("Dimension: " .. dimension, thePlayer, 255, 194, 14) outputChatBox("Interior: " .. interior, thePlayer, 255, 194, 14) --local prepairedText = " "..interior.." "..dimension.." "..x.." "..y.." "..z local prepairedText = x..", "..y..", "..z outputChatBox(prepairedText.. " - copied to clipboard", thePlayer, 200, 200, 200) triggerClientEvent(thePlayer, "copyPosToClipboard", thePlayer, prepairedText) end addCommandHandler("getpos", getPosition, false, false)