Features
Detailed breakdown of nc-carcontrol features.
Ignition System
Key Cylinder (Standard Vehicles)
A 3D-rendered key cylinder with four states:
| State | Description | Action |
|---|---|---|
| LOCK | Key out, everything off | Click to insert key |
| ACC | Key in, accessories on, engine off | Click = stay, Hold = start |
| ON | Engine running | Click to turn back to ACC |
| START | Cranking (auto-returns to ON) | — |
The key rotates with realistic 3D animation (Three.js). After START, the ignition automatically returns to ON state after 0.8 seconds.
Push-Button (Premium Vehicles)
Premium vehicles use a chrome push-button with a simple ON/OFF toggle:
- Click to start engine
- Click again to stop engine
Premium detection:
- Check
Config.PremiumVehicles(model hash lookup) - Check
Config.PremiumVehicleClasses(class-based)
Drive Mode System
Three drive modes controlled via a rotary CSS knob:
ECO Mode
- 60% power multiplier
- 80 km/h speed cap
- Best for city driving
STANDARD Mode
- 100% power (default)
- No speed limit
- Normal driving
SPORTS Mode
- 130% power multiplier
- No speed limit
- Maximum performance
Drive modes are applied using:
SetVehicleCheatPowerIncrease()— power scalingSetEntityMaxSpeed()— speed limiting (ECO mode)SetVehicleHighGear()— gear cap from class/model config
Door Lock
- Vertical rocker switch UI (lock top / unlock bottom)
- Key fob animation on player character
- Vehicle lights flash on lock/unlock
- Works from driver seat or within 10m of nearest vehicle
- Excluded for vehicles without doors (motorcycles, boats, aircraft, etc.)
Seatbelt
Two system options:
mst_seatbelt Integration
- Uses
exports['mst_seatbelt']:SetSeatbelt(bool)to toggle - Uses
exports['mst_seatbelt']:HasSeatbelt()to check state - Falls back gracefully if export fails
Built-in System
- Ejection at configurable speed threshold
- Configurable ejection force
- Crash damage multiplier for unbuckled occupants
Cruise Control
Operation Modes
Cruise Mode (default)
- Vehicle automatically accelerates to target speed
- Uses
SetControlNormalfor natural engine acceleration SetEntityMaxSpeedas speed ceiling- Throttle varies by speed ratio:
| Speed Ratio | Throttle |
|---|---|
| < 50% | 1.0 (full) |
| < 85% | 0.7 |
| < 95% | 0.45 |
| ≥ 95% | 0.3 (maintain) |
Limiter Mode (LIM)
- Only caps maximum speed (
SetEntityMaxSpeed) - No automatic acceleration
- Player must hold throttle manually
Speed Controls
| Control | Action |
|---|---|
| Scroll Up | +5 speed |
| Scroll Down | -5 speed |
| SET+ button | +5 speed |
| SET- button | -5 speed |
| RES button | Resume cruise at last speed |
| CNCL button | Cancel cruise |
| LIM button | Toggle limiter mode |
| Unit label click | Toggle MPH ↔ KMH |
Speed Limits
| Unit | Minimum | Maximum |
|---|---|---|
| MPH | 15 | 150 |
| KMH | 25 | 240 |
Target speed is also capped by the vehicle's actual max speed (GetVehicleEstimatedMaxSpeed).
Auto-Disable Conditions
Cruise control automatically cancels when:
- Brake pedal is pressed
- Engine turns off
- Player exits vehicle
- Vehicle no longer exists
Vehicle State Persistence
States are cached per-vehicle during the session:
- Engine on/off
- Door lock status
- Drive mode
When re-entering a vehicle, the last known state is restored:
- If engine was running → ignition state set to ON
- Drive mode and lock state applied immediately
NUI Panel
- Open: Hold
~key (configurable) - Close: Release
~key - Layout: 500×500px circular arrangement
- Driver seat only: Auto-closes if not in driver seat
- Camera lock: Disables camera movement while open
- Attack disabled: Prevents accidental shooting while using panel