Exports
Integrate Electus Admin 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.
Server Exports
Get Gang
Get the details of a specific gang by its ID.
exports["electus_gangs"]:GetGang(gangId)
Prop | Description | Type |
---|---|---|
gangId | The 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)
Prop | Description | Type |
---|---|---|
gangId | The ID of the gang whose level is to be retrieved. | number |
Returns: number
- The level of the gang.
Get Source Gang ID
Get the gang ID associated with a player's source identifier.
exports["electus_gangs"]:GetSourceGangId(src)
Prop | Description | Type |
---|---|---|
src | The 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)
Prop | Description | Type |
---|---|---|
zoneId | The 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)
Prop | Description | Type |
---|---|---|
gangId | The ID of the gang whose reputation is to be modified. | number |
change | The amount to change the reputation by. | number |
Get Gang Owned Zones
exports["electus_gangs"]:GetGangOwnedZones(gangId)
Prop | Description | Type |
---|---|---|
gangId | The 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)
Prop | Description | Type |
---|---|---|
zoneId | The 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)
Prop | Description | Type |
---|---|---|
gangId | The ID of the gang to which XP is being added. | number |
xp | The amount of XP to be added to the gang. | number |