1
0
Fork 0
forked from Simnation/Main
This commit is contained in:
Nordi98 2025-06-23 20:15:25 +02:00
commit f0c92bcdfc
10 changed files with 9514 additions and 9467 deletions

View file

@ -37,26 +37,24 @@ function OpenChiefMenu(vehicles)
end
function OpenChiefAddVehicleMenu()
local coords = GetEntityCoords(PlayerPedId())
local Player = QBCore.Functions.GetPlayerData()
local vehicles = GetGamePool('CVehicle')
local opt = {}
QBCore.Functions.TriggerCallback('mh_jobgarage:CallOwnerVehicles', function(vehicles)
if vehicles ~= false then
local opt = {}
for i = 1, #vehicles, 1 do
local vehicleCoords = GetEntityCoords(vehicles[i])
local distance = #(vehicleCoords - coords)
local isSpawned, mods = IsVehicleSpawned(plate)
if distance < 20.0 then
local mods = QBCore.Functions.GetVehicleProperties(vehicles[i])
print(json.encode(mods))
table.insert(opt, {
title = "Kennzeichen: "..mods.plate,
description = "Dieses Fahrzeug Hinzufügen?",
icon = "car",
description = "Deine Ersatzschlüssel: "..vehicles[i].keys,
icon = 'car',
onSelect = function()
local value = lib.inputDialog("Schlüsselkasten", {
{type = "input", label = "Anzeigename", description = "Anzeigename wie die anderen den sehen!"},
{type = "number", label = "Schlüsselanzahl", description = "Anzahl der Ersatzschlüssel."},
{type = "number", label = "Schlüsselanzahl", description = "Anzahl der Ersatzschlüssel.", min = 1, max = vehicles[i].keys},
{type = "number", label = "Rang", description = "Ab welchen Rang darf man das Fahrzeug Fahren?"}
})
@ -86,7 +84,10 @@ function OpenChiefAddVehicleMenu()
lib.showContext("ChiefAddVehicleMenu")
end
else
Notification("Schlüsselkasten", "Keine Fahrzeuge von dir Gefunden!", "error")
end
end)
end
function OpenChiefEditVehicleMenu(veh)

View file

@ -232,3 +232,22 @@ AddEventHandler('mh_jobgarage:GiveAllKeysBack', function(veh)
end
TriggerClientEvent('mh_jobgarage:notify', _source, "Schlüsselkasten", "Du hast sämtliche Schlüssel zurückgegeben", "inform")
end)
QBCore.Functions.CreateCallback('mh_jobgarage:CallOwnerVehicles', function(source, cb)
local _source = source
local Player = QBCore.Functions.GetPlayer(_source)
local pedid = Player.PlayerData.citizenid
local veh = {}
MySQL.query("SELECT * FROM player_vehicles", {}, function(rs)
if rs ~= nil and rs[1] ~= nil then
for k, v in pairs(rs) do
local keycount = MySQL.query("SELECT * FROM vehicle_keys WHERE owner = ? AND plate = ?", {pedid, v.plate})
print("Key Count: "..json.encode(keycount))
table.insert(veh, {plate = v.plate, keys = keycount[1].count})
end
cb(veh)
else
cb(false)
end
end)
end)

View file

@ -1 +1 @@
{"police":100,"Zum Durstigen Dackel":200,"ambulance":0,"kayas":0,"dackel":0,"ammu":1000,"odin":0,"cinema":0}
{"Zum Durstigen Dackel":200,"kayas":0,"odin":0,"ammu":1000,"dackel":0,"ambulance":0,"police":100,"cinema":0}

File diff suppressed because it is too large Load diff

View file

@ -5946,3 +5946,15 @@
[info][UnlSpectre][2025/06/23 04:00:56]: Successfully started PlayerController
[info][UnlSpectre][2025/06/23 04:00:56]: Successfully started VehicleController
[info][UnlSpectre][2025/06/23 04:01:05]: HTTP Server started on port 3000.
[info][UnlSpectre][2025/06/23 16:00:18]: Successfully registered Exports
[info][UnlSpectre][2025/06/23 18:02:20]: Successfully registered Exports
[info][UnlSpectre][2025/06/23 18:20:27]: Successfully registered Exports
[info][UnlSpectre][2025/06/23 18:22:36]: Successfully registered Exports
[info][UnlSpectre][2025/06/23 18:22:36]: Successfully loaded Items
[info][UnlSpectre][2025/06/23 18:22:36]: Successfully loaded Jobs
[info][UnlSpectre][2025/06/23 18:22:36]: Successfully loaded Gangs
[info][UnlSpectre][2025/06/23 18:22:36]: Successfully loaded Vehicles
[info][UnlSpectre][2025/06/23 18:22:36]: Successfully started GameController
[info][UnlSpectre][2025/06/23 18:22:36]: Successfully started PlayerController
[info][UnlSpectre][2025/06/23 18:22:36]: Successfully started VehicleController
[info][UnlSpectre][2025/06/23 18:22:43]: HTTP Server started on port 3000.

View file

@ -4155,6 +4155,6 @@
}
],
"waypoints": [],
"tokenSecret": "AA32TMVDbDf6PE8ENNze",
"tokenSecret": "9K7UMZpVCEyP3HKTEi3b",
"supporterStash": []
}

View file

@ -8144,3 +8144,8 @@
[info][2025/06/22 22:50:09]: nordi requested item spazi.
[info][2025/06/22 22:50:11]: nordi requested save item spazi.
[info][2025/06/22 22:50:11]: nordi successfully saved item spazi.
[info][2025/06/23 19:03:44]: nordi requested all items.
[info][2025/06/23 19:03:53]: nordi requested item pistol_ammo.
[info][2025/06/23 19:04:04]: nordi requested save item pistol_ammo.
[info][2025/06/23 19:04:04]: nordi successfully saved item pistol_ammo.
[info][2025/06/23 19:04:08]: nordi requested all items.

View file

@ -4102,3 +4102,5 @@
[info][2025/06/22 23:26:27]: Lucifer Morningstar got killed by Victoria Ann with Special Carbine causing 239 damage.
[info][2025/06/22 23:41:20]: Lucifer Morningstar got hit by Lucifer Morningstar with Fist causing 16 damage.
[info][2025/06/22 23:41:21]: Lucifer Morningstar got hit by Lucifer Morningstar with Fist causing 16 damage.
[info][2025/06/23 19:06:02]: David Munkli aimed at Eylül Kaya with Special Carbine.
[info][2025/06/23 19:11:36]: Sophia Marino got hit by Wilke Mayer with Fist causing 27 damage.

View file

@ -7529,3 +7529,5 @@
[info][2025/06/22 23:26:27]: [BCK05564] Got killed by Victoria Ann (GNR11868) with Special Carbine causing 239 damage.
[info][2025/06/22 23:41:20]: [BCK05564] Got hit by Lucifer Morningstar (BCK05564) with Fist causing 16 damage.
[info][2025/06/22 23:41:21]: [BCK05564] Got hit by Lucifer Morningstar (BCK05564) with Fist causing 16 damage.
[info][2025/06/23 19:06:02]: [DWK58991] Aimed at Eylül Kaya (KOK33025) with Special Carbine.
[info][2025/06/23 19:11:36]: [ABD68100] Got hit by Wilke Mayer (ITG79090) with Fist causing 27 damage.

View file

@ -6288,3 +6288,9 @@
[info][2025/06/22 21:58:41]: Login attempt on Nordi from 95.33.60.84
[info][2025/06/22 21:58:43]: Login attempt on Nordi from 95.33.60.84
[info][2025/06/22 22:23:10]: nordi requested all players.
[info][2025/06/23 18:29:24]: Login attempt on Nordi from 80.228.185.74
[info][2025/06/23 18:31:06]: nordi requested all vehicles.
[info][2025/06/23 18:31:10]: nordi requested all vehicles.
[info][2025/06/23 18:31:11]: nordi requested all vehicles.
[info][2025/06/23 18:31:15]: nordi requested vehicle with id 237.
[info][2025/06/23 18:31:18]: nordi requested despawn vehicle with plate 6PQ692PZ id 237.