NeedForScript
  • 🚀Getting Started
    • 🍿Welcome to NeedForScript
    • ❓Quick Setup Guide
  • 🔥Our Scripts
    • 💲Banking Script
      • 🧠Installation
      • ⚙️Configuration
    • 📑Billing Script
      • 🧠Installation
      • ⚙️Configuration
    • 🚗Garage Script
      • 🧠Installation
      • ⚙️Configuration
    • 🧑‍🔧Customs
      • 🧠Installation
      • ⚙️Configuration
Powered by GitBook
On this page
  • 📁 Configuration Guide
  • General Settings
  • Translations
  • Public Garages Setup - init.lua
  • Parking Spots - parkingSpots.lua
  • Rental Options - rent.lua
  • 📌 Pro Tips
  • Private Garage Creation - creation.lua
  • Private Garage Interiors - init.lua
  • Garage Customization - customization.lua
  • Impound System Configuration
  • Jobs Garages
  1. Our Scripts
  2. Garage Script

Configuration

📁 Configuration Guide

General Settings

return {
    debug = false,
    serverSetter = true,
    allowVehicleRequest = false, -- /requestVehicle [plate], will spawn vehicle to player closest road
    transferFees = 500,
    allowNoOwnerStore = false, -- allows player to store vehicle that he is don't own
    allowKeyHoldersPull = true, -- allows garage key holder to pull vehicle that inside the garage
    setIntoVehicle = true,
    coordsPullCheck = 20.0, -- this is security check for spots coords, if player is too far from distance, vehicle won't be pulled
    resetTimer = 10000, --[=[
        10 sec, measured in ms
        We create temporary data for player vehicles so that if a player opens the garage multiple times in less than 10 seconds,
        it will use the temporary data for fast loading. After this timer expires, the temporary data will be deleted. And then request the data from the database again.
    ]=]

    phoneRequestCooldown = 5,
    phoneRequestCost = 500,
    phoneModels = {
        `sf_prop_sf_phonebox_01b_s`,
        `sf_prop_sf_phonebox_01b_straight`,
        `prop_phonebox_01b`,
        `prop_phonebox_02`,
        `prop_phonebox_03`,
    }
}

Translations

All text displayed in the script including UI elements, notifications, and labels can be fully customized and translated to any language through our dedicated translations file.

Public Garages Setup - init.lua

1. Basic Structure

Each garage is defined as a table with these properties:

{
    id = "unique_name",              -- Internal ID (no spaces/special chars)
    label = "Display Name",          -- Shown to players
    hourlyCost = 5,                  -- Rental cost per hour ($)
    
    blacklist = {                    -- Restricted vehicle types
        boat = true,
        heli = true,
        plane = true,
        submarine = true
    },
    
    polyzone = {                     -- Garage boundary
        points = { vector3(x,y,z), ... },  -- Shape corners
        thickness = 5,               -- Zone height
        debug = false                -- Show zone outline
    },
    
    groups = {                       -- Job/group restrictions (optional)
        police = 4                   -- [group] = min_rank
    },
    
    blip = {                         -- Map marker
        coords = vector3(x,y,z),
        sprite = 357,                -- Blip icon (357=garage)
        color = 7,                   -- Blip color
        scale = 0.7
    }
}

2. Adding a New Garage

  1. Copy an existing garage block

  2. Change the id (must be unique)

  3. Update coordinates in polyzone.points (use /pzcreate in-game if using polyzone commands)

  4. Set the blip.coords to the entrance location

Example:

{
    id = "newgarage",
    label = 'New Public Garage',
    hourlyCost = 10,
    blacklist = { heli = true, plane = true },
    polyzone = {
        points = {
            vector3(100.0, -200.0, 30.0),
            vector3(110.0, -200.0, 30.0),
            vector3(110.0, -210.0, 30.0)
        },
        thickness = 5
    },
    blip = {
        coords = vector3(105.0, -205.0, 30.0),
        sprite = 357,
        color = 3  -- Green blip
    }
}

Parking Spots - parkingSpots.lua

Each garage added to init.lua needs corresponding parking spots under parkingSpots.lua file.

Adding Spots:

  1. Find your garage's id from init.lua

  2. Add new vector4 entries with:

    • First 3 numbers: Parking spot location

    • Last number: Vehicle heading (0-360 degrees)

Example for new garage:

newgarage = {
    vector4(105.0, -205.0, 30.0, 90.0),
    vector4(107.0, -205.0, 30.0, 90.0)
}

Rental Options - rent.lua

Customize rental durations:

return {
    { time = 30, name = "30 Minutes" },
    { time = 120, name = "2 Hours" },
    { time = 180, name = "3 Hours" },
    { time = 240, name = "4 Hours" },
}

📌 Pro Tips

  1. Test Zones: Use PolyZone script/pzcreate in-game to visualize polyzones before adding coordinates

  2. Blip Colors: Change blip.color for different garage types (e.g., red for police-only)

  3. Blacklist: Disable specific vehicle classes by setting their values to true

  4. Job Garages: Add groups = { jobname = min_rank } to restrict access

Private Garage Creation - creation.lua

Basic Settings

return {
    commandName = 'garageCreation',
    groups = {
        police = 2  -- Jobs allowed to use the command.
    },
    categories = {-- https://docs.fivem.net/natives/?_0x29439776AAA00A62
        cars = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 12},
        air = {16, 15},
        boat = 14
    },
    blip = {
        owned = {
            sprite = 357
        },
        sell = {
            sprite = 369
        }
    },
}
  • commandName: Set to 'garageCreation' - the command admins use to create garages

  • groups: Defines who can create garages (currently police = 2 means police with level 2+ access)

Vehicle Categories

categories = {    cars = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 12},  -- All ground vehicles    air = {16, 15},                                -- Aircraft    boat = 14                                      -- Boats}

These numbers correspond to GTA V vehicle class IDs that determine which vehicles can be stored.

Map Blips

  • owned: Sprite 357 for owned garages

  • sell: Sprite 369 for garages for sale

Private Garage Interiors - init.lua

Available Garage Types

Key Configuration Elements

 garage1 = {
        label = '2 Car Garage',
        category = 'cars',
        entrance = vector4(173.04, -1008.18, -99.0, 3.59),
        image = 'interiors/2spot_garage.jpg',
        prices = {
            autoRepairVehicles = 500,
            stash = 500,
            cctv = 500
        },
        stash = {
            slots = 20,
            maxWeight = 10000
        },
        management = vector3(172.95, -999.45, -99.0),
        spots = {
            vec4(175.005, -1003.545, -99.412, 180.654),
            vec4(171.057, -1003.645, -99.410, 180.652),
        }
    },
  • entrance: Where players spawn when entering

  • management: Location of garage management interface

  • spots: Array of vehicle parking positions (vec4 with coordinates and heading)

  • stash: Storage settings (slots and weight limit)

  • prices: Costs for optional features (auto-repair, storage, CCTV)

Garage Customization - customization.lua

 garage3 = {
        themes = {
            Immaculate = {entitySet = 'entity_set_shell_01', price = 50000},
            Industrial = {entitySet = 'entity_set_shell_02', price = 50000},
            Indulgent = {entitySet = 'entity_set_shell_03', price = 50000},
        },
        colorSet = {
            ['#ffffff'] = {entitySet = 'entity_set_tint_01', color = 1, price = 500}, -- White
            ['#808080'] = {entitySet = 'entity_set_tint_01', color = 2, price = 500}, -- Grey
            ['#000000'] = {entitySet = 'entity_set_tint_01', color = 3, price = 500}, -- Black
            ['#800080'] = { entitySet = 'entity_set_tint_01', color = 4, price = 500}, -- Purple
            ['#FFA500'] = { entitySet = 'entity_set_tint_01', color = 5, price = 500}, -- Orange
            ['#FFFF00'] = { entitySet = 'entity_set_tint_01', color = 6, price = 500}, -- Yellow
            ['#0000FF'] = { entitySet = 'entity_set_tint_01', color = 7, price = 500}, -- Blue
            ['#FF0000'] = { entitySet = 'entity_set_tint_01', color = 8, price = 500}, -- Red
            ['#008000'] = { entitySet = 'entity_set_tint_01', color = 9, price = 500}, -- Green
            ['#4682B4'] = { entitySet = 'entity_set_tint_01', color = 10, price = 500}, -- Vintage Blue
            ['#DC143C'] = { entitySet = 'entity_set_tint_01', color = 11, price = 500}, -- Vintage Red
            ['#556B2F'] = { entitySet = 'entity_set_tint_01', color = 12, price = 500} -- Vintage Green
        },
    },

Theme Options

  • garage3: 3 interior themes (Immaculate, Industrial, Indulgent) at 50,000 each

  • garage5: 9 different floor decal options at 50,000 each

Color Options

  • garage3: 12 color choices at 500 each (standard colors + vintage options)

  • garage5: 8 color scheme combinations for walls and trim

Impound System Configuration

return {
    hustling = {
        changeRoom = vector3(431.93, -985.36, 30.71),
        reductionPrice = 100,
        spots = {
            vector3(427.52, -976.16, 29.81),
            vector3(432.37, -974.2, 29.81),
            vector3(425.46, -972.9, 29.81),
            vector3(426.3, -983.13, 29.81),
            vector3(428.61, -981.45, 29.81)
        }
    },
    command = {
        times = { "30", "60", "120", "180", "240", "300", "600", "900", "1200" }, -- times list in minutes
        groups = {
            police = 3,                                                         -- [job] = [grade]
            mechanic = 1
        },
        name = 'impound',
    },
    payAndDrive = true, -- if true, the player will be able to pay and drive the vehicle without job restriction
}
  • times: Available impound durations in minutes (30 min to 20 hours)

  • groups: Jobs that can impound vehicles with required grade level

  • name: Command name (/impound)

  • payAndDrive: If true, allows players to retrieve vehicles without job restrictions by paying fees

Impound Locations - init.lua

return {
    cityImpound = {
        label = 'City impound',
        openCoords = vector3(408.62, -1623.89, 29.29),
        fees = 500,
        blip = {
            coords = vector3(403.54, -1631.49, 29.29),
            sprite = 68,
            color = 1,
            display = 6,
            scale = 1.0,
        },
    },
    policeImpound = {
        seize = true, -- if true, seized vehicles will be stored in this garage
        label = 'Police Department Impound',
        openCoords = vector4(433.12, -985.75, 29.71, 86.98),
        groups = {
            police = 3
        },
        blip = {
            coords = vector3(403.54, -1631.49, 29.29),
            sprite = 68,
            color = 1,
            display = 6,
            scale = 1.0,
        },
    },
}

City Impound

  • Purpose: Standard vehicle retrieval for towed/abandoned vehicles

  • Location: Open to all players

  • Fee: 500 units base cost

  • Blip: Sprite 68 (impound icon) in red

Police Impound

  • Purpose: Seized vehicles from police operations

Jobs Garages

return {
    policestorage = {
        label = 'Police Storage',
        blacklist = { -- https://docs.fivem.net/natives/?_0xA273060E
            boat = true,
            heli = true,
            plane = true,
            submarine = true,
        },
        polyzone = {
            points = {
                vector3(423.6, -1024.16, 28.46),
                vector3(424.45, -1031.29, 28.46),
                vector3(449.22, -1028.17, 28.46),
                vector3(448.69, -1021.85, 28.46)
            },
            thickness = 5,
            debug = false
        },
        groups = {
            police = 0
        },
        blip = {
            coords = vector3(437.07, -1025.92, 28.81),
            sprite = 672,
            color = 7,
            display = 2,
            scale = 0.7,
        },
        platePattern = 'POLAAA11', -- https://overextended.dev/ox_lib/Modules/String/Shared#stringrandom
        vehicles = {
            {model = 'police3', grade = 0},
            {model = 'police2', grade = 1},
            {model = 'police3', grade = 2},
            {model = 'pounder', grade = 3},
        }
    }
  • label: Display name for the garage

  • blacklist: Prevents specific vehicle types from being stored (boat, heli, plane, submarine)

  • polyzone: Defines the interaction area with corner points, thickness (vertical height), and debug mode

  • groups: Specifies which jobs can access the garage and minimum grade required

  • blip: Map marker configuration (coordinates, sprite, color, display type, scale)

  • platePattern: License plate format using A for letters and 1 for numbers (e.g., 'POLAAA11')

  • vehicles: Array of available vehicles with model name and required grade level

PreviousInstallationNextCustoms

Last updated 6 days ago

🔥
🚗
⚙️
Garages Types
Page cover image