GFX Development
  • gfx
    • About GFX
  • Product Docs
    • 📥GFX All in One Menu
      • 🛠️Setup
        • ⚙️Configuration
        • 📝Setting Permissions
      • 📒Informations
        • 💻For Developers
        • 👨‍💻Admin Commands
      • 🖇️Pages
        • 📄Profile
        • 📄Leaderboard
    • 🏎️GFX Racing
      • 🔨Installation
      • ⚙️Configuration
    • 📸GFX Deathcam
      • 🔨Installation
      • GFX Deathcam V1
        • ⚙️Configuration
      • GFX Deathcam V2
        • ⚙️Configuration
    • 📊GFX Leaderboard
      • 🔨Installation
      • ⚙️Configuration
    • ⚔️GFX Arena
      • 🔨Installation
      • ⚙️Configuration
    • 👨‍👨‍👦‍👦GFX Squad
      • 🔨Installation
      • ⚙️Configuration
      • 💻Exports
    • 🔬GFX Evidence
      • 🔨Installation
      • ⚙️Configuration
    • ❗GFX Notification
      • 🔨Installation
      • ⚙️Configuration
      • 💻Exports and Events
        • ⬆️Exports
        • ⬇️Events
    • 🚚GFX Delivery
      • 🔨Installation
      • ⚙️Configuration
    • 🛍️GFX Tebexshop
      • 🔨Installation
      • ⚙️Configuration
      • ⚠️Tebex Settings
      • ⬆️Exports
    • 👁️‍🗨️GFX Interact
      • 🔨Installation
      • ⬆️Exports
    • 🫂GFX Crew
      • 🔨Installation
      • ⚙️Configuration
      • ⬆️Exports
    • 🫂GFX Squad Remake
      • 🔨Installation
      • ⚙️Configuration
      • ⬆️Exports
    • GFX PVP Chat
      • 🔨Installation
      • ⚙️Configuration
      • ⬆️Exports
    • GFX HUD
      • 🔨Installation
      • ⚙️Configuration
    • 🔫GFX Attachment
      • 🔨Installation
      • ⚙️Configuration
    • 💀GFX Deathlog
      • 🔨Installation
      • ⚙️Configuration
    • 🛍️GFX PVP Shop
      • 🔨Installation
      • ⚙️Configuration
    • 🧱GFX Crafting
      • 🔨Installation
      • ⚙️Configuration
    • 🚍GFX Bus Job
      • 🔨Installation
      • ⚙️Configuration
    • 🐔GFX Chicken Farm
      • 🔨Installation
      • ⚙️Configuration
    • 🎁GFX Giveaway
      • 🔨Installation
      • ⚙️Configuration
    • 🛍️GFX Pawnshop
      • 🔨Installation
      • ⚙️Configuration
    • 🪵GFX Lumberjack
      • 🔨Installation
      • ⚙️Configuration
    • 🚙GFX Secondhand Vehicle
      • 🔨Installation
      • ⚙️Configuration
    • 🤖GFX Autopilot
      • 🔨Installation
      • ⚙️Configuration
    • 🗳️GFX Vote
      • 🔨Installation
      • ⚙️Configuration
    • 🟢GFX Safezone
      • 🔨Installation
      • ⚙️Configuration
    • 🎅GFX Christmastruck
      • 🔨Installation
      • ⚙️Configuration
    • 🚔GFX Handcuff
      • 🔨Installation
      • ⚙️Configuration
    • 🚚GFX Trucker Job
      • 🔨Installation
      • ⚙️Configuration
    • 🌱GFX Weed
      • 🔨Installation
      • ⚙️Configuration
    • 🔉GFX DUI Radio
      • 🔨Installation
      • ⚙️Configuration
Powered by GitBook
On this page
  1. Product Docs
  2. GFX Safezone

Configuration

Check the instructions below.

Zone Settings

Define multiple safe zones with unique properties under the Zones table.

Zone Example:

["main_zone"] = {
    coords = vector3(-1832.2600, -1205.6547, 14.2980), -- Center of the safe zone
    radius = 70.0,                                     -- Radius of the zone
    blipOptions = {
        active = false,                                -- Show blip on the map (true/false)
        color = 2,                                     -- Blip color
        scale = 1.0,                                   -- Blip scale
        name = "Coast Side Safezone"                   -- Blip name
    },
    options = {
        mergePlayers = true,                           -- Merge players (e.g., avoid collisions)
        mergeVehicles = true,                          -- Merge vehicles
        mergePlayerAndVehicles = true,                 -- Merge players and vehicles
        disableShooting = true,                        -- Disable shooting
        disableMelee = true                            -- Disable melee attacks
    }
}
Field
Description
Example Value

coords

Center coordinates of the safe zone.

vector3(x, y, z)

radius

Radius of the zone in meters.

70.0

blipOptions.active

Enable or disable map blip for the zone.

true or false

blipOptions.color

Color of the map blip.

2

blipOptions.scale

Scale of the map blip.

1.0

blipOptions.name

Name displayed on the map blip.

"Safezone"

options.mergePlayers

Enable player merging to avoid collisions.

true

options.mergeVehicles

Enable vehicle merging.

true

options.disableShooting

Disable shooting in the zone.

true

options.disableMelee

Disable melee attacks in the zone.

true


Localization

Edit the Locales table to customize messages displayed when entering or leaving a safe zone.

Key
Default Value
Description

entered_zone

"~g~Entraste na Safezone."

Message shown when entering a safe zone.

left_zone

"~r~Saiste da Safezone."

Message shown when leaving a safe zone.


API Reference

The script provides several client and server-side exports for easy integration into other scripts.

Client-Side Exports

Function Name
Description
Output

GetClosestZone()

Returns the closest safe zone to the player (useful for respawn systems).

Zone key (string)

GetCurrentZone()

Returns the key of the zone the player is currently in. Returns false if not in a zone.

Zone key (string) or false

InSafeZone()

Checks if the player is in a safe zone.

true or false

Server-Side Exports

Function Name
Description
Output

GetPlayersInZone(zoneKey)

Returns an array of player resources currently in the specified zone.

[player1, player2, ...]

GetPlayerZone(source)

Returns the current zone of a player. Returns nil if the player is not in a zone.

Zone key (string) or nil

InSafeZone(source)

Checks if a specific player is in a safe zone.

true or false

PreviousInstallationNextGFX Christmastruck

Last updated 5 months ago

🟢
⚙️