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.
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.
Why this over other elevator scripts
| Other Elevator Scripts | rde_elevators |
|---|---|
| Static teleport, no sync | Real-time StateBag sync across all clients |
| Driver only — passengers left behind | Full 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 file | Live in-game CRUD — no server restart |
Quick Start
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.
Vehicle Mode
When vehicle_mode = true is set on an elevator, players can drive in and the entire vehicle teleports to the target floor.
- Player drives onto the elevator target zone
CanVehicleUseElevator()validates class + length- Fade out / cinematic camera (if enabled)
- Driver's client notifies the server, which resolves all passengers by seat
- Driver's client teleports the vehicle entity
- Passenger clients re-seat themselves after confirming vehicle position
- All clients call
LoadInterior()+IsInteriorReady()for IPL interiors - Fade in — everyone's on the new floor
Config.Vehicle = {
CinematicMode = true,
MaxVehicleLength = 12.0, -- metres, blocks trucks/trailers
AllowedClasses = { [14] = false, [16] = false }, -- boats, planes
}
IPL Passenger Interior Fix (v1.5.1)
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.
Admin System
| Command | Description |
|---|---|
| /elevator create | Open creation wizard |
| /elevator edit [id] | Edit existing elevator |
| /elevator maintenance [id] | Toggle maintenance mode |
| /elevator reload | Force-sync all clients |
Access is triple-layer verified: ACE permission → ox_core group → Steam ID fallback.
Exports
| Export | Notes |
|---|---|
| TeleportToFloor(elevator, floor, coords) | Programmatic teleport |
| GetCurrentFloor() | Returns floorName, elevatorId |
| IsOnCooldown() | Returns onCD, remainingMs |
| RebuildTargets() | Force-rebuild all ox_target zones |
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.
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.
Changelog
IPL passenger interior fix — portal-culling manually activated via LoadInterior/IsInteriorReady/RefreshInterior watcher.
Vehicle mode multiplayer sync, cinematic mode, floor access control.