-- это ставит метку на корды.
-- пример /setmarker 111, 111, 111
function main()
sampRegisterChatCommand('setmarker', function(coords)
local x, y, z = coords:match('(.+), (.+), (.+)') --телепорт по координатам через команду
setMarker(1, x, y, z, 1, -1)
end)
wait(-1)
end
function setMarker(type, x, y, z, radius, color)
deleteCheckpoint(marker)
removeBlip(checkpoint)
checkpoint = addBlipForCoord(x, y, z)
marker = createCheckpoint(type, x, y, z, 1, 1, 1, radius)
changeBlipColour(checkpoint, color)
lua_thread.create(function()
repeat
wait(0)
local x1, y1, z1 = getCharCoordinates(PLAYER_PED)
until getDistanceBetweenCoords3d(x, y, z, x1, y1, z1) < radius or not doesBlipExist(checkpoint)
deleteCheckpoint(marker)
removeBlip(checkpoint)
addOneOffSound(0, 0, 0, 1149)
end)
end