ed
This commit is contained in:
		
							parent
							
								
									3667e4358b
								
							
						
					
					
						commit
						272a450250
					
				
					 2 changed files with 116 additions and 8 deletions
				
			
		| 
						 | 
				
			
			@ -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)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue