Config

βš™οΈ Configuration

The alpha-NailBox script offers extensive customization options through the Shared/Config.lua file. This page provides detailed explanations for each configuration option to help you tailor the script to your server's needs.

πŸ”§ General Settings

Debug Mode

Debug = false
  • Type: boolean

  • Default: false

  • Description: Enable debug mode to see detailed console messages and access debug commands

  • Production Note: Always set to false for production servers to hide debug information

Language Configuration

Locale = "En"
  • Type: string

  • Options: "En" | "Tr"

  • Default: "En"

  • Description: Language setting for all script messages and notifications

  • Supported Languages:

    • "En" - English

    • "Tr" - Turkish

  • Expandable: Add more languages by creating new files in the Locales/ folder

Interaction System

  • Type: string

  • Options: "Target" | "Default"

  • Default: "Target"

  • Description: How players interact with objects and NPCs

    • "Target" - Use target systems (ox_target/qb-target) for interactions (recommended)

    • "Default" - Use key press interactions with on-screen text

πŸ› οΈ Required Items

Configure the required items for nail box operations:

Item
Config Key
Default Value
Purpose

Screwdriver Set

ScrewdriverSet

"screwdriverset"

Needed to drill holes in nail boxes

Electronic Kit

ElectronicKit

"electronickit"

Needed to install electronic activation system

⚠️ Important: Ensure these items exist in your server's item database

🚫 Vehicle Restrictions

Model Blacklist

  • Type: table

  • Description: Specific vehicle model names to restrict (case sensitive)

  • Default: Emergency vehicles are blacklisted

  • Reference: Find vehicle names at FiveM Vehicle Models

  • Empty Table: Use {} to allow all models

Class Blacklist

Vehicle classes restricted by default:

Class ID
Category
Reason

8

Motorcycles

Too small for nail boxes

10

Industrial

Work vehicles

11

Utility

Service vehicles

13

Cycles

Bicycles

14

Boats

Water vehicles

15

Helicopters

Air vehicles

16

Planes

Air vehicles

17

Service

Service vehicles

18

Emergency

Emergency vehicles

19

Military

Military vehicles

20

Commercial

Commercial vehicles

21

Trains

Rail vehicles

22

Open Wheel

Racing cars

Allowed Classes Reference:

  • 0: Compacts

  • 1: Sedans

  • 2: SUVs

  • 3: Coupes

  • 4: Muscle

  • 5: Sports Classics

  • 6: Sports

  • 7: Super

  • 9: Off-road

  • 12: Vans

πŸ“¦ Nail Box System

Economic Settings

  • Price: Cost to purchase a nail box (in your server's currency)

  • Currency: Symbol displayed in messages and Discord logs

Auto-Hide Feature

  • Type: boolean

  • Default: true

  • Description: Automatically hide nail box object when vehicle trunk is closed

  • Alternative: Set to false to keep nail boxes always visible

Purchase System

Setting
Type
Default
Description

Distance

number

3.0

Maximum distance from NPC to purchase (game units)

PoliceAlertChance

number

50

Chance police get alerted (0-100%)

AlertJobs

table

{"police", "sheriff"}

List of job names to alert when nail box is purchased

BlipSettings.Sprite

number

415

Blip icon ID for police alert on map

BlipSettings.Scale

number

0.5

Size of the blip on map (0.0-2.0)

BlipSettings.Colour

number

1

Color ID of the blip

BlipSettings.Flashes

boolean

false

Whether the blip flashes on map

BlipSettings.Time

number

5

How long blip stays on map (seconds)

BlipSettings.Radius

number

0

Radius blip size (0 for normal blip)

Ped.Coords

vector3

Salvage yard area

World coordinates where NPC spawns

Ped.Heading

number

106.8

Direction NPC faces (0-360 degrees)

Ped.Model

hash

Gaffer worker

NPC model for vendor

Removal System

Access Control:

  • "Everyone" - Any player can remove nail boxes

  • "Job" - Only specific jobs with minimum grades can remove

Job Requirements Format:

Item Requirements:

  • Item - Item name from your database

  • Quantity - How many items needed

  • Remove - Whether to consume the item after use

πŸ”© Nails Effects

Setting
Type
Default
Description

Radius

number

2.5

Distance from nails center that affects vehicles (game units)

ExplodeBulletproofTiresChance

number

50

Percentage chance of bulletproof tires exploding (0-100%)

ExplodeTiresChance

number

50

Percentage chance of regular tires exploding (0-100%)

ExplodeTiresAfterSeconds

number

3

Delay before tire explosion after contact (seconds)

TireExplosionDelay

number

1

Delay between each tire explosion (seconds)

Special Vehicles

Configure special explosion chances for armored vehicles:

Setting
Description

Enabled

Enable/disable special vehicle handling

Models

Array of vehicle model hashes for special treatment

ExplodeChance

Custom explosion chance for these vehicles (0-100%)

⏱️ Timing Configuration

Nail Box Operations

Setting
Default
Description

Buy

10 seconds

Time to complete nail box purchase

Drill

30 seconds

Time to drill hole in nail box

Kit

30 seconds

Time to install electronic kit

Pour

10 seconds

How long nail dropping lasts after activation

Hold

3 seconds

How long to hold activation key before nails start dropping

Remove

30 seconds

Time to remove nail box from vehicle

Nail's Timings

Setting
Default
Description

Rate

250ms

How often new nails are created while dropping

Control

500ms

How often to check if vehicles are on nails

Clear

100 seconds

How long nails stay on road before cleanup

πŸ“± Discord Logging

Basic Configuration

Setting
Description

Enable

Set to true to enable Discord logging

WebhookURL

Your Discord webhook URL from server settings

AvatarURL

Avatar image URL for Discord bot messages

DateFormat

Date/time format for timestamps (Lua format guide)

Event Colors

Use Hex to Decimal Converter for custom colors.

Custom Vehicle Images

Add custom vehicle images for enhanced Discord logs by mapping vehicle names to image URLs.

πŸš— Custom Vehicle Positioning

Some vehicles may need special nail box positioning to look natural. Add entries for specific vehicle models with X, Y, Z offset adjustments.

πŸ“„ Full Config File

πŸ’₯ Tire Damage System Features

Realistic Explosion Mechanics

  • Sequential Tire Bursts: Multiple tires explode with realistic delays for maximum impact

  • Bulletproof Tire Support: Separate explosion chances for armored vehicle tires

  • Special Vehicle Handling: Custom settings for riot vans and other armored vehicles

  • Configurable Timing: Adjustable delays between tire contact and explosion

Damage Calculation

  1. Vehicle drives over nails

  2. System checks tire type (regular vs bulletproof)

  3. Applies appropriate explosion chance

  4. Triggers delayed explosion sequence

  5. Each tire explodes with configured delay between them

🎯 Quick Setup Guide

  1. Set your server's economy: Adjust Price and Currency

  2. Configure NPC location: Set Buy.Ped.Coords to your preferred location (default: salvage yard)

  3. Customize tire damage: Modify explosion chances and timing in Nails section

  4. Setup special vehicles: Configure armored vehicle handling

  5. Customize timings: Modify Times values for your server's pace

  6. Setup Discord logging: Enable and configure webhook URL

  7. Adjust restrictions: Modify Blacklist for your server's vehicles

  8. Test and fine-tune: Use debug mode for testing, then disable for production

⚠️ Important Notes

  • Always backup your config before making changes

  • Restart the resource after configuration changes

  • Test thoroughly with debug mode before production

  • Ensure required items exist in your item database

  • Some anti-cheat systems may interfere with client-side object creation

  • Tire explosion effects are permanent until vehicle repair

  • Special vehicles may require custom explosion chance tuning

Last updated