☰ All guides
6-GPS V2
Job GPS: colleagues see each other live on the map, with their own icon on foot, in a car, boat, helicopter, plane or when dead.
Resource folder
six_gpsv2
01Requirements
- ESX (1.1, 1.2 or Legacy) or QB-Core
- No database resource needed.
02Installation
- 01Sign in to the Cfx Portal with the account you bought with and download the script under Granted Assets.
- 02Unzip the download and move the folder
six_gpsv2into theresourcesfolder of your server. Keep the folder name and upload every file, including the hidden.fxap. - 03Create the item
gps. ESX: run the statement below. QB-Core: add the line below toqb-core/shared/items.lua. - 04QB-Core only: open
fxmanifest.luaand remove the line'@es_extended/imports.lua'. That file does not exist on a QB server and causes an error at start. - 05Open
config.luaand setConfig.frameworkto"esx"or"qb". - 06Add
ensure six_gpsv2to yourserver.cfg, below your framework. - 07Restart the server (or run
refreshand thenensurewith the folder name in the server console).
INSERT INTO items (name, label) VALUES ('gps', 'GPS');
gps = { name = 'gps', label = 'GPS', weight = 100, type = 'item', image = 'gps.png', unique = false, useable = true, shouldClose = true, description = 'Shows your position to your colleagues' },
Careful
Use the statement above instead of the shipped sql_esx.sql if the import stops with a syntax error. Older copies of that file have a stray comma.
Good to know
ox_inventory: items are not read from the database. Add the item to ox_inventory/data/items.lua instead: ['gps'] = { label = 'GPS', weight = 100 },
03How players use it
Using the item gps switches the device on, using it again switches it off. While it is on, everyone in the same job with an active GPS sees each other as blips. Jobs listed in NoAccessToGPS cannot switch it on.
04Configuration
Option
- Config.framework
"esx"or"qb".- Config.newESX
truefor ESX Legacy (1.2 and newer, shared object via export).falsefor old ESX 1.1 (shared object via event). Ignored on QB.- Config.Language
"en"or"de".- GPS.item
- Name of the GPS item.
- GPS.refreshtime
- How often positions update, in milliseconds. Default 5 seconds.
- GPS.NoAccessToGPS
- Jobs that cannot use the GPS.
- GPS.DeathNative
- Function that decides whether a player counts as dead. Change it if your ambulance script uses its own death state.
- Config.Blips
- One blip per state:
foot,car,boat,heli,plane,dead. Each hasactivated,sprite,scale,color,display,category,shortRange. - notify()
- Function for notifications. Swap in your own notify event here.
Sprite and colour numbers are listed in the FiveM blip reference.
›config.luaComplete file · 106 lines
Config = {}
-- Framework setting: Choose between "esx" or "qb"
Config.framework = "esx"
-- Enable new ESX version (true/false)
Config.newESX = true
-- Language setting: Default is English ("en")
Config.Language = "en"
-- GPS Configuration
Config.GPS = {
item = "gps", -- GPS item name
refreshtime = 5 * 1000, -- 5 seconds - optimized for performance
-- Job Restrictions
NoAccessToGPS = {
"unemployed",
},
-- Death Detection - Optimized for performance
DeathNative = function(ped)
return IsEntityDead(ped)
end,
}
-- Optimized Blip Configuration for better performance
Config.Blips = {
foot = {
activated = true,
sprite = 1, -- Standard dot - fastest rendering
scale = 0.8,
color = 3, -- Green
display = 4, -- Both map and minimap
category = 7, -- Other players
shortRange = true, -- Performance optimization
},
car = {
activated = true,
sprite = 225, -- Car icon
scale = 0.8,
color = 3,
display = 4,
category = 7,
shortRange = true,
},
boat = {
activated = true,
sprite = 427, -- Boat icon
scale = 0.8,
color = 3,
display = 4,
category = 7,
shortRange = true,
},
heli = {
activated = true,
sprite = 64, -- Helicopter icon
scale = 0.8,
color = 3,
display = 4,
category = 7,
shortRange = true,
},
plane = {
activated = true,
sprite = 423, -- Plane icon
scale = 0.8,
color = 3,
display = 4,
category = 7,
shortRange = true,
},
dead = {
activated = true,
sprite = 303, -- Skull icon
scale = 0.8,
color = 1, -- Red
display = 4,
category = 7,
shortRange = true,
},
}
-- Performance-optimized Notification Function
function notify(source, title, message, type)
-- For best performance: Use only one notification method
TriggerClientEvent('esx:showNotification', source, message)
-- Alternative for better notifications (if available):
-- TriggerClientEvent("six", source, title, message, type, 5000)
end
-- Locales - Optimized for performance (String Interning)
Config.Locales = {
['de'] = {
["gps_notify_title"] = "GPS-Gerät",
["gps_on"] = "Dein GPS Gerät wurde aktiviert",
["gps_off"] = "Dein GPS Gerät wurde deaktiviert",
},
['en'] = {
["gps_notify_title"] = "GPS Device",
["gps_on"] = "Your GPS device has been activated",
["gps_off"] = "Your GPS device has been deactivated",
},
}
Good to know
Modified framework? Every framework call of this script sits in client/esx.lua, client/qb.lua, server/esx.lua and server/qb.lua. Adapt those files if your server uses renamed events or a custom inventory. They stay editable in the Locked version too.
05Troubleshooting
The item cannot be used.
The item gps is missing or has another name than GPS.item.
I don't see my colleagues.
Both players need the same job and an active GPS. Check that your job is not listed in NoAccessToGPS.
06Still stuck?
Open a ticket on our Discord. Send the script name, your framework and version, and the full error from the server console (F8 for client errors). That saves a round of questions.
