Merge branch 'master' of https://git.evolution-state-life.de/Evolution-State-Life/Main
This commit is contained in:
commit
916cbf75f2
15 changed files with 121 additions and 88 deletions
BIN
resources/[inventory]/qs-inventory/html/images/print.png
Normal file
BIN
resources/[inventory]/qs-inventory/html/images/print.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 50 KiB |
BIN
resources/[inventory]/qs-inventory/html/images/w_me_colbaton.png
Normal file
BIN
resources/[inventory]/qs-inventory/html/images/w_me_colbaton.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 66 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 133 KiB |
|
|
@ -1 +1 @@
|
|||
{"police":100,"ambulance":0,"Zum Durstigen Dackel":200,"cinema":0,"coffe_cute":100,"kayas":0,"odin":0,"dackel":0,"ammu":1000}
|
||||
{"police":100,"odin":0,"kayas":0,"Zum Durstigen Dackel":200,"cinema":0,"ambulance":0,"coffe_cute":100,"ammu":1000,"dackel":0}
|
||||
42
resources/[qb]/Duck_Relog/client.lua
Normal file
42
resources/[qb]/Duck_Relog/client.lua
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
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)
|
||||
|
||||
18
resources/[qb]/Duck_Relog/fxmanifest.lua
Normal file
18
resources/[qb]/Duck_Relog/fxmanifest.lua
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
fx_version 'cerulean'
|
||||
game 'gta5'
|
||||
|
||||
author 'Duck'
|
||||
description 'Relog extra. UM-Multi ist erforderlich'
|
||||
|
||||
client_scripts {
|
||||
'client.lua'
|
||||
}
|
||||
|
||||
server_scripts {
|
||||
'@oxmysql/lib/MySQL.lua',
|
||||
'server.lua'
|
||||
}
|
||||
|
||||
shared_script '@qb-core/shared/locale.lua'
|
||||
|
||||
dependency 'qb-core'
|
||||
32
resources/[qb]/Duck_Relog/server.lua
Normal file
32
resources/[qb]/Duck_Relog/server.lua
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
local QBCore = exports['qb-core']:GetCoreObject()
|
||||
local LastPositions = {}
|
||||
|
||||
RegisterServerEvent("duckrelog:saveCoords", function(pos)
|
||||
local src = source
|
||||
LastPositions[src] = pos
|
||||
|
||||
|
||||
print("Speichere Position für Spieler " .. src .. " und löse Relog aus")
|
||||
|
||||
|
||||
QBCore.Player.Logout(src)
|
||||
|
||||
|
||||
SetPlayerRoutingBucket(src, 0)
|
||||
|
||||
|
||||
Wait(500)
|
||||
|
||||
|
||||
TriggerClientEvent("duckrelog:openCharMenu", src)
|
||||
end)
|
||||
|
||||
RegisterServerEvent("duckrelog:requestCoords", function()
|
||||
local src = source
|
||||
local pos = LastPositions[src]
|
||||
|
||||
if pos then
|
||||
TriggerClientEvent("duckrelog:setCoords", src, pos)
|
||||
LastPositions[src] = nil
|
||||
end
|
||||
end)
|
||||
|
|
@ -1,38 +0,0 @@
|
|||
local QBCore = exports['qb-core']:GetCoreObject()
|
||||
local savedLocation = nil
|
||||
|
||||
RegisterCommand("relog", function()
|
||||
local ped = PlayerPedId()
|
||||
local coords = GetEntityCoords(ped)
|
||||
local heading = GetEntityHeading(ped)
|
||||
local cid = QBCore.Functions.GetPlayerData().citizenid
|
||||
|
||||
-- Speicher Ort vor Relog
|
||||
TriggerServerEvent("qb-relogsave:server:saveLocation", cid, {
|
||||
x = coords.x,
|
||||
y = coords.y,
|
||||
z = coords.z
|
||||
}, heading)
|
||||
|
||||
TriggerEvent("qb-multicharacter:client:chooseChar")
|
||||
end, false)
|
||||
|
||||
RegisterNetEvent("qb-relogsave:client:restoreLocation", function(pos, heading)
|
||||
savedLocation = {
|
||||
pos = pos,
|
||||
heading = heading
|
||||
}
|
||||
end)
|
||||
|
||||
RegisterNetEvent("qb-spawn:client:spawned", function()
|
||||
if savedLocation then
|
||||
DoScreenFadeOut(500)
|
||||
Wait(500)
|
||||
SetEntityCoords(PlayerPedId(), savedLocation.pos.x, savedLocation.pos.y, savedLocation.pos.z)
|
||||
SetEntityHeading(PlayerPedId(), savedLocation.heading)
|
||||
Wait(500)
|
||||
DoScreenFadeIn(500)
|
||||
|
||||
savedLocation = nil
|
||||
end
|
||||
end)
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
fx_version 'cerulean'
|
||||
game 'gta5'
|
||||
|
||||
description 'relog system'
|
||||
author 'Duck'
|
||||
version '1.0.1'
|
||||
|
||||
client_script 'client.lua'
|
||||
server_script 'server.lua'
|
||||
|
||||
shared_script '@qb-core/shared/locale.lua'
|
||||
dependency 'qb-core'
|
||||
dependency 'um-multicharacter'
|
||||
|
|
@ -1,34 +0,0 @@
|
|||
local savedLocations = {}
|
||||
local QBCore = exports['qb-core']:GetCoreObject()
|
||||
|
||||
RegisterNetEvent("qb-relogsave:server:saveLocation", function(cid, coords, heading)
|
||||
if not cid or not coords then return end
|
||||
|
||||
savedLocations[cid] = {
|
||||
pos = coords,
|
||||
heading = heading,
|
||||
timestamp = os.time()
|
||||
}
|
||||
|
||||
print("Position für " .. cid .. " gespeichert: " .. json.encode(coords))
|
||||
end)
|
||||
|
||||
AddEventHandler('QBCore:Server:PlayerLoaded', function(Player)
|
||||
if not Player or not Player.PlayerData then return end
|
||||
|
||||
local cid = Player.PlayerData.citizenid
|
||||
|
||||
if savedLocations[cid] then
|
||||
local pos = savedLocations[cid].pos
|
||||
local heading = savedLocations[cid].heading
|
||||
|
||||
if pos and pos.x and pos.y and pos.z then
|
||||
TriggerClientEvent("qb-relogsave:client:restoreLocation", Player.PlayerData.source, pos, heading)
|
||||
print("Position für " .. cid .. " wiederhergestellt")
|
||||
else
|
||||
print("Ungültige Position für " .. cid .. " gefunden")
|
||||
end
|
||||
|
||||
savedLocations[cid] = nil
|
||||
end
|
||||
end)
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -6185,3 +6185,23 @@
|
|||
[[36minfo[39m][UnlSpectre][2025/06/26 06:02:46]: Successfully started PlayerController
|
||||
[[36minfo[39m][UnlSpectre][2025/06/26 06:02:46]: Successfully started VehicleController
|
||||
[[36minfo[39m][UnlSpectre][2025/06/26 06:02:57]: HTTP Server started on port 3000.
|
||||
[[36minfo[39m][UnlSpectre][2025/06/26 16:07:59]: Successfully registered Exports
|
||||
[[36minfo[39m][UnlSpectre][2025/06/26 16:36:20]: Successfully registered Exports
|
||||
[[36minfo[39m][UnlSpectre][2025/06/26 16:41:59]: Successfully registered Exports
|
||||
[[36minfo[39m][UnlSpectre][2025/06/26 16:41:59]: Successfully loaded Items
|
||||
[[36minfo[39m][UnlSpectre][2025/06/26 16:41:59]: Successfully loaded Jobs
|
||||
[[36minfo[39m][UnlSpectre][2025/06/26 16:41:59]: Successfully loaded Gangs
|
||||
[[36minfo[39m][UnlSpectre][2025/06/26 16:41:59]: Successfully loaded Vehicles
|
||||
[[36minfo[39m][UnlSpectre][2025/06/26 16:41:59]: Successfully started GameController
|
||||
[[36minfo[39m][UnlSpectre][2025/06/26 16:41:59]: Successfully started PlayerController
|
||||
[[36minfo[39m][UnlSpectre][2025/06/26 16:41:59]: Successfully started VehicleController
|
||||
[[36minfo[39m][UnlSpectre][2025/06/26 16:42:07]: HTTP Server started on port 3000.
|
||||
[[36minfo[39m][UnlSpectre][2025/06/26 18:51:20]: Successfully registered Exports
|
||||
[[36minfo[39m][UnlSpectre][2025/06/26 18:51:20]: Successfully loaded Items
|
||||
[[36minfo[39m][UnlSpectre][2025/06/26 18:51:20]: Successfully loaded Jobs
|
||||
[[36minfo[39m][UnlSpectre][2025/06/26 18:51:20]: Successfully loaded Gangs
|
||||
[[36minfo[39m][UnlSpectre][2025/06/26 18:51:20]: Successfully loaded Vehicles
|
||||
[[36minfo[39m][UnlSpectre][2025/06/26 18:51:20]: Successfully started GameController
|
||||
[[36minfo[39m][UnlSpectre][2025/06/26 18:51:20]: Successfully started PlayerController
|
||||
[[36minfo[39m][UnlSpectre][2025/06/26 18:51:20]: Successfully started VehicleController
|
||||
[[36minfo[39m][UnlSpectre][2025/06/26 18:51:44]: HTTP Server started on port 3000.
|
||||
|
|
|
|||
|
|
@ -4155,6 +4155,6 @@
|
|||
}
|
||||
],
|
||||
"waypoints": [],
|
||||
"tokenSecret": "XKtQtU8Vgr28xL2KCRLU",
|
||||
"tokenSecret": "eV9hz7BNT77TCxjJwNZn",
|
||||
"supporterStash": []
|
||||
}
|
||||
|
|
@ -8299,3 +8299,8 @@
|
|||
[info][2025/06/26 06:08:36]: nordi requested all items.
|
||||
[info][2025/06/26 06:08:45]: nordi requested item w_me_colbaton.
|
||||
[info][2025/06/26 07:07:35]: nordi requested item w_me_colbaton.
|
||||
[info][2025/06/26 16:02:06]: nordi requested item w_me_colbaton.
|
||||
[info][2025/06/26 16:03:14]: nordi requested all items.
|
||||
[info][2025/06/26 16:03:20]: nordi requested item w_me_pocketlight.
|
||||
[info][2025/06/26 16:05:44]: nordi requested all items.
|
||||
[info][2025/06/26 16:05:48]: nordi requested item w_me_colbaton.
|
||||
|
|
|
|||
|
|
@ -6626,3 +6626,4 @@
|
|||
[info][2025/06/26 05:21:05]: Login attempt on Nordi from 91.248.233.154
|
||||
[info][2025/06/26 06:08:32]: Login attempt on Nordi from 91.248.233.154
|
||||
[info][2025/06/26 06:08:33]: Login attempt on Nordi from 91.248.233.154
|
||||
[info][2025/06/26 16:42:17]: Login attempt on Nordi from 91.248.233.154
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue