Skip to main content
px_spawn is configured through a single client config file that controls the full interaction flow, menu behavior, marker appearance, and vehicle spawn handling. All settings are located in: config/client.lua Once the resource is running, this file is where you customize how the spawner looks and behaves in-game.

Overview

The config is split into a few main sections:
  • General debug behavior
  • Text UI prompt settings
  • Interaction distance and keybind settings
  • Marker appearance
  • Vehicle spawn behavior
  • Menu settings
  • Notification text
  • Spawn locations
  • Vehicle list
This keeps the resource simple to adjust without needing to edit the main logic.

General

SettingDefaultDescription
DebugfalseEnables debug logging in the console for spawn activity and troubleshooting.
When enabled, the script prints formatted messages for things like successful vehicle spawns.

Text UI

These settings control the ox_lib text prompt shown when a player is close enough to interact with a spawner location.
SettingDefaultDescription
TextUI.iconcarIcon shown inside the interaction prompt.
TextUI.positionleft-centerScreen position of the prompt.
TextUI.prompt[E] Open Vehicle SpawnerText displayed when the player can open the menu.
The prompt only appears when the player is within the configured interaction range.

Interaction

These values control how close a player needs to be to interact and when the marker system becomes active.
SettingDefaultDescription
Interaction.key38Input key used to open the spawner menu.
Interaction.maxDistance2.0Distance required to interact and open the menu.
Interaction.markerDistance12.0Distance at which the location point becomes active and begins drawing logic.
This lets you control both the visible marker range and the actual usable interaction range separately.

Marker Settings

The marker section controls the world marker drawn at each configured spawner location.
SettingDefaultDescription
Marker.enabledtrueEnables or disables the world marker entirely.
Marker.type2GTA marker type used at the location.
Marker.scalevec3(0.45, 0.45, 0.45)Size of the marker in the world.
Marker.color.r255Red value for the marker color.
Marker.color.g255Green value for the marker color.
Marker.color.b255Blue value for the marker color.
Marker.color.a160Alpha value for marker transparency.
Marker.bobUpAndDownfalseControls whether the marker bobs up and down.
Marker.faceCameratrueMakes the marker face the player camera.
Marker.rotatefalseControls whether the marker rotates.
If you do not want any world marker at all, set Marker.enabled to false.

Spawn Behavior

This section controls what happens after a vehicle is created.
SettingDefaultDescription
VehicleSpawn.clearSpawnAreatruePrevents spawning if another vehicle is blocking the spawn point.
VehicleSpawn.warpIntoVehicletrueAutomatically places the player into the driver seat after spawn.
VehicleSpawn.startEnginetrueStarts the engine immediately after the vehicle is created.
VehicleSpawn.radioOfftrueDisables the vehicle radio and sets the station to off.
VehicleSpawn.setAsMissionEntitytrueMarks the spawned vehicle as a mission entity.
VehicleSpawn.keysfalseReserved for custom keys integration if your server uses one.
VehicleSpawn.deletePreviousSpawnfalseDeletes the last vehicle spawned by this resource before creating a new one.
These options allow the spawner to behave more like a utility tool, a public garage, or a staff-only spawn system depending on your setup.
The menu section controls the ox_lib context menu itself.
SettingDefaultDescription
Menu.idvehicle_spawnerInternal context menu identifier used by ox_lib.
Menu.titleVehicle SpawnerTitle shown at the top of the menu.
Menu.optionDescriptionSpawn this vehicle at the selected location.Description shown for each vehicle option.
Each configured vehicle is automatically converted into a menu option using these settings.

Notification Text

These values define the messages shown when something succeeds or fails.
SettingDefaultDescription
Notifications.invalidModelThe selected vehicle model is invalid.Shown when a configured model cannot be requested or is not a valid vehicle.
Notifications.blockedSpawnThe spawn point is currently blocked.Shown when another vehicle is occupying the spawn area.
Notifications.spawnFailedThe vehicle could not be created.Shown when CreateVehicle fails.
Notifications.alreadyOpenThe vehicle spawner is already open.Reserved message for menu state handling.
You can rewrite these messages to better match your server style.

Locations

The Locations section defines where players can open the spawner and where vehicles actually appear. Each entry contains:
  • A label used as the menu title for that location
  • Marker coordinates where the player interacts
  • Spawn coordinates where the vehicle is created
Example structure: A location uses one point for interaction and one separate position for the spawned vehicle. This means the menu can be opened in one spot while the vehicle appears in a cleaner nearby spawn area. You can add as many locations as needed.

Vehicles

The Vehicles section controls what options appear inside the spawner menu. Each vehicle entry contains:
  • A label shown in the menu
  • A model name or hash used for spawning
Every configured vehicle becomes a selectable context option automatically. This makes it easy to build different spawner lists without changing the actual script logic.

How It Works

When a player enters the configured point range, the marker can be drawn and the interaction prompt becomes available. If the player presses the configured key inside the usable distance, px_spawn opens an ox_lib context menu using the vehicles defined in config. When a vehicle is selected, the script:
  • Validates the model
  • Checks whether the spawn point is blocked
  • Deletes the previous spawned vehicle if that option is enabled
  • Creates the new vehicle
  • Applies post-spawn settings like engine state, radio state, and mission entity handling
  • Optionally warps the player into the driver seat
If something fails during that process, the spawn is cancelled cleanly and a notification is shown instead.

Notes

px_spawn is fully client-driven and built around ox_lib interaction, text UI, notifications, context menus, and point handling. The resource is intentionally lightweight and keeps all vehicle selection logic inside the config so it can be expanded easily for different locations or server use cases. It can be used for public vehicle spawners, staff tools, job vehicle menus, test drive systems, or any other simple spawn utility.