NextScripts
  • NextScripts Documentation
  • ESX Scripts
    • ✅Garage System
      • Installation
      • SQL
      • Configuration
        • Main Config
        • Blips Config
        • Commands Config
        • Zones Config
      • Events & Exports
        • Client
          • Deformation
          • getExtraData - Export
          • SpawnVehicle - Export
          • StoreVehicle - Export
          • isInAnyMarker - Export
          • impound - Export
          • pdimpound - Export
        • Server
          • Deformation
      • Commands
    • 🛠️Engine System
      • Installation
      • Configuration
      • Events & Exports
        • Client
        • Server
    • 🛠️Vehicle Lock
Powered by GitBook
On this page
  1. ESX Scripts
  2. Garage System
  3. Configuration

Main Config

Config = {}
Config.Locale = 'en'

Config.Main = {
    DrawDistanceMarker = 100, -- Draw Distance for Markers.
	KickCheaters = true, -- true = Kick Player that tries to Cheat Garage by changing Vehicle Hash/Plate.

    NotifyTitles = 'Garage System', -- Notify Title.
    LockSystem = 'r_vehiclelocks', -- Supported r_vehiclelocks, function to give Keys to Vehicle.
    DrawMarkers = 'default', -- Supported default, custom to draw Markers.

    DisableQRadio = true, -- Disable QRadio when Player is in Marker.

    ImpoundPrice = 500, -- Price to get Vehicle from Impound.

    SaveDamage = {
        bodyHealth = true, -- Save Body Health.
        engineHealth = true, -- Save Engine Health.
        tankHealth = true, -- Save Tank Health.

        deformation = true, -- Save Deformation.
        wheelHealth = true, -- Save Wheel Health.
        tyreBurst = true, -- Save Tyre Burst.
        doorHealth = true, -- Save Door Health.
    },

    Client = {
        NotifyFunction = function(title, text, type, duration)
            --ESX.CustomNotify(title, text, type, duration)
            ESX.ShowNotification(text, type)
        end,

        CustomGiveKeys = function(vehicle) -- Custom Function to give Keys to Vehicle.
            -- Code here
        end,

        CustomGiveAdminKeys = function(vehicle) -- Custom Function to give Admin Keys to Vehicle.
            -- Code here
        end,

        -- pointData = {scale x, scale y, scale z, color r, color g, color b}
        -- marker = vector {x, y, z}
        -- type = store, garage, impound, pdimpound
        CustomDrawMarker = function(marker, pointData, type) -- Custom Function to Draw Marker.
            -- Code here
        end,

        OverrideEnteredMarker = function(zone) -- Custom Function to Override Entered Marker.
            -- Code here with return true to disable event
            return false
        end,

        TriggerEnterMarker = function(zone) -- Custom Function to Trigger Enter Marker.
            -- Code here
        end,

        TriggerExitMarker = function(zone) -- Custom Function to Trigger Exit Marker.
            -- Code here
        end,

        -- Fuel
        GetFuel = function(vehicle) -- Custom Function to Get Fuel.
            if GetResourceState('ox_fuel') == 'started' then
                return Entity(vehicle).state.fuel
            else
                return 100
            end
        end,

        SetFuel = function(vehicle, fuel) -- Custom Function to Set Fuel.
            if GetResourceState('ox_fuel') == 'started' then
                local state = Entity(vehicle).state
                state:set('fuel', fuel, true)
            end
        end,
    },

    Server = {
        NotifyFunction = function(source, title, text, type, duration)
            TriggerClientEvent("esx:showNotification", source, text, type)
        end,
    },
}
PreviousConfigurationNextBlips Config

Last updated 1 year ago

✅