sampRegisterChatCommand("getpos", function()
local x, y, z = getCharCoordinates(PLAYER_PED)
sampAddChatMessage("Your coordinates: {FFFFFF}| X: {fffc4d}" .. x .. "{FFFFFF} | Y:{fffc4d}" .. y .. "{FFFFFF} | Z:{fffc4d} " .. z, 0xFF0000) - или в чат
print("Your coordinates: X: " .. x .. " | Y:" .. y .. " | Z: " .. z) - или в консоль
end)