local vremya = os.date('%H:%M:%S')
function main()
sampRegisterChatCommand('coord', function()
local file = io.open('moonloader/Coordinates.txt', 'a')
local X, Y, Z = getCharCoordinates(PLAYER_PED)
file:write('[Coordinates] - ' ..vremya.. '\nX = ' ..X.. '\nY = ' ..Y.. '\nZ = ' ..Z.. '\n\n\n')
sampAddChatMessage('[Coordinates] Координаты успешно сохранены.', -1)
file:close()
end)
sampRegisterChatCommand('mcoord', function()
local file = io.open('moonloader/Coordinates.txt', 'a')
local X, Y, Z = getCharCoordinates(PLAYER_PED)
file:write('[Coordinates] (math.floor) - ' ..vremya.. '\nX = ' ..math.floor(X).. '\nY = ' ..math.floor(Y).. '\nZ = ' ..math.floor(Z).. '\n\n\n')
sampAddChatMessage('[Coordinates] Округленные координаты успешно сохранены.', -1)
file:close()
end)
wait(-1)
end