๐Server
IsOrganizationZone
Return if the zone is own by the organization
Usage :
exports.core_gangs:isOrganizationZone(organizationName, zoneId)Example :
local isOwnByF4L= exports.core_gangs:isOrganizationZone('f4l', 6048)IsPlayerOrganizationZone
Return if the zone is own by the player organization
Usage :
exports.core_gangs:isPlayerOrganizationZone(identifier, zoneId)Example :
-- QBCore
local isPlayerZone = exports.core_gangs:isPlayerOrganizationZone(Player.PlayerData.citizenid, 6048)
-- ESX
local isPlayerZone = exports.core_gangs:isPlayerOrganizationZone(Player.getIdentifier(), 6048)
-- All
local isPlayerZone = exports.core_gangs:isPlayerOrganizationZone(source, 6048)SetPlayerToOrg
Add the player to the organization
Usage :
exports.core_gangs:setPlayerToOrg(playerSource, organizationName)Example :
exports.core_gangs:setPlayerToOrg(10, 'f4l')SetPlayerAsOrgOwner
Add player to the organization and set it as owner
Usage :
exports.core_gangs:setPlayerAsOrgOwner(playerSource, organization)Example :
exports.core_gangs:setPlayerAsOrgOwner(10, 'f4l')SetZoneToOrg
Set a zone to a specific organization
Usage :
exports.core_gangs:setZoneToOrg(zoneId, organizationName)Example :
exports.core_gangs:setZoneToOrg(6048, 'f4l')StartWar
Start a war to a specific zone
Usage :
exports.core_gangs:startWar(zoneId)Example :
exports.core_gangs:startWar(6048)IsWarInProgress
Return the status of a zone, if a war is in progress or not
Usage :
exports.core_gangs:isWarInProgress(zoneId)Example :
local result = exports.core_gangs:isWarInProgress(6048)
-- true if war is in progress
-- false if there is no war in progress for this zoneRemovePlayerFromOrganization
Set a zone to a specific organization
Usage :
exports.core_gangs:removePlayerFromOrganization(playerIdentifier)Example :
exports.core_gangs:removePlayerFromOrganization(Player.PlayerData.citizenid)
exports.core_gangs:removePlayerFromOrganization(xPlayer.getIdentifier())RemoveZoneOwner
Remove the owner of a zone and set it neutral
Usage :
exports.core_gangs:removeZoneOwner(zoneId)Example :
local zoneId = exports.core_gangs:removeZoneOwner(6048)GetOrganization
Return the organization of the player or nil
Usage :
exports.core_gangs:getOrganization(identifier)Example :
local organization= exports.core_gangs:getOrganization(10)
-- OR
local organization= exports.core_gangs:getOrganization(Player.PlayerData.citizenid)
-- OR
local organization= exports.core_gangs:getOrganization(xPlayer.getIdentifier())CreateOrganization
Allow to create and assign organization
Usage :
exports.core_gangs:createOrganization(playerSource, organizationName, colorHex, source)Example :
exports.core_gangs:createOrganization(2, "MyNewOrgnization", "#fafafafa", nil)DeleteOrganization
Allow to remove organization
Usage :
exports.core_gangs:deleteOrganization(organizationName, source)Example :
exports.core_gangs:deleteOrganization("MyNexOrgnization", 1)GetZoneOrganization
Return the organization name of a zone id or nil
Usage :
exports.core_gangs:getZoneOrganization(zoneId)Example :
local organization = exports.core_gangs:getZoneOrganization(6048)GetOrganizationZones
Return a list of all zones that an organziation owned
Usage :
exports.core_gangs:getOrganizationZones(organizationName)Example :
local zonesId = exports.core_gangs:getOrganizationZones('f4l')Return :
{
6048,
6049,
8756
}RefreshOrganizationOnAllClient
Resend all organization list to all the client
Usage :
exports.core_gangs:refreshOrganizationOnAllClient()Example :
exports.core_gangs:refreshOrganizationOnAllClient()RefreshZoneOnAllClient
Resend all zones list to all the client
Usage :
exports.core_gangs:refreshZoneOnAllClient()Example :
exports.core_gangs:refreshZoneOnAllClient()RefreshCriminalOnAllClient
Resend all the criminal list to all the client
Usage :
exports.core_gangs:refreshCriminalOnAllClient()Example :
exports.core_gangs:refreshCriminalOnAllClient()RefreshBountyOnAllClient
Resend all the bounties to all the client
Usage :
exports.core_gangs:refreshBountyOnAllClient()Example :
exports.core_gangs:refreshBountyOnAllClient()Last updated