RDE_ELEVATORS DOCS
RED DRAGON ELITE // PROPERTY & WORLD

Drive In.
Everyone Arrives Together.

rde_elevators is a real-time StateBag-synced elevator and garage system for ox_core. Drive your car in and the whole vehicle teleports with every passenger correctly seated — including a manual fix for a genuine GTA V engine limitation around IPL interiors and passengers.

01 / Start Here

Overview

Live in-game CRUD admin, StateBag-synced floor state, floor occupancy tracking, VIP/job/grade floor restrictions, and maintenance mode — all event-driven with no polling.

Core Principle Every seat in a vehicle is tracked server-side during elevator transport — passengers aren't left behind, and each client independently confirms interior readiness before fading back in.

Why this over other elevator scripts

Other Elevator Scriptsrde_elevators
Static teleport, no syncReal-time StateBag sync across all clients
Driver only — passengers left behindFull multiplayer vehicle sync, all seats
Breaks in IPL interiors (passengers see nothing)Portal-culling manually activated for all seats
Admin creates elevators in a config fileLive in-game CRUD — no server restart
02 / Start Here

Quick Start

server.cfg
ensure oxmysql
ensure ox_lib
ensure ox_core
ensure ox_target
ensure rde_elevators

Tables auto-create on first run. Create your first elevator with /elevator create, then add floors by standing at the physical location and selecting "Add Floor" in the admin UI.

03 / Reference

Vehicle Mode

When vehicle_mode = true is set on an elevator, players can drive in and the entire vehicle teleports to the target floor.

  1. Player drives onto the elevator target zone
  2. CanVehicleUseElevator() validates class + length
  3. Fade out / cinematic camera (if enabled)
  4. Driver's client notifies the server, which resolves all passengers by seat
  5. Driver's client teleports the vehicle entity
  6. Passenger clients re-seat themselves after confirming vehicle position
  7. All clients call LoadInterior() + IsInteriorReady() for IPL interiors
  8. Fade in — everyone's on the new floor
config.lua — Vehicle restrictions
Config.Vehicle = {
    CinematicMode     = true,
    MaxVehicleLength  = 12.0,   -- metres, blocks trucks/trailers
    AllowedClasses    = { [14] = false, [16] = false }, -- boats, planes
}
04 / Reference

IPL Passenger Interior Fix (v1.5.1)

GTA V Engine Limitation Portal-culling only activates the interior renderer when a ped physically crosses a portal boundary. Passengers placed into vehicles via SetPedIntoVehicle — or already seated when the driver enters an IPL interior — never cross a portal. Result: interior invisible in 3rd-person for passengers, though collisions were present.

The fix uses lib.onCache('vehicle') to start a lightweight passenger watcher that calls LoadInterior() + IsInteriorReady() + RefreshInterior() whenever the vehicle enters a portal-based interior. The thread is event-driven (zero cost outside a vehicle), uses a token pattern to prevent stale threads, and switches from a 750ms to 5000ms sleep after activation.

05 / Reference

Admin System

CommandDescription
/elevator createOpen creation wizard
/elevator edit [id]Edit existing elevator
/elevator maintenance [id]Toggle maintenance mode
/elevator reloadForce-sync all clients

Access is triple-layer verified: ACE permission → ox_core group → Steam ID fallback.

06 / Reference

Exports

ExportNotes
TeleportToFloor(elevator, floor, coords)Programmatic teleport
GetCurrentFloor()Returns floorName, elevatorId
IsOnCooldown()Returns onCD, remainingMs
RebuildTargets()Force-rebuild all ox_target zones
07 / More

Common Pitfalls

Passengers don't see the IPL interior

Fixed in v1.5.0 — if still occurring, confirm the IPL is loaded via bob74_ipl on all clients, not just the requester.

Fix: check client console for [IPL] Passenger interior context activated. If missing, the watcher didn't start — verify GetInteriorAtCoords() returns non-zero for that IPL.

Vehicle teleports but passengers end up outside

Passenger sync waits up to 3s for the vehicle to arrive — high-latency connections can time out.

Fix: increase the deadline in passengerSync in client/vehicle.lua.

08 / More

FAQ

Can floors be job-locked?

Yes — VIP flags, job restrictions, and grade requirements are all configurable per floor in the admin UI.

Does maintenance mode block admins too?

No — admins can still use an elevator in maintenance mode; regular players are blocked.

09 / More

Changelog

v1.5.1

IPL passenger interior fix — portal-culling manually activated via LoadInterior/IsInteriorReady/RefreshInterior watcher.

v1.5.0

Vehicle mode multiplayer sync, cinematic mode, floor access control.