Guides

Advanced Starterpack Guides

Command Config


1. Configuring the Starter Pack Command

Config.CommandConfig = {                  
    enable           = true,               -- Enable or disable the command
    command          = 'starterpack',      -- The command players will use to receive the starter pack
    command_help     = 'Get your starter pack',  -- Help text displayed when players use /help or similar
    starterpack_type = 'normal',           -- The type of starter pack ('normal', 'vip', etc.)
}

Key Fields:

  • enable: Set this to true to activate the command. If false, the command will be disabled.

  • command: This is the name of the command players will use (e.g., /starterpack).

  • command_help: This sets the help description that shows up for the command, providing players with a quick explanation of its use.

  • starterpack_type: Defines the type of starter pack to be given. You can modify this to set different starter pack types (e.g., normal, vip, etc.).


2. Configuring a Starter Vehicle

The command configuration also supports giving players a starter vehicle when they use the command. You can customize whether to include a vehicle, the model of the vehicle, and where it spawns.

starter_vehicle  = {
    enable = true,              -- Enable or disable the starter vehicle
    model = 'adder',            -- The vehicle model to give the player (e.g., 'adder')
    random_vehicle = true,     -- Spawn a random vehicle from the list (true/false)
    parking = "pillboxgarage", -- Parking location name for storing the vehicle in the database (set to nil if your garage system doesn't support parking)
}

Key Fields:

  • enable: Set to true to include a starter vehicle. If set to false, no vehicle will be provided.

  • model: The vehicle model that will be spawned for the player. You can change this to any valid vehicle model name.

  • random_vehicle: Spawn a random vehicle from the list (true/false)

  • parking: Defines the spawn location of the vehicle. This should correspond to a predefined parking or spawn location (e.g., pillboxgarage). (set to nil if your garage system doesn't support parking)

  • Players can type /starterpack in the game chat to receive their starter package.

  • If a starter vehicle is enabled, the defined vehicle will spawn at the configured location.

Configuring Starter Pack Locations


1. Location Configuration Structure

Each location is represented by a key (e.g., ["1"]) in the Config.Locations table. Inside each location, you can configure the starter pack type, ped (NPC) settings, safe zone options, and vehicle details.

Config.Locations = {
    ["1"] = {                                                                       -- Unique identifier for the location
        starterpack_type = 'normal',                                                -- Type of starter pack given to the player (set to false if you don't want to give a starter pack item)
        label            = 'Get your starter pack',                                 -- Target label (shown to the player)
        icon             = 'fa-solid fa-gift',                                      -- Target icon (from FontAwesome)

        coords           = vec4(-1040.479126, -2731.582520, 20.164062, 238.110229), -- Coordinates and heading of the NPC (ped)

        ped              = {                                                        -- Settings for the ped (NPC)
            show_only_for_newbie = false,                                           -- Show the ped only for the player who hasn't received the starter pack
            model = 'a_m_y_business_03',                                            -- Ped model (see the FiveM ped model list)
            scenario = 'WORLD_HUMAN_CLIPBOARD',                                     -- Ped scenario (animation/behavior)
            heading = 238.110229,                                                   -- Direction the ped is facing
        },

        safezone         = { -- Safe zone settings (optional)
            enable = false,  -- Enable or disable the safe zone
            zone_points = {} -- Define safe zone points (if enabled) using vector3
        },

        starter_vehicle  = {           -- Vehicle settings for players receiving a starter vehicle
            enable = true,             -- Enable or disable the starter vehicle
            model = 'adder',           -- Vehicle model (from FiveM vehicle model list) will be ignored if random_vehicle is set to true
            random_vehicle = true,     -- Spawn a random vehicle from the list (true/false)
            teleport_player = false,   -- Teleport player to the vehicle (true/false)
            parking = "pillboxgarage", -- Parking location name for storing the vehicle in the database (set to nil if your garage system doesn't support parking)
            vehicle_spawns = {         -- Spawn points for the vehicle (multiple spawn locations)
                vec4(-1039.02, -2727.53, 19.65, 243.17),
                vec4(-1043.3, -2725.09, 19.65, 241.12),
                vec4(-1047.57, -2722.66, 19.65, 240.54),
                vec4(-1034.38, -2719.0, 19.65, 240.52),
                vec4(-1038.51, -2716.53, 19.64, 240.34),
            },
            fuel = 100.0, -- Fuel level of the vehicle when spawned
        },

        receiving_radius = 20.0, -- Radius around the location where players can receive the starter pack
        distance         = 2.0,  -- Distance from the ped to interact with it
    },
    -- add more locations here
}

2. Location Details

Each location can have its own distinct setup, including ped and vehicle options. Here's a breakdown of the key fields for configuring a location:

Starter Pack Settings

  • starterpack_type: The type of starter pack given to the player. This could vary (e.g., normal, vip, etc.).

  • show_only_for_newbie: Show the ped only for the player who hasn't received the starter pack

  • label: The label shown to the player when they interact with the NPC (e.g., “Get your starter pack”).

  • icon: The icon that appears in the interaction menu (you can use FontAwesome icons, like 'fa-solid fa-gift').

Coordinates

  • coords: Defines the exact location of the ped. This uses vec4 format (x, y, z, heading) to set the coordinates and the direction the ped is facing.


3. Ped (NPC) Configuration

Each location can optionally have a ped (NPC) that players interact with to receive the starter pack.

ped = {
    model = 'a_m_y_business_03',            -- Model of the ped (NPC) to spawn
    scenario = 'WORLD_HUMAN_CLIPBOARD',     -- Ped scenario (animation the ped will perform)
    heading = 238.110229,                   -- Heading (direction the ped faces)
}

Ped Settings:

  • model: The model of the ped to use. Refer to the FiveM Ped Models Documentation for available models.

  • scenario: The animation or behavior the ped will perform. Example: WORLD_HUMAN_CLIPBOARD makes the ped appear to be writing on a clipboard.

  • heading: The direction the ped will face (in degrees).

4. Safe Zone (Optional)

A safe zone can be configured around the starter pack location. This prevents certain actions (e.g., combat) within the zone.

safezone = {
    enable = false,                     -- Enable or disable the safe zone feature
    zone_points = {}                    -- Define the points that make up the safe zone (as vector3 coordinates)
}
  • enable: Enable or disable the safe zone. If set to true, you must also define the zone points.

  • zone_points: If a safe zone is enabled, list the points that define the boundary (vector3 coordinates).


5. Starter Vehicle Configuration

You can give the player a starter vehicle when they interact with the ped. You can customize the model, spawn points, and other details.

starter_vehicle = {
    enable = true,                       -- Enable or disable the starter vehicle for this location
    model = 'adder',                     -- Vehicle model (from the FiveM vehicle list)
    random_vehicle = true,               -- Spawn a random vehicle from the list (true/false)
    teleport_player = false,             -- Teleport the player to the vehicle after it spawns
    parking = "pillboxgarage",           -- Name of the parking/garage where the vehicle is stored in the database
    vehicle_spawns = {                   -- List of possible spawn locations for the vehicle (vec4 format)
        vec4(-1039.02, -2727.53, 19.65, 243.17),
        vec4(-1043.3, -2725.09, 19.65, 241.12),
        vec4(-1047.57, -2722.66, 19.65, 240.54),
    },
    fuel = 100.0,                        -- Fuel level of the vehicle upon spawn (0.0 to 100.0)
}

Config.RandomVehicles = { -- list of vehicles to be given randomly to the player
    vehicles = {
        "adder",
        "zentorno",
        "t20",
        "osiris",
        "reaper",
        "tempesta",
        "italigtb",
        "italigtb2",
        "nero",
        -- add more vehicles here
    }
}

Vehicle Settings:

  • enable: Set to true to give a starter vehicle to the player.

  • model: The model of the vehicle (e.g., adder, sultan). You can find valid models in the FiveM Vehicle Models Documentation.

  • random_vehicle: Set to true if you want to give randomize vehicle to the player

  • teleport_player: If set to true, the player will be teleported directly into the vehicle after it spawns.

  • parking: The name of the parking location for storing the vehicle in the database.

  • vehicle_spawns: List of coordinates where the vehicle can spawn. You can define multiple spawn points in case one is occupied.

  • fuel: The fuel level of the vehicle when it spawns (0.0 to 100.0).


6. Radius and Interaction Distance

  • receiving_radius: The radius around the location within which players are eligible to receive the starter pack. Players must be within this radius to interact with the ped and receive their starter pack.

  • distance: The maximum distance from the ped at which players can interact with it (e.g., to trigger the command).

Last updated