forked from Simnation/Main
Merge branch 'master' of https://git.evolution-state-life.de/Evolution-State-Life/Main
This commit is contained in:
commit
715c18bb46
3 changed files with 399 additions and 399 deletions
|
@ -49,7 +49,7 @@ function OpenMenu(vehicles)
|
||||||
local opt = {}
|
local opt = {}
|
||||||
local Player = QBCore.Functions.GetPlayerData()
|
local Player = QBCore.Functions.GetPlayerData()
|
||||||
|
|
||||||
if Player.job.grade.level == Zone.Chiefrang then
|
if Player.job.grade.level >= Zone.Chiefrang then
|
||||||
table.insert(opt, {
|
table.insert(opt, {
|
||||||
title = "Fahrzeug Einstellungen",
|
title = "Fahrzeug Einstellungen",
|
||||||
description = "Fahrzeuge verwalten",
|
description = "Fahrzeuge verwalten",
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
function CheckVehicleOwner(id, plate)
|
function CheckVehicleOwner(id, plate)
|
||||||
MySQL.query.await("SELECT * FROM player_vehicles WHERE citizenid = ? and plate = ?", {id, plate}, function(rs)
|
MySQL.query("SELECT * FROM player_vehicles WHERE citizenid = ? and plate = ?", {id, plate}, function(rs)
|
||||||
if rs ~= nil then
|
if rs ~= nil then
|
||||||
return true
|
return true
|
||||||
else
|
else
|
||||||
|
|
|
@ -21,7 +21,7 @@ QBCore.Functions.CreateCallback('mh_jobgarage:AddVehicleToJob', function(source,
|
||||||
local pedid = Player.PlayerData.citizenid
|
local pedid = Player.PlayerData.citizenid
|
||||||
local pedjob = Player.PlayerData.job.name
|
local pedjob = Player.PlayerData.job.name
|
||||||
|
|
||||||
local isOwner = MySQL.query("SELECT * FROM player_vehicles WHERE citizenid = ? and plate = ?", {pedid, plate})
|
local isOwner = CheckVehicleOwner(pedid, plate)--MySQL.query("SELECT * FROM player_vehicles WHERE citizenid = ? and plate = ?", {pedid, plate})
|
||||||
local haveKeys = MySQL.query("SELECT * FROM vehicle_keys WHERE owner = ? and plate = ?", {pedid, plate})
|
local haveKeys = MySQL.query("SELECT * FROM vehicle_keys WHERE owner = ? and plate = ?", {pedid, plate})
|
||||||
|
|
||||||
if isOwner and haveKeys then
|
if isOwner and haveKeys then
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue