Electus LogoElectus Documentation

Electus Gangs Changelog

Release notes for every update, newest first.

2.9.0

Added

  • Production zones with configurable recipes, animations, markers, and props.
  • Safe-house alarms, reinforced doors, and security cameras.
  • Colored gang-zone overlays on the GTA map.

Changed

  • Replaced bundled modules with electus_core.
  • Added database storage for production zones and safe-house security.
  • Reworked warehouse crate loading and cleanup.
  • Routed dirty-cash withdrawals through the framework.

Fixed

  • Player reloads, police duty checks, and deleted-zone cleanup.
  • Canceled or invalid marker placement.
  • Duplicate, stuck, and leftover warehouse crates.

2.8.0

Added

  • Added configurable police safehouse raids with breaching, seizures, cooldowns, blips, and permission checks.
  • Added customizable warehouse crates with custom props, marker-only mode, slots, and weight per crate.
  • Added the player's live position to the gang zones map.
  • Added automatic configuration for company money, dispatch, and black money systems.

Changes and fixes

  • Gang raids and police raids can no longer run against the same safehouse at the same time.
  • Improved server-side security for doors, safes, stashes, IPLs, money laundering, and processing areas.
  • Fixed safe raid persistence, duplicate looting, capture ownership, routing buckets, inventory handling, and cleanup issues.
  • Removed the storageBoxes upgrade; warehouse IPLs now use Config.Warehouse.crates.

2.7.0

  • Adjusted Alerts, Members, Upgrades, and Wars tab for more consistent UI
  • Added vehicle management tab to both purchase and change the required role for gang vehicles
  • Added upgrade for money laundering; it now takes a certain % when laundering you can change % in config.

2.6.0

  • Fixed UI crash
  • Fixed issue with inviting members on new UI
  • Added new upgrade type members that increases the max members in a gang

2.5.0

  • Reworked all UI with more consistent spacing, text and cards.
  • Changed chart system in UI.
  • Bug fixes.

2.4.0

  • Adjusted theming UI slightly
  • Added full members control for the admin panel /manage_gangs
  • Added automatic framework gang sync for QBCore and QBox
  • Added database checker, your database now automatically updates according to the latest SQL file and warns for mismatched datatypes. This also means that all old SQL files have been removed.
  • Other minor improvements and fixes

2.3.1

  • Fixed issue with hacking convoy
  • Reordered folder structure a bit
  • Some adjustments to lb-tablet integration
  • Some other smaller adjustments, e.g. qb-target boxes, and disable control actions when being tied
  • Added new export AddCustomTab and SendCustomTabMessage that creates a tab inside the gang menu, example:
exports["your_resource"]:AddCustomTab({
    resourceName = "your_resource",
    src = "nui://your_resource/ui/build/index.html",
    label = "Your Resource",
    activeIcon = "IoCash",
    inactiveIcon = "IoCashOutline",
    onOpen = function()
        print("Tab opened")
    end,
    onClose = function()
        print("Tab closed")
    end,
})

SendCustomTabMessage("your_resource", "updateData", { hello = "world" })

2.3.0

  • Added wardrobe support for safe houses.
  • Added custom zone type actions and action data handling.
  • Added dynamic icons for extended zone types.
  • Refactored zone payload building into a shared UI helper.
  • Adjusted convoy hacking progress behavior.
  • Added failsafes to entity networking issues with different events.
  • Fixed airdrop issues

New Exports

InitZoneType now supports an icon and optional actions:

exports.electus_gangs:InitZoneType(
    "stash",
    "Stash",
    "Custom stash zone",
    "IoCube"
)

You can also register actions directly when creating the type:

exports.electus_gangs:InitZoneType("stash", "Stash", "Custom stash zone", "IoCube", {
    {
        name = "stash_marker",
        label = "Stash marker",
        description = "Place the stash marker inside the zone",
        buttonLabel = "Set marker",
        closeManageZones = true,
        handler = function(context)
            --yourt content here
            return
        end
    }
})

RegisterZoneTypeAction adds an action to an existing zone type:

exports.electus_gangs:RegisterZoneTypeAction("stash", {
    name = "stash_marker",
    label = "Stash marker",
    description = "Place the stash marker inside the zone",
    buttonLabel = "Set marker",
    closeManageZones = true,
    handler = function(context)
        -- your content here
        return
    end
})

2.1.2

  • Fixed UI crash

2.1.0

  • New events, train, convoy, and airdrop, along with bug fixes, have been pushed to portals.
    Please report any bugs for the events and make sure to include debug prints 🙂

Also, due to the network inconsistency of spawning trains, they are currently set as derailed and not moving as previously planned.

2.0.8

  • Fixed translation issue
  • Added Config.Ui.mapConfiguration for those who do not use the Los Santos map
  • Adjusted all targets to further prevent duplicate target issue
  • Fixed issue where it was unclear on why it did not work to create a gang (with safe zone ids being incorrect or if the gang does not have one)
  • Added gang tablet item.

Replace the whole ui folder when updating.

Changed files15

client/

  • fxmanifest.lua
  • utils.lua
  • en.lua
  • ui.lua
  • garage.lua
  • ipls.lua
  • money_laundering.lua
  • safe_house.lua
  • warehouse.lua
  • weed_processing.lua
  • zones.lua

server/

  • attacks.lua
  • members.lua
  • weed_processing.lua

ui/

  • All files

2.0.6

  • Fixed config mismatch
  • Fixed NPCS spawning without weapon
  • Fixed issue with re-entering weed processing ipl
  • Added notification when an attack is started as well

2.0.5

  • Fixed safe rotation
  • Fixed issue with entering wrong ipl
  • Fixed some translations
  • Fixed depositing on qbox
  • Fixed headbags
  • Fixed transaction tab showing identifier instead of player name
  • Fixed UI overflow when toggling all tabs in /manage_zones
  • Fixed some other UI components
  • Fixed parking not working properly on some garage systems
  • Added Config.Doors.openDistance

2.0.0

This is mostly an accumulation of previous versions, but a stable, refreshed, and up-to-date version of the gang script. There will also be a new video showcasing all the changes from 1.0 to 2.0

  • AddProgressToCapture has been readjusted and added Config.Capturing.war.requireOnProgressCapture so you do not have to be at war in order to capture zones with progress (drug dealing, graffiti etc)

  • Safe has been adjusted to function better, and issues with passwords starting with 0s have been resolved as well.

  • Attacking zones and NPCs have been adjusted to properly spawn on the ground. Also, the waves have been adjusted so if it's uneven, it will even out in the last wave.

  • Raids have been adjusted for the durations and safe raids to function properly regardless of your configuration.

  • Fixed some ui glitches.

  • Adjusted open container skill with a delay, making it much easier to time the target and skill.

  • Completely new callback system.

  • Ability to use target as markers for better performance and consistency.

  • Adjusted the config file and added lots of more config to it. It should now be much easier to read the config and make adjustments

  • Added event which can be listened to in third party scripts, TriggerEvent("electus_gangs:soldDrug", zoneId, gangId, amount, selectedDrug) (server sided).

  • Max members in a gang Config.MaxMembers.

  • Added Config.Weed.maxPlaceDistance

  • Added Config.ShowSafehousesOnMap making it possible to completely hide safe houses for roleplaying purposes.

  • Admin tool to transfer zones between gangs in /manage_zones and also you can see which zones are own by who in /manage_zones now.

  • Added the ability to have double doors and adjusted the door system to work better.

  • New export exports["electus_gangs"]:GetZoneById(id) returns the complete zone data, zone type and much more!

  • New export exports["electus_gangs"]:InitZoneType(name, label, description) to create third-party custom zones (note that you can fetch the zone type above)

  • Added the ability to transfer zones as a gang owner to other gangs

  • Added optional cooldown timer Config.Capturing.cooldownAfterCapture to prevent the zones being captured back and forth.

  • Completely new war system with points and a timer. Either you reach the required points or the time runs out. The winner (whoever captures the most zones + sells the most drugs) wins a random sum. You can also integrate your own way to win wars with exports["electus_gangs"]:AddWarProgress(gangId, targetGangId, progress)

  • There is no longer a requirement to have a gang AND a safe house.

  • Complete UI redesign, a fresh and modern look.

  • Ability to search tied players.

  • Added role related exports exports["electus_gangs"]:GetRoleGradeFromId(roleId) ,exports["electus_gangs"]:GetPlayerMemberGrade(src) and exports["electus_gangs"]:GetPermissionsFromRole(roleId)

  • Added cash related exports exports["electus_gangs"]:AddGangCash(gangId, amount), exports["electus_gangs"]:RemoveGangCash(gangId, amount), exports["electus_gangs"]:AddGangDirtyCash(gangId, amount), exports["electus_gangs"]:RemoveGangDirtyCash(gangId, amount)

  • Added max attacks at once Config.Attacks.maxAttacks

Upgrading

Start from a fresh database, or run the 2.0 SQL file.

1.11.6

  • Fixed safe issue + changing safe password that was throwing harmless error

1.11.5

  • Fixed issue with GetDirtyMoney coming up
  • Adjusted safe collision
  • Fixed npc.dialog_walks_away translation
  • Fixed money laundering marker not hiding when it is supposed to
  • Adjusted weed processing table
  • Fixed issue if you had problem with database getting out of sync
  • Other issues

Please run 1.11.5.sql, note that all active attacks will not work once updaing and they need to be attacked again.

1.11.3

  • Fixed animation and prop on gang item and some other stuff

1.11.1

  • Fixed ui issue with war menu
  • Other smaller fixes e.g. translation and more
  • Added some checks for database times

1.11.0

Added

  • Added Config.moneyLaundering.useGangDirtyCash
  • Added Config.drugs.progressPerDrug

Fixed

  • Moved away from ox_lib when it comes to the event time handling, as it was extremely inconsistent. Made a custom system for it, so the time should be displayed properly.
  • Fixed UI overflow on selecting gangs to attack in war tab.
  • Reworked the garage system a bit and added support for more.
  • Fixed issue with being able to spam the buttons on npc drug sale resulting in 100% sell rate on 1 drug for $1.

1.10.0

Added

  • Added export GetSourceZoneID
  • Added export GetGangFromZoneId
  • Added export CreateAlert
  • Added export AddProgressToCapture
  • Added exprot RemoveProgressFromCapture
  • Added export CreateTask
  • Added export AddTaskProgres
  • Added export GetActiveTaskData
  • Seperated events and tasks in gang menu
  • Added alerts in gang menu, there you can see alerts such as drug selling and more
  • Capturing zones with "progress" is now much more genertic and can be implemented into your own scripts. Also the UI is updated to read from the added types of capturing for a seamless experience.
  • Added Config.attacks.minimumGangMembersOnline so that attack can only be done on regular defenders active time.
  • There is now a full system to add new tasks and handle them. Please read the documentation beforehand!

Fixed

  • Issue with safe
  • Some other minor bugs

Upgrading

  • Run 1.10.0.sql before restarting.
  • Upgrading from a version older than 1.9.0? Run 1.9.0.sql as well.

1.9.1

  • Added drawdistance in marker.lua
  • Fixed issue that some people had with statistics
  • Fixed issue with drug sell input

1.9.0

  • Complete re-work of UI, with better and more reliable components. This is what has taken up most of the time but with the new system it'll be easier to further create new UI components and overall development can be accelerated.
  • Removed the old system for capture. Currently, the system works in that everyone can attack any zone if they are at war, and then there is a preparation time.
  • Fixed issue with drug capture zone
  • Better UI color customizations
  • Fixed issue with QB-target
  • Adjusted some target offsets for better targeting
  • Added safe with /manage_zones recommended to add safes if you have custom zones or update the zones in the electus_gangs_zones_data. Also, if you plan not to use the safe, I recommend editing ui.lua and enabling the transfer tab once again
  • Fixed issue with hostiles not spawning properly if there are players on the boat already
  • Added config to be able to plant weed everywhere
  • Adjusted so you can only sell the drugs you have in your inventory
  • Added so you can place crates yourself instead of having an IPL
  • Added police dispatch for events.
  • Fixed height issue with zones that are in mountains, etc.
  • Added real defense mechanism, once an attack starts, the defending gang can pause the capture.
  • Added safe house zone raids. When you start an attack on a safe house, you can go into their nest and if they have a safe set up you will be able to get a % of what is in their safe.

Please run 1.9.0.sql included in the new update!

1.8.5

Added

  • Now able to add MLO doors to a safe house zone in /manage_zones, please run the sql snippet:
ALTER TABLE electus_gangs_zones_data
ADD doors TEXT;
  • Added AddDrugCapture export. Can be used to integrate with other FiveM drug scripts.
  • Added config Config.drugs.onlyGangMembersCanSellDrugs
  • Added config Config.captureZones.useHours if you want to use hours instead of minutes for next capturable zones time.

Fixed

  • XP progress percentage not showing correct % if xp needed in configed was changed from 100
  • ox_lib double loading if using ox_lib as logs
  • Error when selling inside a drug capture zone when not being in a gang
  • NPCs on the boat not spawning if you are on the boat before the event starts
  • Events not showing the correct time until they start
  • QB/QBX issues with personal garage (both the spawning issue and issue with the vehicle mods not loading)

1.8.4

Fixed

  • Fixed issue if you have a server with different time zones not showing the correct event start time
  • Fixed issue with the marker not disappearing after the zone is no longer capturable
  • Fixed an extra check for death while capturing

1.8.3

Fixed

  • Fixed issue with later oxmysql causing crash when selling drugs inside a drug capture zone
  • Fixed error on safe house IPL
  • Fixed formatting issue with core inventory
  • Fixed issue with qb/qbx garage

1.8.2

Added

  • Added lb-tablet dispatch

Fixed

  • Fixed Core inventory issue
  • Fixed loading ipls

1.8.1

Fixed

  • Fixed UI error

1.8.0

Added

  • The Cayo Perico added to map, the coordinates can be a bit off so make sure you double check in-game.
  • Added Config.ui.enterZone.showOnlyForGangMembers

Fixed

  • Fixed error when trying to sell drugs outside gang owned zone
  • Updated old esx functions
  • Wrapped ox lib text ui functions inside client.lua HelpText etc
  • Added extra checks for networked natives
  • Fixed gang menu crash on some upgrades
  • Fixed UI error

1.7.0

Added

  • Gang menu will now fade out when you have the mouse outside of it
  • Redone the design of capturing, making it cleaner
  • Added logo which can be added /manage_gangs
  • The gang logo will now be visible in the middle of its owned zones can be disabled via Config.captureZones.showLogoOnMap
  • Added min online gang members to attack/capture a zone Config.captureZones.minMembersOnline

To use the logos run this snippet in HeidiSQL

ALTER TABLE electus_gangs
ADD `logo` MEDIUMTEXT;

Fixed

  • Fixed some lb-tablet integration
  • Added extra check for death
  • Fixed issue with new esx version

1.6.5

Added

  • Added duration for zone enter popup & remade it with zone name #id on top instead

Fixed

  • Fixed mission translation on garages
  • Fixed IPL not being able to be disabled once it has been enabled
  • Fixed if you had connected zones enabled but not restricted connected zone visibility causing error when trying to attack an zone that is not connected
  • Readjusted so weed processing, garage and warehouse will not be seen as options if disabled in config when creating/editing zones.
  • Fixed overflow with transaction list
  • Fixed SQL error related to withdrawal of money, please run this SQL snippet in your Heidi SQL
ALTER TABLE electus_gangs_transactions

MODIFY COLUMN `type` VARCHAR(55);

1.6.4

Fixed

  • Fixed issue with qbx client not loading properly
  • Fixed issue with new option to sell drugs for dirty cash on qb-core & qbx

1.6.3

Fixed

  • Fixed issue if you had connected zone disabled and next capturable zones
  • Added option in Config.drugs.dirtyCashOnSelling

1.6.2

Added

  • Optionable popup when a player enters a zone and who owns it, placement is configurable
  • Added a command (configurable) to view current zone and who owns it
  • Added Origen dispatch support
  • Added ps-inventory support
  • Added export to open gang menu exports.electus_gangs:OpenGangMenu()
  • Added in config random min-max weed bags one can receive when processing weed
  • Fixed support for jg-advancedgarages

Fixed

  • Fixed issue with zone capture
  • Fixed issue when capturing zone causing error in ui for some server artifacts
  • Adjusted the permission system a bit

1.6.1

Fixed

  • Reworked next zone capturable zones and fixed issue related to them, also the time is now in minutes.
  • Fixed issue with qbx garages and qb-garages

1.6.0

Added

  • When a gang tries to attack another gang's zone the defendants will now get a dispatch looking blip on their map indicating where exactly the attack is being held.
  • Same as attack when someone sells drugs on your zone the whole gang will get both a notification and a dispatch looking blip on their map (just in some cases default 1/4 that a npc calls the gang zone owner)
  • You can now choose to enable Config.gangShop where players can go to and purchase a gang/safe house zone for a configurable price. This is disabled by default.
  • The docs has been updated with the correct exports as well with updated installation steps for the items etc.

Fixed

  • Fixed export issues
  • Fixed issue with not able to insert high amounts of min drug sell to capture, causing error and confusion. You can use this SQL snippet in your HeidiSQL or re-run the electus_gangs.sql to make it work
ALTER TABLE electus_gangs_zones_data

MODIFY COLUMN min_drug_capture INT(11);
  • Other minor issues/bugs was also resolved

1.5.3

Fixed

  • Fixed issue if you had no zones in your server and had it open for a hour causing excessive resmon usage.
  • Fixed issue with /gang_menu making capture ui disappearing.
  • Added check for selling drugs inside a vehicle

1.5.2

Fixed

  • Reworked the sql file gain
  • Fixed issue with ox_target backwards compatibility and qtarget and latest update

1.5.1

Fixed

  • Fixed issue when trying to create a gang log when not in a gang causing error
  • Fixed marker flickering when close to a weed plant
  • Fixed issue with zone not choosing properly causing same ids over and over
  • Added the lb-tablet icon again (it disappeared)
  • Adjusted the weed proccessing target zone slightly to work better with all target system
  • Reworked all the targeting systems to work better
  • Updated the electus_gangs.sql to work better with more database versions

1.5.0

Added

  • Zone names, you can now name zones.
  • Connected zones configurable, every zone is connected into each other and you can't capture unless connected
  • Capture zones with selling drugs in it!
  • /set_player_gang and /remove_player_gang commands for admins
  • Config to only see the connected zones in /gang_menu
  • Changed GetPlayerGangId export to GerSourceGangId

Fixed

  • Optimized the databse
  • Mission going over 100%
  • Qbcore issue with assigning gang to player not synching
  • Updated some UI components to look better
  • And other stuff

Upgrading

  1. Run 1.5.0.sql file
  2. Go ingame and do /manage_zones and just edit & save any existing zone (this is to update the connections)
  3. Run /optimize_gangs command in-game

OR

Do a complete re-install.

1.4.0

Added

  • Almost complete re-write of weed planting system, now it's more optimized and consistent
  • NPC defenders waves Config.numberOfNPCDefendersWaves (NPCs will not spawn at once but will continue to come)
  • Configurable weapon for NPC defenders Config.npcDefenderWeapons
  • Gang actions - Zip ties, escorting, put in vehicle/take out of vehicle, bag over head. Items can be configured in Config.actionItems
  • Ability to remove weed processing and warehouse for safe houses

Fixed

  • Removed so police can't see every safe house blips
  • Issues with boat event
  • Issues with capturing
  • Other small fixes and issues has also been resolved

For anyone having issues with qb-target or any other target system, make sure you do not use an edit or old version of your target system since most of them do not work when the general backwards compatibility for target systems.

1.3.2

Fixed

  • Fixed money laundering exploit and money laundering not having different routing buckets
  • Fixed issue when editing the gang and a field was set to 0 and said required
  • Fixed issue regarding qbox and depositing
  • Added Config.selectPlayerDist if you only want to be able to select players within a specific radius

Downloading the latest is recommended for maximum security.

1.3.1

Fixed

  • Reworked zone capture A LOT. Fixes issues and made it easier for the user to understand what is happening e.g. now shows if another gang starts capturing the same zone and how it is paused + removed the "decapture" system (was just confusing).
  • Fixed issue with permissions for members
  • Added check if ped is dead on drug dealing (don't ask me how this was not in here before...)
  • Added notification if someone tries to plant outside a weed zone + fixed error if someone tries to
  • and other

1.3.0

Fixed issue new qbox system interfering with old qbcore. Download latest on portal if youre having trouble with QBCORE.

1.3.0

Added

  • New config options Config.ui.menuSettings if you want to disable gang color change, transfer ownership or/and change gang name inside gang menu
  • Added option to change color when editing a gang in /manage_gangs
  • Added feature to enable/disable all sidebar tabs in Config.toggleSidebars
  • Added config to disable drug dealing Config.enableDrugDealing
  • Added whole new feature Gang Wars. You must now be in an active war to claim other gangs zones!

Make sure to run the sql before the new update

CREATE TABLE IF NOT EXISTS `electus_gangs_wars` (
  `gang_id_1` int(11) NOT NULL,
  `gang_id_2` int(11) DEFAULT NULL,
  `peace_1` int(1) DEFAULT NULL,
  `peace_2` int(1) DEFAULT NULL,
  `started` datetime DEFAULT current_timestamp(),
  KEY `gang_id_2` (`gang_id_2`),
  KEY `gang_id_1` (`gang_id_1`)
);

Fixed

  • Tons of synchronization issues resolved
  • Translations
  • Issue with being a cop & gang member not able to open gang marker menu
  • UI overflow with the members fixed and refined
  • QBOX issues fixed and added "qbox" option in config (not a fully implementation still uses some bridge functions but changed some stuff which was not working)
  • Issue with the capture zones not disappearing after attack
  • Issue with target options stacking in warehouse
  • Fixed issue with setting owner in gang menu

1.2.0

Added

  • Config.restrictWeedPlantingToZoneGang - ability to change in config and make it so every weed zone can be used by anyone
  • Config to completely disable garage
  • Config.dateLanguage - for different time formats
  • Config.drugs.minPolice - minimum required police officers onine to sell drugs
  • Added blips to every marker which is configurable if you want it both enabled and how they should look, this way the player can easilywarehouses, weed proccessing, money laundering and so on.
  • New server exports:
exports["electus_gangs"].GetGang(gangId) -- get the gang specifics by gang id
exports["electus_gangs"].GetGangLevel(gangId) -- get the gang level by gang id
exports["electus_gangs"].GetPlayerGangId(player) -- get the gang id from player (esx/qb player)
exports["electus_gangs"].GetGangFromZoneId(zoneId) -- get the gang if anyone is controlling the zone
exports["electus_gangs"].ChangeGangRep(gangId, change) -- changes the gang rep from gang id (amount is the change e.g. -1 (decreses by 1) and 1 (increases by 1)
exports["electus_gangs"].GetGangOwnedZones(gangId) -- get the owned zones by gang id
exports["electus_gangs"].GetZoneRespect(zoneId) -- get the respect from zone
exports["electus_gangs"].GainXP(gangId, xp) -- increases xp by gang id

Fixed

  • Gang upgrades giving
  • Exiting IPL when restarting any script
  • Glitch making it possible to attack the same zone mulitple times over
  • Some missing translations
  • Fixed other minor issues

1.1.1

Added

  • Config to enable/disable personal garage
  • Config.dirtyCashItem can be set to false for esx users (if you do not have it as an item)
  • Wide screen compatibility

Fixed

  • Crash when using default color and accessing statistics tab
  • Issue with QB & garages
  • Not able to edit zone after creating it without restarting the script
  • Not being able to change permission for owner in roles tab (the issue was just visual)
  • Player not found issue with qbcore/qbox on recruiting
  • UI not updating when withdraw
  • Possible fix for some target users not seeing all the warehouse targets
  • Changed default color for gangs so it is not white
  • Some missing translations

1.1.0

  • Added new feature for police to raid gang safe houses
  • Added new feature to choose among different drugs to sell in dialog (configurable items and prices)
  • Fixed issue that sometimes current owner said null
  • Fixed password cancel button
  • Fixed the props on weed drying and the weed drying index selection
  • Removed some debug stuff
  • Fixed radio button not moving + added animation for it
  • Fixed transfering gang inside gang menu not updating the zones
  • Fixed problem with routing bucket inside weed processing
  • Added option to disable the different ways how to open gang menu (marker, command or tablet)
  • Fixed select player menu overflowing player list making it into a scroll instead

1.0.2

  • Fixed a couple of errors for qb core
  • Fixed other errors and bugs