Skip to content

Latest commit

Β 

History

7 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

rde_elevators

πŸ›— NEXT-GEN ELEVATOR & GARAGE SYSTEM V1.5.1 β€” Built on ox_core & StateBags!

Version License FiveM ox_core Quality

πŸ›— RDE ELEVATORS | Next-Gen Elevator & Garage System for FiveM ox_core | Vehicle Mode | Cinematic | StateBag-Synced | Production-Ready

Built by Red Dragon Elite | Free Forever | No Paywalls | No Legacy

πŸ“– Installation β€’ βš™οΈ Configuration β€’ πŸš— Vehicle Mode β€’ πŸ›‘ Admin System β€’ πŸ“‘ Exports β€’ πŸ› Troubleshooting β€’ 🌐 Website


πŸ”₯ Why This Destroys Every Other Elevator Script

Every other elevator script is either paid, a 200-line ESX relic, or breaks the moment two players touch it.

We said no.

❌ Other Elevator Scripts βœ… rde_elevators
Static teleport, no sync Real-time StateBag sync across all clients
Driver only β€” passengers get left behind Full multiplayer vehicle sync, all seats
Breaks in IPL interiors (passengers see nothing) IPL Passenger Interior Fix β€” portal-culling activated for all seats
ESX / QBCore bloat ox_core only β€” the future, not the past
Admin creates elevators in a config file Live in-game CRUD admin β€” no server restart
0.5ms+ idle usage < 0.01ms idle β€” event-driven, no polling
One floor type fits all VIP floors, job-locked floors, vehicle-only floors
Paid or locked down 100% free forever β€” RDE Black Flag

🎯 Key Features

  • πŸ›— Full Elevator System β€” unlimited elevators, unlimited floors, live CRUD admin
  • πŸš— Vehicle Mode β€” drive your car into the elevator, it teleports with you. All passengers sync
  • 🎬 Cinematic Mode β€” fake camera, particle effects, shake, door animation on vehicle entry
  • πŸ‘₯ Full Multiplayer Sync β€” all vehicle seats tracked, every passenger teleported server-side
  • πŸ”’ Floor Access Control β€” VIP flags, job locks, grade requirements per floor
  • πŸ”§ Maintenance Mode β€” lock any elevator instantly, admins can still use it
  • πŸ—ΊοΈ Blip System β€” per-elevator minimap blips with state colours, per-elevator visibility toggle
  • πŸ“ Floor Occupancy β€” real-time player count per floor shown in the menu
  • 🎯 ox_target Zones β€” box zones per floor, icon adapts to elevator state
  • πŸ“‰ Cooldown System β€” configurable, admin bypass, per-player
  • 🌍 Multilanguage β€” EN / DE out of the box, add any language in minutes
  • πŸ›‘ Server-Side Authority β€” all sensitive actions validated server-side
  • βš™οΈ Zero-Config Start β€” sensible defaults, tables auto-create, no SQL import needed
  • πŸ‰ GTA V Engine Fix β€” IPL interior portal-culling manually activated for passengers (v1.5.1)

πŸ“Έ Screenshots

Drop a PR with your screenshots!


πŸ“¦ Dependencies

oxmysql        β†’ https://github.com/overextended/oxmysql
ox_lib         β†’ https://github.com/overextended/ox_lib
ox_core        β†’ https://github.com/overextended/ox_core
ox_target      β†’ https://github.com/overextended/ox_target

πŸš€ Installation

Step 1: Clone or download

cd resources
git clone https://github.com/RedDragonElite/rde_elevators.git

Step 2: Add to server.cfg

# Dependencies first β€” order matters!
ensure oxmysql
ensure ox_lib
ensure ox_core
ensure ox_target

# The elevator system
ensure rde_elevators

Step 3: Configure

Edit shared/config.lua β€” sensible defaults work out of the box. See Configuration.

Step 4: Start your server

That's it. No SQL import needed β€” tables auto-create on first run.


βš™οΈ Configuration

shared/config.lua is fully self-documented. Key sections:

-- Master debug toggle
Config.Debug = false

-- Admin groups
Config.AdminSystem = {
    AdminGroups   = { 'admin', 'superadmin', 'mod', 'god', 'management', 'owner' },
    AcePermission = 'rde_elevators.admin',
    steamIds      = {
        'steam:110000101605859',  -- add your steam ID here
    },
}

-- Language: 'en' or 'de'
Config.DefaultLanguage = 'en'

-- UI mode: true = NUI | false = ox_lib context menus
Config.UseNUI = false

-- Cooldown between elevator uses
Config.Cooldown = {
    Enabled      = true,
    Duration     = 5000,   -- ms
    AdminBypass  = true,
}

πŸš— Vehicle Mode

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

How it works

  1. Player drives vehicle onto the elevator target zone
  2. CanVehicleUseElevator() validates class + length
  3. Fade out / cinematic camera (if CinematicMode = true)
  4. Driver's client notifies server via rde_elevators:vehicleTeleport
  5. Server resolves all passengers by seat, notifies each client individually
  6. Driver's client teleports the vehicle entity
  7. Passenger clients re-seat themselves after confirming vehicle position
  8. All clients call LoadInterior() + IsInteriorReady() for IPL interiors
  9. Fade in β€” everyone's on the new floor

Vehicle restrictions

Config.Vehicle = {
    Enabled           = true,
    CinematicMode     = true,
    MaxVehicleLength  = 12.0,   -- metres (blocks trucks, trailers)

    AllowedClasses = {
        [0]  = true,   -- Compacts
        [1]  = true,   -- Sedans
        -- ... configure per class
        [14] = false,  -- Boats
        [16] = false,  -- Planes
    },
}

IPL Passenger Interior Fix (v1.5.1)

tl;dr: passengers now see IPL interiors in 3rd-person. This was a GTA V engine limitation.

GTA V's portal-culling system 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 a bob74_ipl / RequestIpl() interior β€” never cross a portal. Result: interior invisible in 3rd-person, first-person worked, collisions were present.

The fix (client/vehicle.lua, _StartIplWatcher) 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 when not in a vehicle), uses a token pattern to prevent stale threads, and switches from 750ms β†’ 5000ms sleep after activation. Uses Z+1.0 cascade for reliable portal detection and calls RefreshInterior() to re-activate bob74_ipl interior entity sets.


πŸ›‘ Admin System

Access

Access is triple-layer verified: ACE permission β†’ ox_core group β†’ Steam ID fallback.

# server.cfg β€” grant ACE access
add_principal identifier.steam:YOUR_STEAM_HEX group.admin
add_ace group.admin rde_elevators.admin allow

In-Game Commands

Command Description
/elevator create Open creation wizard (name, label, mode)
/elevator edit [id] Edit existing elevator
/elevator delete [id] Delete elevator + all its floors
/elevator tp [id] [floor] Teleport yourself to a floor
/elevator maintenance [id] Toggle maintenance mode
/elevator list List all elevators with IDs
/elevator reload Force-sync all clients

Floor Creation

Floors are created in the admin UI:

  1. Stand at the physical floor location
  2. Select "Add Floor" β†’ enter floor name
  3. Optionally set VIP flag, job restriction, grade
  4. Save β€” zone and blip appear instantly server-wide (StateBag sync, no restart)

πŸ—‚ Folder Structure

rde_elevators/
β”œβ”€β”€ fxmanifest.lua
β”œβ”€β”€ README.md
β”œβ”€β”€ CHANGELOG.md
β”œβ”€β”€ LICENSE
β”œβ”€β”€ shared/
β”‚   β”œβ”€β”€ config.lua          ← All config + StateBag keys
β”‚   β”œβ”€β”€ utils.lua           ← DbBool/BoolDb, RDE_Debug/Info/Error helpers
β”‚   └── permissions.lua     ← Triple-layer admin check, floor access
β”œβ”€β”€ server/
β”‚   β”œβ”€β”€ main.lua            ← Core logic, DB, callbacks, vehicle sync
β”‚   β”œβ”€β”€ statebags.lua       ← UpdateStatebag(), floor occupancy sync
β”‚   β”œβ”€β”€ analytics.lua       ← Usage tracking
β”‚   └── commands.lua        ← Admin commands
β”œβ”€β”€ client/
β”‚   β”œβ”€β”€ main.lua            ← StateBag handlers, zone/blip build, menus
β”‚   β”œβ”€β”€ vehicle.lua         ← Vehicle teleport, passenger sync, IPL fix
β”‚   β”œβ”€β”€ ui.lua              ← ox_lib context menu rendering
β”‚   β”œβ”€β”€ admin.lua           ← Admin UI (create/edit/delete)
β”‚   β”œβ”€β”€ effects.lua         ← Particle effects
β”‚   β”œβ”€β”€ sounds.lua          ← Audio (ding, door, parking)
β”‚   └── nui.lua             ← NUI bridge (when Config.UseNUI = true)
β”œβ”€β”€ locales/
β”‚   β”œβ”€β”€ en.json             ← English (default)
β”‚   └── de.json             ← Deutsch
└── html/
    └── index.html          ← NUI interface

πŸ“‘ Exports

Client

-- Teleport to a floor programmatically
exports['rde_elevators']:TeleportToFloor(elevator, 'Floor 2', { x=0, y=0, z=10, w=0 })

-- Get current floor state
local floorName, elevatorId = exports['rde_elevators']:GetCurrentFloor()

-- Check cooldown state
local onCD, remainingMs = exports['rde_elevators']:IsOnCooldown()

-- Get all loaded elevators
local elevators = exports['rde_elevators']:GetElevators()

-- Force-rebuild all blips
exports['rde_elevators']:RebuildBlips()

-- Force-rebuild all ox_target zones
exports['rde_elevators']:RebuildTargets()

πŸ”§ Debug Mode

Enable with Config.Debug = true in shared/config.lua, then watch server/client console:

Log Tag What it tells you
[Init] Elevator load, callback result, retry logic
[Sync] StateBag delta updates (per-elevator)
[Targets] Zone count after rebuild
[Teleport] Ped teleport coordinates
[Vehicle] Vehicle teleport, occupant report, seat assignments
[Floor] Floor registration, server confirmation
[IPL] Passenger interior context activation (v1.5.1)

πŸ›‘ Security

  • All sensitive actions validated server-side (teleport coords, floor access, maintenance toggle)
  • StateBags for real-time sync β€” no client polling
  • ox_core group checks on all privileged callbacks
  • ACE permission support + Steam ID whitelist fallback
  • Floor restriction enforcement: server validates job/grade via ox_core player state
  • Vehicle class + length validated before teleport β€” no remote exploit via spoofed class

πŸ› Troubleshooting

Elevators don't load on join

  1. Enable Config.Debug = true
  2. Check server console for [Init] output β€” did getAll return 0?
  3. Ensure oxmysql is running and the rde_elevators table exists
  4. If fresh install: restart the resource once after first run (tables auto-create on start)

Passengers don't see the interior (IPL)

Fixed in v1.5.0 (#11). Update to the latest release. If you're still seeing this:

  1. Confirm the IPL is loaded via bob74_ipl on all clients (not just the requester)
  2. Check client console for [IPL] Passenger interior context activated β€” if missing, watcher didn't start
  3. Ensure GetInteriorAtCoords() returns non-zero for your IPL β€” some IPLs are pure geometry (no portal system), in which case this fix doesn't apply and the interior should be visible anyway

Vehicle teleports but passengers end up outside

The passenger sync waits up to 3s for the vehicle to arrive at the target position. On high-latency connections this can time out. Increase the deadline in passengerSync in client/vehicle.lua if needed.

Elevator zones don't appear

  1. Check [Targets] debug output β€” how many zones registered?
  2. Verify ox_target is running and loaded before rde_elevators
  3. pcall wraps every zone add β€” check if ox_target is throwing errors

attempt to index a nil value on startup

Check the order in server.cfg. oxmysql must load before rde_elevators. ox_lib and ox_core must also be before.

Maintenance mode doesn't sync

Maintenance state uses a per-elevator StateBag key. Restart the resource to force a full resync if GlobalState isn't propagating.

Blips not showing

Check Config.Blips.Enabled = true and that the elevator's blip.enabled field is not explicitly false. Run /elevator edit [id] and verify blip settings.


πŸ“š Tech Stack

ox_core        β†’ Player & group management, charId, getGroups()
ox_lib         β†’ UI, callbacks, notifications, onCache()
ox_target      β†’ Box zones per floor, state-adaptive icons
oxmysql        β†’ Async database (auto-create tables, prepared statements)
StateBags      β†’ Realtime server β†’ all-clients sync (per-elevator delta)
GTA V Engine   β†’ LoadInterior / IsInteriorReady / RefreshInterior (IPL fix)

🀝 Contributing

PRs are always welcome.

  1. Fork the repository
  2. Create a branch: git checkout -b fix/your-fix
  3. Test on a live server before submitting
  4. Commit: git commit -m 'fix: description'
  5. Push and open a Pull Request

Guidelines:

  • βœ… Keep the RDE header in all files
  • βœ… No Wait() inside NetEvent handlers β€” wrap in CreateThread
  • βœ… No PlayerPedId() β€” use cache.ped
  • βœ… DB booleans through DbBool() / BoolDb() β€” never raw == 1
  • βœ… Test on a live server before PR
  • ❌ No telemetry, no paywalls, no ESX/QBCore
  • ❌ No Wait(0) loops unless absolutely necessary and documented

πŸ“œ License

RDE Black Flag Source License v6.66

###################################################################################
#      .:: RED DRAGON ELITE (RDE)  -  BLACK FLAG SOURCE LICENSE v6.66 ::.         #
#   PROJECT:    RDE_ELEVATORS (NEXT-GEN ELEVATOR & GARAGE SYSTEM FOR FIVEM)       #
#   ARCHITECT:  .:: RDE ⧌ Shin [β–³ α›‹α›…αš±α›’α›…αšΎα›α›‹ ᛒᛁᛏᛅ β–½] ::. | https://rd-elite.com     #
#   WARNING: THIS CODE IS PROTECTED BY DIGITAL VOODOO AND PURE HATRED FOR LEAKERS #
#   1. FREE USE β€” Cost: 0.00€. If you paid for this, you got scammed by a rat.    #
#   2. TEBEX KILL SWITCH β€” Sell this = instant DMCA + Nostr public shaming.       #
#   3. CREDIT OATH β€” Keep this header. Don't be a skid.                           #
#   4. CURSE OF COPY-PASTE β€” RTFM or you WILL break something. Don't @ me.        #
#   "We build the future on the graves of paid resources."                        #
#   "REJECT MODERN MEDIOCRITY. EMBRACE RDE SUPERIORITY."                          #
###################################################################################

TL;DR: βœ… Free forever βœ… Keep the header ❌ Don't sell it ❌ Don't be a skid


⚑ Related Projects

Resource Description
rde_nostr_log Decentralized FiveM logging via Nostr β€” replace Discord forever
rde_aipd Next-Gen AI Police & Crime System
rde_ipl IPL management with collision sync
awesome-ox-rde Curated list of the best ox_core resources

🌐 Community & Support

🌍 Website rd-elite.com
πŸ™ GitHub github.com/RedDragonElite
🟣 Nostr npub1wr4e24zn6zzjqx8kvnelfvktf0pu6l2gx4gvw06zead2eqyn23sq9tsd94

Before opening an issue: Read the README β†’ check Troubleshooting β†’ read CHANGELOG.md β†’ include your console logs. Don't open issues without logs.


Made with πŸ”₯ and raw elevator engineering by Red Dragon Elite

The future is ours. We are already inside.

REJECT MODERN MEDIOCRITY. EMBRACE RDE SUPERIORITY.

RDE FOREVER. SYSTEM FAILURE. ⚑777⚑

Website Nostr

About

πŸ‰ Next-Gen Elevator & Garage System for FiveM ox_core | Vehicle Mode | StateBag Sync | IPL Passenger Fix | Free Forever | RDE Black Flag πŸ‰

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages