124: cannot convert 'float [3]' to 'struct VectorXYZ'
```lua
local events = require('samp.events')
local ffi = require('ffi')
local sampfuncs = require('sampfuncs')
local raknet = require('samp.raknet')
local TELEPORT_COMMAND = 'tpz'
local DEFAULT_TP_DISTANCE = 175
local DEFAULT_WAIT_TIME = 1000
local FONT_NAME = 'NAMU PRO'
local FONT_SIZE = 12
local FONT_FLAGS = 4
local MAX_MARKERS = 32
local MOVE_INTERVAL = 50
local FINAL_ALTITUDE = -135
local ALTITUDE_STEP = -25
local teleporting = false
local teleportDistance = DEFAULT_TP_DISTANCE
local waitTime = DEFAULT_WAIT_TIME
local progressPercent = 0
local showBar = true
local inVehicle = false
local font = renderCreateFont(FONT_NAME, FONT_SIZE, FONT_FLAGS)
local wait = wait
local isSampAvailable = isSampAvailable
local sampRegisterChatCommand = sampRegisterChatCommand
local sampAddChatMessage = sampAddChatMessage
local lua_thread = lua_thread
local drawText = renderFontDrawText
local isCharInAnyCar = isCharInAnyCar
local getCharCoordinates = getCharCoordinates
local setCharCoordinates = setCharCoordinates
local freezeCharPosition = freezeCharPosition
local freezeCarPosition = freezeCarPosition
local storeCarCharIsInNoSave = storeCarCharIsInNoSave
local function sendChatMessage(message, color)
    sampAddChatMessage(message, color or -1)
end

local function mapRange(current, srcMin, srcMax, dstMin, dstMax)
    if srcMax == srcMin then return dstMin end
    local ratio = (current - srcMin) / (srcMax - srcMin)
    return ratio * (dstMax - dstMin) + dstMin
end

local function searchMarker()
    for id = 0, MAX_MARKERS - 1 do
        local markerAddress = 0xC7F168 + id * 56
        local x = representIntAsFloat(readMemory(markerAddress, 4, false))
        local y = representIntAsFloat(readMemory(markerAddress + 4, 4, false))
        local z = representIntAsFloat(readMemory(markerAddress + 8, 4, false))
        if x ~= 0.0 or y ~= 0.0 or z ~= 0.0 then return true, x, y, z end
    end
    return false, 0.0, 0.0, 0.0
end

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

local function createSyncData(syncType, copyFromPlayer)
    copyFromPlayer = copyFromPlayer ~= false
    local syncTraits = {
        player = {'PlayerSyncData', raknet.PACKET.PLAYER_SYNC, sampStorePlayerOnfootData},
        vehicle = {'VehicleSyncData', raknet.PACKET.VEHICLE_SYNC, sampStorePlayerIncarData},
        passenger = {'PassengerSyncData', raknet.PACKET.PASSENGER_SYNC, sampStorePlayerPassengerData},
        aim = {'AimSyncData', raknet.PACKET.AIM_SYNC, sampStorePlayerAimData},
        trailer = {'TrailerSyncData', raknet.PACKET.TRAILER_SYNC, sampStorePlayerTrailerData},
        unoccupied = {'UnoccupiedSyncData', raknet.PACKET.UNOCCUPIED_SYNC, nil},
        bullet = {'BulletSyncData', raknet.PACKET.BULLET_SYNC, nil},
        spectator = {'SpectatorSyncData', raknet.PACKET.SPECTATOR_SYNC, nil}
    }

    local syncInfo = syncTraits[syncType]
    if not syncInfo then error('Invalid sync type: ' .. tostring(syncType)) end
    local dataType = 'struct ' .. syncInfo[1]
    local data = ffi.new(dataType, {})
    local rawDataPtr = tonumber(ffi.cast('uintptr_t', ffi.new(dataType .. '*', data)))
    if copyFromPlayer then
        local copyFunc = syncInfo[3]
        if copyFunc then
            local success, playerId = sampGetPlayerIdByCharHandle(PLAYER_PED)
            if not success then error('Failed to get player ID for sync data.') end
            copyFunc(playerId, rawDataPtr)
        end
    end

    local function sendSync()
        local bs = raknetNewBitStream()
        raknetBitStreamWriteInt8(bs, syncInfo[2])
        raknetBitStreamWriteBuffer(bs, rawDataPtr, ffi.sizeof(data))
        raknetSendBitStreamEx(bs, sampfuncs.HIGH_PRIORITY, sampfuncs.UNRELIABLE_SEQUENCED, 1)
        raknetDeleteBitStream(bs)
    end
    return {
        send = sendSync,
        data = data
    }
end

local function performTeleport(destinationX, destinationY, destinationZ)
    progressPercent = 0
    teleporting = true
    if inVehicle then
        local vehicle = storeCarCharIsInNoSave(PLAYER_PED)
        freezeCarPosition(vehicle, true)
    else
        freezeCharPosition(PLAYER_PED, true)
    end

    local currentX, currentY, currentZ = getCharCoordinates(PLAYER_PED)
    local newX, newY, newZ = currentX, currentY, currentZ
    local distance = getDistanceBetweenCoords2d(currentX, currentY, destinationX, destinationY)
    local angle = -math.rad(getHeadingFromVector2d(destinationX - currentX, destinationY - currentY))
    local syncType = inVehicle and 'vehicle' or 'player'
    local syncData = createSyncData(syncType)
    setCharCoordinates(PLAYER_PED, destinationX, destinationY, destinationZ)
    if distance > teleportDistance then
        for ds = distance - teleportDistance, 0, -teleportDistance do
            local moveSpeed = {0, 0, inVehicle and -0.1 or -0.7}
            syncData.data.moveSpeed = ffi.new('float[3]', moveSpeed)
            for i = newZ, FINAL_ALTITUDE, ALTITUDE_STEP do
                syncData.data.position = ffi.new('float[3]', {newX, newY, i})
                syncData.send()
                wait(MOVE_INTERVAL)
            end

            syncData.data.moveSpeed = ffi.new('float[3]', {0, 0, 0})
            newX = newX + math.sin(angle) * teleportDistance
            newY = newY + math.cos(angle) * teleportDistance
            newZ = FINAL_ALTITUDE
            syncData.data.position = ffi.new('float[3]', {newX, newY, newZ})
            syncData.send()
            progressPercent = mapRange(distance - ds, 0, distance, 0, 100)
            wait(waitTime)
        end
    end

    syncData.data.moveSpeed = ffi.new('float[3]', {0, 0, inVehicle and -0.1 or -0.7})
    for i = newZ, FINAL_ALTITUDE, ALTITUDE_STEP do
        syncData.data.position = ffi.new('float[3]', {newX, newY, i})
        syncData.send()
        wait(MOVE_INTERVAL)
    end

    syncData.data.position = ffi.new('float[3]', {destinationX, destinationY, destinationZ})
    syncData.send()
    setCharCoordinates(PLAYER_PED, destinationX, destinationY, destinationZ)
    if inVehicle then
        local vehicle = storeCarCharIsInNoSave(PLAYER_PED)
        freezeCarPosition(vehicle, false)
    else
        freezeCharPosition(PLAYER_PED, false)
    end

    sendChatMessage('Успех. {6495ed}Телепортировались', -1)
    teleporting = false
end

local function onTeleportCommand(args)
    if teleporting then
        sendChatMessage('Ошибка. {6495ed}Уже телепортируемся.', -1)
        return
    end

    local found, x, y, z = false, 0.0, 0.0, 0.0
    if args and args:match('%w+ %d+') then
        local command, value = args:match('^(%w+)%s+(%d+)$')
        if command == 'waiting' then
            waitTime = tonumber(value)
            sendChatMessage('Успешно. {6495ed}Задержка: ' .. waitTime, -1)
            return
        end
    elseif args == 'view' then
        showBar = not showBar
        return
    elseif args == 'cpm' then
        found, x, y, z = searchMarker()
    else
        found, x, y, z = getTargetBlipCoordinatesFixed()
    end

    if not found then
        sendChatMessage('Неизвестная команда! {6495ed}Используйте /tpz | /tpz cpm', -1)
        return
    end

    lua_thread.create(function() performTeleport(x, y, z) end)
end

function main()
    while not isSampAvailable() do
        wait(0)
    end

    sampRegisterChatCommand(TELEPORT_COMMAND, onTeleportCommand)
    while true do
        wait(0)
        inVehicle = isCharInAnyCar(PLAYER_PED)
        if showBar then
            if teleporting then
                drawText(font, string.format('{6495ed}| {ffffff}Teleporting:{6495ed} [%.1f%%]\n| {ffffff}Wait:{6495ed} %d', progressPercent, waitTime), 10, 400, -1)
            else
                local mode = inVehicle and 'Vehicle' or 'Onfoot'
                drawText(font, string.format('{6495ed}| {ffffff}Mode: {6495ed}%s\n| {ffffff}Wait:{6495ed} %d', mode, waitTime), 10, 400, -1)
            end
        end
    end
end

local function blockEvents()
    if teleporting then return false end
end

events.onShowDialog = function(id) if teleporting and inVehicle and id == 26263 then return false end end
events.onSendPlayerSync = blockEvents
events.onSendVehicleSync = blockEvents
```