forked from Simnation/Main
Fix / debug
This commit is contained in:
parent
882701a077
commit
6c080a59ee
2 changed files with 16 additions and 3 deletions
|
@ -1,5 +1,10 @@
|
|||
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)
|
||||
|
||||
|
@ -15,6 +20,8 @@ end, false)
|
|||
-- Multichar-Menü öffnen, nachdem der Server Logout durchgeführt hat
|
||||
RegisterNetEvent("duckrelog:openCharMenu", function()
|
||||
ShutdownLoadingScreenNui()
|
||||
-- Versuche beide möglichen Event-Namen
|
||||
TriggerEvent("qb-multicharacter:client:chooseChar")
|
||||
TriggerEvent("um-multichar:client:chooseChar")
|
||||
end)
|
||||
|
||||
|
|
|
@ -4,13 +4,19 @@ local LastPositions = {}
|
|||
RegisterServerEvent("duckrelog:saveCoords", function(pos)
|
||||
local src = source
|
||||
LastPositions[src] = pos
|
||||
|
||||
|
||||
-- Debug-Nachricht
|
||||
print("Speichere Position für Spieler " .. src .. " und löse Relog aus")
|
||||
|
||||
-- Spieler korrekt abmelden
|
||||
QBCore.Player.Logout(src)
|
||||
|
||||
|
||||
-- RoutingBucket zurücksetzen
|
||||
SetPlayerRoutingBucket(src, 0)
|
||||
|
||||
|
||||
-- Kleine Verzögerung vor dem Öffnen des Charaktermenüs
|
||||
Wait(500)
|
||||
|
||||
-- Client auffordern, Char-Menü zu öffnen
|
||||
TriggerClientEvent("duckrelog:openCharMenu", src)
|
||||
end)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue