Energy System

A script by LastCode

No reviews yet.
Energy System main image

Price

Unknown

Full Description

:red_circle: Preview - YouTube
:shopping_cart: Tebex Store - Last Code Studio
Escrowed and open source versions available

last-energy introduces a fully featured, persistent energy management system, designed for survival, technical RP, and post-apocalyptic FiveM servers.
It provides a complete framework for energy production, storage, and distribution, based on placeable world props, ownership rules, crew permissions, wear, and realistic interactions.

This script should be used with a blackout resource for optimal performance.





Generator Features

  • Placeable generators: freely deployable in the world using a placement editor.
  • On / Off system with persistent state.
  • Generator locking: owners can lock generators; other players may force them open using a lockpick (ox_lib minigame).
  • Repair system: generators degrade over time and require repairs through a dedicated UI.
  • Access control:
    • Owner → full access
    • Crew members → full access
    • Non-owners → open generator or force lock only (if locked)

Energy Production Components

  • Solar panels: generate energy based on weather conditions.
  • Wind turbines: energy output influenced by wind/weather.
  • Dynamic connections: components can be linked or disconnected from generators.
  • Full persistence: position, state, and connections are stored in the database.

Lighting System

  • Placeable lights (bulbs) connected to generators.
  • Toggle on/off interaction available when permitted.
  • Advanced management (owner / crew):
    • Dismantle
    • Reposition
    • Disconnect from generator
  • Real energy consumption based on available stored power.

Interactions & Permissions

  • Owner: all interactions available
  • Crew members: full access, same as owner – COMING SOON
  • Non-owners:
    • Generators → Open / Force lock
    • Lights → Toggle on/off
  • Dynamic targeting system powered by ox_target or qb-target

Dependencies

  • ox_lib
  • ox_target
  • ox_inventory, qb-inventory, core_inventory, minventory (CODEM)
  • oxmysql
  • last-crew (optional) – SOON AVAIBLE
  • qbx_core, qb-core, es_extended
Code is accessible Yes/No (Escrowed or Open Source)
Subscription-based No
Lines (approximately) 2000+
Requirements Requirements
Support Yes

Config Merger
Have you tried Config Merger? Merge your configs easily