Exports (Server Side)
Server-sided exports
GetGroupLeader
Returns the group leader’s id.
local leaderSrc = exports["bd-groups"]:GetGroupLeader(groupId)
groupId (number):
The group id
IsGroupLeader
Returns whether or not the player is the group leader.
local isLeader = exports["bd-groups"]:IsGroupLeader(groupId, playerSource)
groupId (number):
The group idplayerSource (number):
The player’s id you want to check
GetGroupMembers
Returns the group members by the given group id.
local members = exports["bd-groups"]:GetGroupMembers(groupId)
groupId (number):
The group id
FindGroupByMember
Returns the group id of the group the player is in.
local groupId = exports["bd-groups"]:FindGroupByMember(playerSource)
playerSource (number):
The player’s id
GetJobStatus
Returns the job status of the group
local status = exports["bd-groups"]:GetJobStatus(groupId)
groupId (number):
The group’s id
SetJobStatus
Sets the job status for the given group
exports["bd-groups"]:SetJobStatus(groupId, status)
groupId (number):
The group’s idstatus (string ):
The status to set
GetGroupMembersCount
Returns the amount of members in the group
local membersAmount = exports["bd-groups"]:GetGroupMembersCount(groupId)
groupId (number):
The group’s id
CreateBlipForGroup
Creates a blip for everyone in the group.
--[[
local blipData = {
coords = Jobs[groupId]['CocaineSuppliesLocation'],
color = 37,
alpha = 255,
sprite = 514,
scale = 0.62,
label = "Cocaine Supplies",
route = true,
routeColor = 1,
}
]]--
exports["bd-groups"]:CreateBlipForGroup(groupId, blipName, blipData)
groupId (number):
The group’s idblipName (string):
The blip name that the blip will be identified by.blipData (table):
The blip data
RemoveBlipForGroup
Removes the blip by the given name for the group.
exports["bd-groups"]:RemoveBlipForGroup(groupId, blipName)
groupId (number):
The group’s idblipName (string):
The blip’s name created with
DestroyGroup
Destroys the given group.
exports["bd-groups"]:DestroyGroup(groupId)
groupId (number):
The group’s id
NotifyGroup
Sends a notification to everyone in the group.
exports["bd-groups"]:NotifyGroup(groupId, message, timeout)
groupId (number):
The group’s idmessage (string):
The message of the notificationtimeout (number):
The time for the notification to dissappear (in milliseconds)
DoesGroupExist
Returns whether or not the given group id exists.
local exists = exports["bd-groups"]:DoesGroupExist(groupId)
groupId (number):
The group’s id