RegisterCommand("relog", function() local ped = PlayerPedId() if not DoesEntityExist(ped) then print("Fehler: Spieler-Entity existiert nicht") return end local coords = GetEntityCoords(ped) local heading = GetEntityHeading(ped) TriggerServerEvent("duckrelog:saveCoords", { x = coords.x, y = coords.y, z = coords.z, w = heading }) end, false) RegisterNetEvent("duckrelog:openCharMenu", function() ShutdownLoadingScreenNui() TriggerEvent("qb-multicharacter:client:chooseChar") TriggerEvent("um-multichar:client:chooseChar") end) RegisterNetEvent("duckrelog:setCoords", function(pos) if pos then local ped = PlayerPedId() RequestCollisionAtCoord(pos.x, pos.y, pos.z) SetEntityCoordsNoOffset(ped, pos.x, pos.y, pos.z, false, false, false) SetEntityHeading(ped, pos.w or 0.0) end end) RegisterNetEvent("QBCore:Client:OnPlayerLoaded", function() TriggerServerEvent("duckrelog:requestCoords") end)