Exports & Events
All exports and events available to integrate this resource into others.
Suggestions?
If you wish to have any exports and or events added, please head over to our Discord and create a suggestion post. We are happy to allow for easier integration within other resources.
Client Exports
Is In Gang
A function to see if you are in a gang or not. Example:
---@return boolean exports["zyke_gangphone"]:IsInGang()
Retrieving Player's Gang Id
Returns the players' gang id. If you pass in a valid server id, it will return the gang id for that player, or can be left as nil to use the client's server id. Example:
---@param plyId number | nil ---@return string | nil exports["zyke_gangphone"]:GetPlayerGangId(plyId)
Getting Player Rank
Will return the player's rank table and index for the rank in their gang's data. Example:
---@return Rank | nil, number | nil exports["zyke_gangphone"]:GetRank()
Getting Member Table
Export to return the member table for that player. Example:
---@return Member | nil exports["zyke_gangphone"]:GetMember()
Get Gang Name
Returns the gang name. Used as a display label. Example:
---@return string | nil exports["zyke_gangphone"]:GetGangName()
Get Gang
Returns the entire gang table stored on the client side. This is lots of information and should not be fetched too often. Example:
---@return GangData | nil exports["zyke_gangphone"]:GetGang()
Get Gang Color
Returns the gang color in a table with rgb keys. Example:
---@return table | nil exports["zyke_gangphone"]:GetGangColor()
Server Exports
Get Gang
Get gang from gang id. The
copy
parameter should only be used internally. Example:---@param gangId string ---@param copy boolean? @If set to true, it will return a copy of the data instead ---@return table | nil exports["zyke_gangphone"]:GetGang(gangId, copy)
Get Player Gang Id
Get a player's gang id from their player id, also known as source. Example:
---@param playerId integer ---@return string | nil exports["zyke_gangphone"]:GetPlayerGangId(playerId)
Get Player Gang
Get the player's gang from their player id, also known as source. Example:
---@param playerId integer ---@return GangData | nil exports["zyke_gangphone"]:GetPlayerGang(playerId)
Get Player Gang By Identifier
Get the player's gang from their character identifier. Example:
---@param plyIdentifier string ---@return GangData | nil exports["zyke_gangphone"]:GetPlayerGangByIdentifier(plyIdentifier)
Get Gang Turf Standing
Returns the overall standing in turf wars. Can be used to check if a gang can attack / defend turfs, displaying their overall strength and be used as a reputation. Example:
---@param gangId string ---@return integer exports["zyke_gangphone"]:GetGangTurfStanding(gangId)
Last updated
Was this helpful?