๐Ÿ“กGPS System

Introduction

Hate-GPS is an advanced GPS system for FiveM servers that allows players to share their location with others using frequency channels. The system includes a dynamic map interface with multiple style options, waypoint functionality, and real-time player tracking.

Features

  • Framework Support: Compatible with both ESX and QBCore frameworks

  • Frequency System: Players can join specific frequency channels to share their location

  • Multiple Map Styles: Includes Satellite, Atlas and Grid view options

  • Waypoint System: Set custom waypoints with coordinates

  • Real-time Tracking: See other players on the same frequency in real-time

  • Item-based Usage: Requires a specific item to use the GPS

  • Responsive UI: Clean and functional user interface

Installation

  1. Extract the resource to your server's resources folder

  2. Add ensure hate-gps to your server.cfg

  3. Ensure the required item exists in your server's item database

  4. Restart your server

Configuration

The configuration file (config.lua) allows you to set the following options:

Config = {}
Config.GPSItemName = 'gps' -- Change this to the item you want to use for GPS

Framework Detection

The script automatically detects whether you're using ESX or QBCore:

Config.Framework = nil
if GetResourceState('es_extended') ~= 'missing' then 
    Config.Framework = "ESX"
elseif GetResourceState('qb-core') ~= 'missing' then 
    Config.Framework = "QBCore"
elseif GetResourceState('qbox') ~= 'missing' then 
    Config.Framework = "QBCore"
else
    print("[^3WARNING^7] NO COMPATIBLE FRAMEWORK FOUND")
end

Usage

For Players

  1. Have the GPS item in your inventory

  2. Use the GPS item to open the interface

  3. Set a frequency between 1.1 and 99.999 to connect with other players

  4. Use the map interface to see your location and others on the same frequency

  5. Set waypoints by entering coordinates

  6. Toggle the map style using the L key

  7. Toggle cursor mode with the X key

  8. Press ESC to close the GPS interface

Controls

  • X: Toggle cursor mode (when GPS is open)

  • L: Toggle between map styles (Satellite, Atlas, Grid)

  • ESC: Close the GPS interface

Functions and Exports

Since the client and server files are protected (escrow), specific exports are not documented. The resource is designed to work out of the box with the provided configuration file.

Item Setup

Ensure you have the GPS item (gps by default) registered in your server's item database:

QBCore

["gps"] = {
    name = "gps",
    label = "GPS Device",
    weight = 500,
    type = "item",
    image = "gps.png",
    unique = false,
    useable = true,
    shouldClose = true,
    combinable = nil,
    description = "A device used to navigate and share your location."
},

ESX

INSERT INTO `items` (`name`, `label`, `weight`, `rare`, `can_remove`) VALUES
('gps', 'GPS Device', 1, 0, 1);

Technical Information

The system works by allowing players to:

  1. Join a specific frequency channel

  2. Share their coordinates and heading with other players on the same channel

  3. View other players' positions in real-time on the map

  4. Get notifications when players leave the frequency

When players disconnect from the server, their markers are automatically removed from other players' maps.

Security Notice

This script is protected by FiveM's escrow system. The client and server-side code is encrypted and cannot be modified.

Last updated