Exports

Exports list

CLIENT SIDE:

GetVehicleLabel(model, cb)

exports['op-garages']:GetVehicleLabel(model, function(label)
    return label
end)    

SERVER SIDE:

getAllVehicles(source, typeOfVehicles, cb)

exports['op-garages']:getAllVehicles(source, "car", function(data)
    return data
    
    -- THIS RETURN DATA FROM MYSQL, FOR ESX FROM owned_vehicles for QBCORE from player_vehicles. 
    -- In esx and in qbcore script use state value to check if vehicle is out or in.
    -- state 1 == out of garage
    -- state 0 == in garage
end)   

getVehicleStateByPlate(plate, cb)

exports['op-garages']:getVehicleStateByPlate(plate, function(data)
    return data
    
    -- THIS RETURN VALUE 0 OR 1
    -- In esx and in qbcore script use state value to check if vehicle is out or in.
    -- 1 == out of garage
    -- 0 == in garage
end)   

getVehicleByPlate(plate, cb)

exports['op-garages']:getVehicleByPlate(plate, function(data)
    return data
    
    -- THIS RETURN DATA FROM MYSQL, FOR ESX FROM owned_vehicles for QBCORE from player_vehicles. 
    -- In esx and in qbcore script use state value to check if vehicle is out or in.
    -- state 1 == out of garage
    -- state 0 == in garage
end)   

Last updated