function mycoords() then
local positionX, positionY, positionZ = getCharCoordinates(PLAYER_PED)
local str = positionX .. ", " .. positionY .. ", " .. positionZ
sampAddChatMessage(str, 0xFFFFFFFF)
end
function main() then
if not isSampFuncsLoaded() and not isSampLoaded() then return end
while not isSampAvailable() do wait(0) end
sampRegisterChatCommand("mycoords", mycoords)
wait(-1)
end