This commit is contained in:
Nordi98 2025-07-26 02:34:34 +02:00
parent 3667e4358b
commit 272a450250
2 changed files with 116 additions and 8 deletions

View file

@ -183,3 +183,18 @@ QBCore.Commands.Add('mietzeit', 'Zeige deine aktuelle Mietzeit an', {}, false, f
end
end)
end)
-- Spieler Mietverhältnisse abrufen (NEUER CALLBACK)
QBCore.Functions.CreateCallback('vehiclerental:server:getPlayerRentals', function(source, cb)
local Player = QBCore.Functions.GetPlayer(source)
if not Player then return cb(nil) end

MySQL.Async.fetchAll('SELECT * FROM vehicle_rentals WHERE citizenid = ? AND returned = FALSE', {
Player.PlayerData.citizenid
}, function(result)
if not result or #result == 0 then
return cb(nil)
end

cb(result)
end)
end)