Informaclique
AccueilServicesRoofPilotRéalisationsOutilsBlog
0782919359Devis gratuit
AccueilServicesRoofPilotRéalisationsOutilsBlog0782919359Devis gratuit
Informaclique

Développement informatique & Solutions digitales sur-mesure

Studio dev à Lyon : applications métier, ERP, sites web et outils utilisés en production — déploiement et exploitation inclus quand il le faut.

Open source & studio

GitHub @CedricPointSoutien aux repos & ressources partagées

Pas obligatoire — utile si un outil ou un article vous a fait gagner du temps.

Solutions

Développement sur-mesureCréation de sites webRoofPilot (logiciel étanchéité)Nos réalisationsDiscuter d'un projet

Ressources

Journal techniqueModalités de travailRoofPilot — fonctionnalitésOutils gratuitsFormateur JSONDécodeur JWTSimulateur prix site

Contact

[email protected]
0782919359
Lyon
Mentions légalesPolitique de confidentialitéPolitique cookies
© 2026 Informaclique. Tous droits réservés.Société de développement informatique — Lyon
Toutes les réalisations
FiveM & GTA RPOpen source

cockpit — contrôles de véhicule pour FiveM

Portes, vitres, sièges, moteur, clignotants et régulateur de vitesse pour n’importe quel serveur FiveM : aucun framework, aucune base de données, quatre fichiers.

Voir le code sur GitHub
Lua

cockpit

README du dépôt

cockpit

Vehicle controls for FiveM that work on any server. Doors, windows, seats, engine, turn signals and cruise control — no framework, no dependency, no database, four files.

CI standalone license

Every action is a plain game native applied to the car you are driving. There is nothing to migrate, nothing to configure before it runs, and nothing that breaks when you change framework — because it never asks which one you use.

What you get

commanddefault key
🔑/engineNUMPAD 0start or stop the engine
🚪/door 1-6 | fl fr rl rr hood trunk | all—open or close any door
🧰/hood, /trunk—the two you actually use, in one word
🪟/window 1-4 | fl fr rl rr | all—roll windows down and up
💺/seat [1-4]—move seat without getting out — empty takes the next free one
↔️/left, /rightNUMPAD 4, NUMPAD 6turn signals, seen by every player
⚠️/hazardsNUMPAD 5hazards, and they keep blinking on a car you left
🎯/cruise [km/h]NUMPAD 8hold a speed — empty holds the one you are doing

Keys are only defaults: every player can rebind them in Settings → Key Bindings → FiveM, and commands work from the chat either way.

Install

cd resources
git clone https://github.com/CedricPoint/fivem-cockpit.git cockpit

Then add it to your server.cfg:

ensure cockpit

That is the whole installation. Any current FiveM server build, nothing else.

Configuration

config.lua, and it is optional — the defaults are the intended experience.

Config.Features = {
    engine     = true,
    doors      = true,
    windows    = true,
    seats      = true,
    indicators = true,
    cruise     = true,
}

Config.SeatSwapMaxSpeed = 30.0   -- km/h, 0 removes the check
Config.CruiseMaxSpeed   = 250.0  -- km/h
Config.SyncIndicators   = true   -- show your turn signals to other players
Config.Notifications    = true

Commands and default keys live there too, so you can rename anything that clashes with a resource you already run. Turning a feature off unregisters its command and its key binding; nothing else changes.

How it behaves

A few decisions worth knowing before you read the code:

  • Only the driver controls the vehicle. A passenger does not own the car on the network, so a door it opened would stay shut on every other screen. Refusing is clearer than doing nothing. Seat swapping is the exception — it only moves your own ped, so anyone can do it.
  • Hazards survive you. Walk away from a car with the hazards on and they keep blinking, for you and for everyone else, the way they should.
  • Braking cancels cruise control, like a real limiter. So does leaving the vehicle.
  • Turn signals are relayed through the server because the game keeps them local. The relay is rate limited, and the worst a crafted packet can do is blink someone's indicators.
  • Nothing is stored. No database, no state file, no player data.

Compatibility

Standalone means standalone: no ESX, no QBCore, no ox_lib, no NUI, no exports from anything. It also means it sits next to those frameworks without touching them — if your framework already handles seats, turn that one feature off and keep the rest.

The one thing to watch for is another resource that owns the same command names (/engine and /seat are popular). Rename them in config.lua and you are done.

Tests

The command logic runs outside the game. test/harness.lua stubs every native against a small fake world — one player, one four-seater — so the real handlers from client.lua can be exercised under plain Lua:

lua5.4 test/run.lua
cockpit
  ok   the engine toggles off and back on
  ok   /door all opens everything, then shuts everything
  ok   seats cannot be swapped at speed
  ok   hazards keep blinking on a car the player left
  ok   braking releases cruise control
  ok   a passenger cannot touch the vehicle
  ...
  26 checks, 0 failed

It is not a substitute for driving a car around, but it means a typo in the argument parsing or an inverted toggle never reaches your server.

License

MIT — do what you like with it.

Fiche

Langage
Lua
Étoiles
0
Licence
MIT
Mis à jour
20 septembre 2026
LuaFiveMStandalone

Un projet similaire en tête ?

Développement sur-mesure, devis gratuit sous 48 h.

En parler

Autres réalisations

  • FiveM & GTA RP

    ox_trash_search — fouille des poubelles

    Fouille et dépôt dans les poubelles et bennes de la map avec ox_target et ox_inventory : animation, barre de progression, paliers et compteur SQL.

  • FiveM & GTA RP

    Ascension Bank — système bancaire FiveM

    Banque complète pour ESX Legacy : comptes avec IBAN, historique, agences et distributeurs, carte bancaire et marché d’investissement (cryptos, matières premières, actions).

  • FiveM & GTA RP

    checkversion — suivi des versions de scripts

    Manifestes de version publics utilisés par mes ressources FiveM pour prévenir les serveurs quand une mise à jour est disponible.