Vehicle hotwiring
Last updated
May be stale
This page was last updated ago, on 25 August 2026. Check what it says against the code before relying on it.
Implements the general vehicle ignition behaviour requested by issue #1587.
General vehicle hotwiring
Hotwiring is part of the existing Vehicles plugin rather than Car Boosting. The wire-matching task is the hotwiring interaction itself.
A hotwire begins only when all of the following are true:
- The player is the vehicle driver.
- The player explicitly uses
/engineor holds right click to request the engine on. - The engine is currently off.
- The player does not have normal or shared access to the vehicle.
Vehicle owners and players who were granted shared access are treated as having keys and start the engine normally. An already-running engine does not start a hotwire, and /engine off continues directly through the normal engine-off path.
Player-driven TurnOn(true) calls are the Vehicles plugin's /engine toggle and the 2-second right-click hold-to-start. System engine starts such as repairs use TurnOn(false) and are not intercepted.
The wire-matching task has no time limit. Each coloured and lettered wire must be dragged to the matching terminal on the opposite bank. A wire can be started from either the left or right side. The server stores the expected mapping and starts the engine only after receiving the exact answer.
An incorrect completed mapping sounds the existing vehicle alarm and fires CityRP.VehicleHotwireFailed. The alarm uses a vehicle cooldown so repeated failures cannot stack the sound. Leaving the vehicle, dying, disconnecting or cancelling closes the task without sounding the alarm or starting the engine. Successful wiring starts the engine through the original vehicle method and fires CityRP.VehicleHotwireSucceeded.
Because this operates at the vehicle ignition layer, ordinary stolen vehicles and active Car Boosting targets use the same behaviour automatically when their engines are off. Generated boosting vehicles are created with their engines off and are not automatically started by the contract system.
New Player Guide integration
The F1 guide checks whether the Waypoints plugin is loaded:
- With Waypoints, it loads
main/npewaypoints.phpand exposes destination, directory and end-navigation bridge functions. - Without Waypoints, it loads the normal
main/npetest.phppage without navigation controls.
The F1 map follows the same plugin check and selects main/mapwaypoints.php or main/mapdisplay.php. Each endpoint redirects the DHTML panel directly to the beta map rather than nesting another iframe. The waypoint-enabled mode exposes map selection and end-navigation functions, while the display-only mode disables waypoint controls and never registers the navigation bridge.
Runtime test plan
- Turn off a vehicle as its owner and confirm
/engineor a 2-second right-click hold starts it normally. - Grant another player shared vehicle access and confirm
/engineor a 2-second right-click hold starts it normally. - Enter the same vehicle without access, hold right click and confirm the engine remains off while the wire task is open.
- Leave the task open for several minutes and confirm it does not expire.
- Start and complete wires from both terminal banks.
- Complete the correct mapping and confirm the engine starts.
- Submit an incorrect mapping and confirm the engine remains off and only one alarm sound starts.
- Exit the vehicle during the task and confirm it cancels without starting the engine.
- Die or disconnect during the task and confirm the server and client session are removed.
- Confirm
/engine offnever opens the wire task. - Confirm using
/enginewhile the engine is already running does not open the wire task. - Confirm repair and other
TurnOn(false)system starts remain unaffected. - Confirm generated Car Boosting vehicles begin with their engines off.
- Confirm Car Boosting tracker challenges never use the hotwire wire task or colour-word task.
- Open F1 with Waypoints loaded and confirm the enhanced guide and map controls work.
- Open F1 without Waypoints and confirm the normal guide and display-only map contain no navigation buttons.