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()
|
RegisterCommand("relog", function()
|
||||||
local ped = PlayerPedId()
|
local ped = PlayerPedId()
|
||||||
|
if not DoesEntityExist(ped) then
|
||||||
|
print("Fehler: Spieler-Entity existiert nicht")
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
local coords = GetEntityCoords(ped)
|
local coords = GetEntityCoords(ped)
|
||||||
local heading = GetEntityHeading(ped)
|
local heading = GetEntityHeading(ped)
|
||||||
|
|
||||||
|
@ -15,6 +20,8 @@ end, false)
|
||||||
-- Multichar-Menü öffnen, nachdem der Server Logout durchgeführt hat
|
-- Multichar-Menü öffnen, nachdem der Server Logout durchgeführt hat
|
||||||
RegisterNetEvent("duckrelog:openCharMenu", function()
|
RegisterNetEvent("duckrelog:openCharMenu", function()
|
||||||
ShutdownLoadingScreenNui()
|
ShutdownLoadingScreenNui()
|
||||||
|
-- Versuche beide möglichen Event-Namen
|
||||||
|
TriggerEvent("qb-multicharacter:client:chooseChar")
|
||||||
TriggerEvent("um-multichar:client:chooseChar")
|
TriggerEvent("um-multichar:client:chooseChar")
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
|
|
@ -4,13 +4,19 @@ local LastPositions = {}
|
||||||
RegisterServerEvent("duckrelog:saveCoords", function(pos)
|
RegisterServerEvent("duckrelog:saveCoords", function(pos)
|
||||||
local src = source
|
local src = source
|
||||||
LastPositions[src] = pos
|
LastPositions[src] = pos
|
||||||
|
|
||||||
|
-- Debug-Nachricht
|
||||||
|
print("Speichere Position für Spieler " .. src .. " und löse Relog aus")
|
||||||
|
|
||||||
-- Spieler korrekt abmelden
|
-- Spieler korrekt abmelden
|
||||||
QBCore.Player.Logout(src)
|
QBCore.Player.Logout(src)
|
||||||
|
|
||||||
-- RoutingBucket zurücksetzen
|
-- RoutingBucket zurücksetzen
|
||||||
SetPlayerRoutingBucket(src, 0)
|
SetPlayerRoutingBucket(src, 0)
|
||||||
|
|
||||||
|
-- Kleine Verzögerung vor dem Öffnen des Charaktermenüs
|
||||||
|
Wait(500)
|
||||||
|
|
||||||
-- Client auffordern, Char-Menü zu öffnen
|
-- Client auffordern, Char-Menü zu öffnen
|
||||||
TriggerClientEvent("duckrelog:openCharMenu", src)
|
TriggerClientEvent("duckrelog:openCharMenu", src)
|
||||||
end)
|
end)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue