Electus LogoElectus Documentation

Exports

Integrate Electus Gangs to your scripts

Client Exports

Get Player Zone

Get the current zone ID of the player.

exports["electus_gangs"]:GetPlayerZone()

Returns: number - The ID of the player's current zone.

Get Player Gang ID

Get the ID of the player's gang.

exports["electus_gangs"]:GetPlayerGangId()

Returns: number - The ID of the player's gang.

Open Gang Menu

Open the gang menu for the player.

exports["electus_gangs"]:OpenGangMenu()

Server Exports

Get Gang

Get the details of a specific gang by its ID.

exports["electus_gangs"]:GetGang(gangId)
PropDescriptionType
gangIdThe ID of the gang to retrieve.number

Returns: table - The specifics of the gang identified by gangId.

Get Gang Level

Get the level of a specific gang.

exports["electus_gangs"]:GetGangLevel(gangId)
PropDescriptionType
gangIdThe ID of the gang whose level is to be retrieved.number

Returns: number - The level of the gang.

Get Source Zone Id

Retrieves the source zone ID.

exports["electus_gangs"]:GetSourceZoneId(src)
PropDescriptionType
srcThe source of player for which the zone ID is being retrieved.number
Returns: number - The ID of the source zone.

Get Gang From Zone Id

Retrieves the gang data from a specific zone ID.

exports["electus_gangs"]:GetGangFromZoneId(zoneId)
PropDescriptionType
zoneIdThe ID of the zone for which the gang data is being retrieved.number
Returns: table - A table containing the gang data for the specified zone ID.

Get Source Gang ID

Get the gang ID associated with a player's source identifier.

exports["electus_gangs"]:GetSourceGangId(src)
PropDescriptionType
srcThe source identifier, the player's server ID.number

Returns: number - The gang ID associated with the source.

Get Gang From Zone ID

Get the gang that controls a specific zone.

exports["electus_gangs"]:GetGangFromZoneId(zoneId)
PropDescriptionType
zoneIdThe ID of the zone for which the controlling gang is to be retrieved.number

Returns: number or nil - The gang ID controlling the zone identified by zoneId, or nil if no gang controls it.

Change Gang Reputation

Modifies the reputation of a gang by a specified amount.

exports["electus_gangs"]:ChangeGangRep(gangId, change)
PropDescriptionType
gangIdThe ID of the gang whose reputation is to be modified.number
changeThe amount to change the reputation by.number

Get Gang Owned Zones

exports["electus_gangs"]:GetGangOwnedZones(gangId)
PropDescriptionType
gangIdThe ID of the gang whose owned zones are to be retrieved.number

Returns: table - A list of zones owned by the gang identified by gangId.

Get Zone Respect

Get the respect level of a specific zone.

exports["electus_gangs"]:GetZoneRespect(zoneId)
PropDescriptionType
zoneIdThe ID of the zone for which respect is to be retrieved.number

Returns: number - The respect level of the zone.

Gain XP

Add experience points (XP) to a gang.

exports["electus_gangs"]:GainXP(gangId, xp)
PropDescriptionType
gangIdThe ID of the gang to which XP is being added.number
xpThe amount of XP to be added to the gang.number

Create Alert

Create an alert for a specific gang.

exports["electus_gangs"]:CreateAlert(gangId, label, message, coords)
PropDescriptionType
gangIdThe ID of the gang for which the alert is created.number
labelThe label for the alert.string
messageThe message content of the alert.string
coordsThe coordinates where the alert is relevant.vector3

Add Progress To Capture

Adds progress to a zone capture for a specific gang. Can be used in drug scripts, heist etc. Once it hits the required amount, the zone will be captured. Make sure to add the type to Config.capturing.captureProgressTypes

exports["electus_gangs"]:AddProgressToCapture(name, zoneId, gangId, amount)
PropDescriptionType
gangIdThe ID of the gang for which progress is being added.number
zoneIdThe ID of the zone being captured.number
nameThe name/type of capture ("drugCapture", "graffiti", "custom" etc).string
amountThe amount of progress to add to the capture.number

Remove Progress From Capture

Removes progress from a zone capture for a specific gang.

exports["electus_gangs"]:RemoveProgressFromCapture(zoneId, gangId, amount)
PropDescriptionType
gangIdThe ID of the gang for which progress is being removed.number
zoneIdThe ID of the zone being captured.number
amountThe amount of progress to remove from the capture.number

Create Task

Creates a new task for a specific gang.

exports["electus_gangs"]:CreateTask(gangId, taskName, label, description, xpReward, minLevel, goalProgress, shouldRemove)
PropDescriptionType
gangIdID of gang OR nil for all gangs.number or nil
taskNameThe name identifier of the task.string
labelThe label for the task.string
descriptionA brief description of the task.string
xpRewardThe amount of XP to reward for completing the task.number
minLevelThe minimum level required to start the task.number
goalProgressThe progress required to complete the task.string
shouldRemoveWhether the task should be removed after completion. If not the gang can't redo the same taskboolean

Add Task Progress

Adds progress to an existing task for a specific gang.

exports["electus_gangs"]:AddTaskProgress(gangId, taskName, amount)
PropDescriptionType
gangIdID of gang OR nil for all gangs.number or nil
taskNameThe name identifier of the task.string
amountThe amount of progress to add to the task.number

Get Active Tasks Data

Retrieves the active tasks for a specific gang.

exports["electus_gangs"]:GetActiveTaskData(gangId, taskName)
PropDescriptionType
gangIdID of gang OR nil for all gangs.number or nil
taskNameThe name identifier of the task.string
Returns: table - A table containing the active tasks data for the specified gang and task name.