diff --git a/resources/[phone]/roadphone/client/valet.lua b/resources/[phone]/roadphone/client/valet.lua index 3e17e54f8..147144286 100644 --- a/resources/[phone]/roadphone/client/valet.lua +++ b/resources/[phone]/roadphone/client/valet.lua @@ -56,60 +56,54 @@ RegisterNUICallback('searchCar', function(data, cb) cb('ok') end) -RegisterNUICallback("deliverormarkcar", function(data, cb) - QBCore.Functions.TriggerCallback("roadphone:valet:loadVehicle", function(vehicle, coords) +-- RegisterNUICallback("deliverormarkcar", function(data, cb) +-- QBCore.Functions.TriggerCallback("roadphone:valet:loadVehicle", function(vehicle, coords) +-- if not vehicle and not coords then +-- return +-- end +-- if vehicle == false then +-- if coords then +-- SetNewWaypoint(coords.x, coords.y) +-- TriggerEvent("roadphone:sendNotification", { +-- apptitle = 'APP_VALET_NAME', +-- title = 'APP_VALET_TITLE_WAYPOINT', +-- img = "/public/img/Apps/valet.jpg" +-- }) +-- end +-- return; +-- end - if not vehicle and not coords then - return - end +-- local plate = vehicle[1].plate - if vehicle == false then - if coords then - SetNewWaypoint(coords.x, coords.y) - TriggerEvent("roadphone:sendNotification", { - apptitle = 'APP_VALET_NAME', - title = 'APP_VALET_TITLE_WAYPOINT', - img = "/public/img/Apps/valet.jpg" - }) +-- local gameVehicles = GetGamePool('CVehicle') +-- for i = 1, #gameVehicles do +-- local vehicle = gameVehicles[i] +-- if DoesEntityExist(vehicle) then +-- if GetVehicleNumberPlateText(vehicle) == plate then +-- local vehicleCoords = GetEntityCoords(vehicle) +-- SetNewWaypoint(vehicleCoords.x, vehicleCoords.y) +-- TriggerEvent("roadphone:sendNotification", { +-- apptitle = 'APP_VALET_NAME', +-- title = 'APP_VALET_TITLE_WAYPOINT', +-- img = "/public/img/Apps/valet.jpg" +-- }) +-- cb('ok') +-- return +-- end +-- end +-- end - end - return; - end +-- QBCore.Functions.TriggerCallback("roadphone:valet:checkMoney", function(cb) +-- if cb then +-- SpawnVehicle(vehicle[1].vehicle, plate, json.decode(vehicle[1].mods)) +-- end +-- end) - local plate = vehicle[1].plate +-- end, data.plate) - local gameVehicles = GetGamePool('CVehicle') +-- cb('ok') +-- end) - for i = 1, #gameVehicles do - local vehicle = gameVehicles[i] - - if DoesEntityExist(vehicle) then - if GetVehicleNumberPlateText(vehicle) == plate then - local vehicleCoords = GetEntityCoords(vehicle) - SetNewWaypoint(vehicleCoords.x, vehicleCoords.y) - TriggerEvent("roadphone:sendNotification", { - apptitle = 'APP_VALET_NAME', - title = 'APP_VALET_TITLE_WAYPOINT', - img = "/public/img/Apps/valet.jpg" - }) - cb('ok') - return - end - end - end - - QBCore.Functions.TriggerCallback("roadphone:valet:checkMoney", function(cb) - - if cb then - SpawnVehicle(vehicle[1].vehicle, plate, json.decode(vehicle[1].mods)) - end - end) - - end, data.plate) - - cb('ok') - -end) function SpawnVehicle(vehicle, plate, mods) diff --git a/resources/[phone]/roadphone/public/static/config/config.json b/resources/[phone]/roadphone/public/static/config/config.json index 202ae68e9..ef6fadc6a 100644 --- a/resources/[phone]/roadphone/public/static/config/config.json +++ b/resources/[phone]/roadphone/public/static/config/config.json @@ -234,7 +234,7 @@ "disallowJobs": [] }, { - "name": "Fotos", + "name": "Galerie", "icon": "/public/img/Apps/gallery.png", "default": true, "category": "apps", @@ -242,6 +242,15 @@ "allowJobs": [], "disallowJobs": [] }, + { + "name": "Garage", + "icon": "/public/img/Apps/valet.jpg", + "default": true, + "category": "apps", + "redirect": "gallery", + "allowJobs": [], + "disallowJobs": [] + }, { "name": "Rechner", "icon": "/public/img/Apps/calculator.png",