Check Owner Funktion ADD

This commit is contained in:
Miho931 2025-06-25 13:18:34 +02:00
parent 0070350cd1
commit 105f6a85ca
2 changed files with 69 additions and 56 deletions

View file

@ -148,4 +148,13 @@ end)
RegisterServerEvent('mh_garage:spawnedVehicle')
AddEventHandler('mh_garage:spawnedVehicle', function(netID, plate)
MySQL.query("UPDATE player_vehicles SET garage = ? WHERE plate = ?", {"OUT", plate})
end)
QBCore.Functions.CreateCallback('mh_garage:CheckownerVehicles', function(source, cb, plate)
MySQL.query("SELECT * FROM player_vehicles WHERE plate = ?", {plate}, function(rs)
if rs ~= nil and rs[1] ~= nil then
cb(true)
else
cb(false)
end)
end)