1
0
Fork 0
forked from Simnation/Main
This commit is contained in:
Nordi98 2025-07-02 18:45:20 +02:00
parent 0d4416dbb4
commit d0f50224d7
4 changed files with 82 additions and 19 deletions

View file

@ -296,30 +296,42 @@ end)
RegisterNetEvent('qb_vehicle_tracker:client:locateTracker', function(serialNumber)
if serialNumber == nil then uiNotify(locale('vt_not_placed'), 'error') return end
lib.callback('qb_vehicle_tracker:getTrackedVehicleBySerial', false, function(veh, vehCoords, trackerName)
lib.callback('qb_vehicle_tracker:getTrackedVehicleBySerial', false, function(veh, vehCoords, trackerName, isLastKnown)
if veh == nil then uiNotify(locale('vt_unable_connect'), 'error') return end
local blip = AddBlipForCoord(vehCoords.x , vehCoords.y, 0.0)
local blip = AddBlipForCoord(vehCoords.x, vehCoords.y, 0.0)
SetBlipSprite(blip, 161)
SetBlipColour(blip, 1)
SetBlipColour(blip, isLastKnown and 3 or 1) -- Use yellow for last known position, red for current
SetBlipAlpha(blip, 250)
SetBlipDisplay(blip, 2)
SetBlipScale(blip, 2.5)
PulseBlip(blip)
SetBlipAsShortRange(blip, false)
BeginTextCommandSetBlipName('STRING')
AddTextComponentSubstringPlayerName(trackerName or ('Tracker ' .. veh))
local blipName = trackerName or ('Tracker ' .. veh)
if isLastKnown then
blipName = blipName .. " (Last Known)"
end
AddTextComponentSubstringPlayerName(blipName)
EndTextCommandSetBlipName(blip)
SetNewWaypoint(vehCoords.x , vehCoords.y)
SetNewWaypoint(vehCoords.x, vehCoords.y)
trackedVehicles[serialNumber] = blip
playSound('10_SEC_WARNING', 'HUD_MINI_GAME_SOUNDSET')
uiNotify(locale('vt_connection_success'), 'success')
if isLastKnown then
uiNotify(locale('vt_last_known_position') or "Showing last known position of vehicle", 'info')
else
uiNotify(locale('vt_connection_success'), 'success')
end
end, serialNumber)
end)
-- New events for advanced scanner features
RegisterNetEvent('qb_vehicle_tracker:client:locateTrackerOwner', function(vehiclePlate)
-- Determine which skill check difficulty to use based on player job