SearchRadar (GPS System) - TOP-Scripts/STORE-SCRIPTS GitHub Wiki
Search Radar:
A system that measures the distance until your object.
You set an invisible waypoint on the map with a Trigger, and the radar will show you the distance from it.
This script is intended for everyone that wants to make players search for the destinations, instead of just marking them on the map.
Simple as…
`TriggerEvent(“TopSearchRadar:client:toggleMeter”, vector3(10.01,20.01,1.01))`
to show rmeter with the spot set,
or…
`TriggerEvent(“TopSearchRadar:client:updMeter”, vector3(10.01,20.01,1.01)) `
to update the info of a moving target

The command “rmeter”, will show\hide rmeter with the predefined coords, set in the config.lua file.
rmeter will hide after a few seconds, once the target has been found.
So for example you want to change your qb-truckrobbery to instead of setting a waypoint for the truck, you want the search radar.
Well, in client/main.lua line 246 you will see
SetNewWaypoint(VehicleCoords.x, VehicleCoords.y)
ClearAreaOfVehicles(VehicleCoords.x, VehicleCoords.y, VehicleCoords.z, 15.0, false, false, false, false, false)
transport = CreateVehicle(GetHashKey(‘stockade’), VehicleCoords.x, VehicleCoords.y, VehicleCoords.z, 52.0, true,true)
SetEntityAsMissionEntity(transport)
TruckBlip = AddBlipForEntity(transport)
SetBlipSprite(TruckBlip, 57)
SetBlipColour(TruckBlip, 1)
SetBlipFlashes(TruckBlip, true)
BeginTextCommandSetBlipName(“STRING”)
AddTextComponentString(‘Van with Cash’)
EndTextCommandSetBlipName(TruckBlip)
just change a few things
—SetNewWaypoint(VehicleCoords.x, VehicleCoords.y)
TriggerEvent(“TopSearchRadar:client:toggleMeter”, vector3(VehicleCoords.x, VehicleCoords.y,VehicleCoords.z))
ClearAreaOfVehicles(VehicleCoords.x, VehicleCoords.y, VehicleCoords.z, 15.0, false, false, false, false, false)
transport = CreateVehicle(GetHashKey(‘stockade’), VehicleCoords.x, VehicleCoords.y, VehicleCoords.z, 52.0, true,true)
SetEntityAsMissionEntity(transport)
—TruckBlip = AddBlipForEntity(transport)
—SetBlipSprite(TruckBlip, 57)
—SetBlipColour(TruckBlip, 1)
—SetBlipFlashes(TruckBlip, true)
—BeginTextCommandSetBlipName(“STRING”)
—AddTextComponentString(‘Van with Cash’)
—EndTextCommandSetBlipName(TruckBlip)
This shows the Player the radar with the truck starting coords.
To update the coord go to line 300 and add
TriggerEvent(“TopSearchRadar:client:updMeter”, vector3(transCoords.x, transCoords.y, transCoords.z))
All done.