[Paid] Advanced Ownable Solar Panels [ESX/QB/OX]

Introducing system that allows your players to easily purchase and install solar panels on allowed locations on the map, as well as admins to easily dynamically configure and manage solar panels on a live server!


Requirements


Features

  • Possibility of blocking locations for installing Solar Panels (config.lua). Solar Panels also cannot be installed from the vehicle.
  • Players install Solar Panels, produce power and earn money by giving panel’s power to the city, if the city doesn’t have enough power, the result is city blackout
  • Usable items:
    • solarpanel - item used for installing Solar Panels
    • remotecontrol - device for remote control (if installed)
    • note that item names can be changed in config.lua
  • Everything can be done dynamically, that’s why we created an admin menu!
  • Admin Menu:
    • Solar Panels List:
      • List of all solar panels, in the name with the id and in the description with the name and owner of the panel
      • Change Owner
      • Change Name
      • Teleport To Solar Panel
      • Energy Values:
        • Power Value - current panel’s power value
        • Maximum Panel Power Capacity
        • Battery Voltage
      • Settings:
        • Panel Access
        • Allowed Jobs
        • Earnings (income)
        • Security - checkbox
        • Remote Control - checkbox
      • Delete Solar Panel - permanently (not restorable)
    • Settings:
      • Security - price owners have to pay for protection from hackers (less chance of the solar panel being hacked and disabled)
      • Remote Control - price owners have to pay for remote control device (control solar panel from anywhere)
      • Currency - currency used for Solar Panel purchases etc…
      • Object Name - Solar Panel object name | suggested objects are: prop_solarpanel_02, prop_solarpanel_03
      • Jobs Options - jobs options for “Allowed Jobs” section when installing Solar Panel (all jobs on your framework will be pulled and added to the selection input)
      • 3D Text - checkbox for turning on/off 3d text on solar panels
      • Power Interval - time every so often during the day and in sunny weather (ingame), power will be added to each solar panel (minutes)
      • Blackout Interval - how often will it be checked whether there is enough electricity in the city and whether there will be a blackout (minutes)
      • Electricity Required - the amount of power required for the city to have electricity, the total number is the sum of the electricity power from all installed solar panels
    • Refresh data & respawn all Solar Panels - this will refresh all SQL data and respawn all Solar Panels, as well as delete & create force deleted & created panels in database
  • Installing Solar Panel:
    • Panel Access - players who will have access to the specific solar panel, this field is also optional
    • Allowed Jobs - jobs that are allowed to access specific solar panel, this field is also optional
    • Panel Name - unique name (label) for specific solar panel, this field is required
    • Security - checkbox for protection from hackers (it will be harder to hack the panel)
    • Remote Control - checkbox for installing remote control, this will also give players device for controlling solar panel from anywhere on the map
    • Maximum Panel Power Capacity - multi-select field for choosing maximum power capacity the solar panel has, higher power capacity means better and faster electricity production and higher income, this field is required
      • 200 W
      • 300 W
      • 400 W
    • Battery Voltage - multi-select field for choosing battery voltage the solar panel will have, higher battery voltage gives more power to the solar panel when there is sun and between 6-20 (ingame time)
      • 12.5 V
      • 15 V
      • 20 V
    • After all these settings, it is simply necessary to determine the location of the solar panel and press ENTER
  • 3D Text Info:
    • If enabled, 3D text will display all necessary information about the Solar Panel to everyone nearby
    • Name
    • Status - can be active or inactive, depending on whether there is power in the solar panel or not
    • Power - current power value/maximum power value (W)
    • Battery Voltage - (V)
  • Managing Solar Panel:
    • Solar Panel owner and people with access given by the panel owner can access the solar panel through the target system
    • Panel Info - all important information for specific Solar Panel
      • ID, Name, Owner
      • Power, Maximum Power, Battery Voltage
      • Security, Remote Control - enabled/disabled
      • Income, Total Power Produced, Total Income
    • Rename Panel
    • Update Access - update players & jobs access for specific Solar Panel, when hovering this button current access will be displayed
    • Update Maximum Power Capacity - this has to be purchased
    • Update Battery Voltage - this has to be purchased
    • Purchase Security (hack protection) - this has to be purchased
    • Install Remote Control - this has to be purchased, after purchasing owner will receive remote control device item
    • Withdraw Earnings - withdraw income available from power produced, hover will display current available income to withdraw
    • Transfer Ownership:
      • Transfer ownership to online player - select player from current online players
      • Transfer ownership to offline player - input player’s identifier/citizenid
    • Delete Solar Panel - permanently delete solar panel
  • Hacking Solar Panels:
    • You can easily change your minigame for hacking, code for that is accessible
    • Panel owners cannot hack their solar panel
    • State officials receive hack notifications as well as GPS location (configurable in config.lua)
    • After one failed hacking attempt, it is necessary to wait up to 5 minutes of real time for the next one
    • After successfully hacking the panel, a similar menu opens as everyone with access to the panel, only that not all options are available
    • If the solar panel has security (protection against hackers), hacking will be much more difficult (almost impossible)
  • Remote Control Device will give option to panel owners to easily mark their Solar Panel location on the map
  • Complete Script Translation
  • Easy Installation

Accessible Code

  • You can check it here

Showcase

  • To better understand the system, please check the preview.

Worth mentioning

  • The script has been thoroughly tested with the latest versions of all the scripts listed in the requirements section. We can ensure that the script is compatible and functions as intended when using these up-to-date dependencies. However, we cannot guarantee the proper functioning of the script with older versions of the required scripts. It is highly recommended to use the specified latest versions to ensure the best performance and compatibility.

Tebex

Code is accessible Partly
Subscription-based No
Lines (approximately) 2600+
Requirements oxmysql & ox_lib & esx/qb & ox_target/qtarget/qb-target
Support Yes
103 Likes

Great work

1 Like

good job nice work :heart:

:heart: great work

Fire work again guys! Nice one! :heart:

Great work :heart:

great work as always! <3

Something different in this fivem world, would love to test it out. :melting_face:

It looks very good

Now. Thats thinking about the climate :muscle:t3:

Nice script, a nice side hustle for the players

best ownable solar panel system ever!!

great work go for scripts like this :slight_smile:

Loves it!!! :two_hearts::sparkling_heart:

The Best IN town :100: :boom: love the scripts keep up the great work. :grinning:

Awesome solar cell script, great creation nice.

But they get energy from the sun in game?

great work

Yes, if there is sun on the server, the panels will get energy.

good job