forked from Simnation/Main
Update server.lua
This commit is contained in:
parent
0c18708427
commit
53a02bdea8
1 changed files with 2 additions and 11 deletions
|
@ -43,17 +43,8 @@ AddEventHandler('mh_jobgarage:DeleteFromList', function(plate)
|
|||
local _source = source
|
||||
local Player = QBCore.Functions.GetPlayer(_source)
|
||||
local pedid = Player.PlayerData.citizenid
|
||||
local keycounter = nil
|
||||
MySQL.query.await("SELECT value FROM mh_jobgarage WHERE plate = ?", {plate}, function(rs)
|
||||
print("RS Value: "..json.encode(rs))
|
||||
if rs ~= nil and rs[1] ~= nil then
|
||||
keycounter = rs[1].value
|
||||
else
|
||||
keycounter = 0
|
||||
end
|
||||
end)
|
||||
print(json.encode(keycounter))
|
||||
print("keycounter: "..tonumber(keycounter))
|
||||
local keycounter = MySQL.query("SELECT value FROM mh_jobgarage WHERE plate = ?", {plate})
|
||||
keycounter = keycounter[1].value or 0
|
||||
|
||||
if keycounter == nil then
|
||||
TriggerClientEvent('mh_jobgarage:notify', _source, "Schlüsselkasten", "Fehler, versuche es Später erneut.", "inform")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue