Дайте простейший код телепорта по МАРКЕРУ на луа.

DiegonFMR

Новичок
Автор темы
11
1
Дайте простейший код телепорта по МАРКЕРУ на луа.
 

DiegonFMR

Новичок
Автор темы
11
1
Маркер, а не метка
1639293766398.png

/ptp
Lua:
function main()
    while not isSampAvailable() do wait(0) end
    sampRegisterChatCommand("ptp", ptp)
    wait(-1)
end

function getTargetBlipCoordinatesFixed()
    local bool, x, y, z = getTargetBlipCoordinates(); if not bool then return false end
    requestCollision(x, y); loadScene(x, y, z)
    local bool, x, y, z = getTargetBlipCoordinates()
    return bool, x, y, z
end

function ptp()
    if getTargetBlipCoordinatesFixed() then
    local _, x, y, z = getTargetBlipCoordinatesFixed()
    setCharCoordinates(PLAYER_PED, x, y, z)
    else
    sampAddChatMessage('nety metki', -1)
    end
end
 

SomaGnoma

Известный
442
152
/ptp
Lua:
function main()
    while not isSampAvailable() do wait(0) end
    sampRegisterChatCommand("ptp", ptp)
    wait(-1)
end

function getTargetBlipCoordinatesFixed()
    local bool, x, y, z = getTargetBlipCoordinates(); if not bool then return false end
    requestCollision(x, y); loadScene(x, y, z)
    local bool, x, y, z = getTargetBlipCoordinates()
    return bool, x, y, z
end

function ptp()
    if getTargetBlipCoordinatesFixed() then
    local _, x, y, z = getTargetBlipCoordinatesFixed()
    setCharCoordinates(PLAYER_PED, x, y, z)
    else
    sampAddChatMessage('nety metki', -1)
    end
end
это по метке челик)

открываешь код и вот тебе пример.
 

pchelkin (mearfy)

Известный
915
374
это по метке челик)


открываешь код и вот тебе пример.
метка от сервера, или метка, которую сам ставишь?