🤝 Teams
Documentation relating to the st_teams.
1. Installation
To install st_teams :
- Download st_teams from your keymaster
- Unzip the folder and drop it in your resource folder
- Add this ensure in your server.cfg
ensure st_teams
2. Usage
Press F10 and start manageing your team!
3. For developers
Data Structure
owner
: table
source
: number - The source of the owneridentifier
: string - The identifier of the ownername
: string - The player name of the owner
uuid
: string - The team UUIDname
: string - The team name
members
: table
source
: number - The member sourceidentifier
: string - The member identifiername
: string - The member name
invites
: table
source
: number - The invited player sourceidentifier
: string - The invited player identifiername
: string - The invited player name
Events
Events which are triggered when a team action occurs
Server st_teams:teamAction
Syntax
RegisterNetEvent("st_teams:teamAction", function(uuid, actionType, target) end)
Parameters
uuid
: string
The uuid of the team
actionType
: string
inviteMember
: string - When a member is invited to a teamremoveInvite
: string - When a member has invite removeddeclineInvite
: string - When a member declines an invitetogglePublic
: string - When a team is going public or not in Teams HubaddPlayer
: string - When a member has been added to the teamremovePlayer
: string - When a member has been removed from the teamleaveTeam
: string - When a member has left the teamCreateTeam
: string - When a team is createddeleteTeam
: string - When a team is deletedchangeownership
: string - When a teams ownership is changedchangename
: string - When a teams name is changed
Exports
Server Get The Team from UUID
Returns the team from uuid
-- @param uuid - The Team UUID
-- @return Team
local team = exports.st_teams:getTeamFromUUID(uuid)
Server Get The Team from UUID
Returns the team from uuid
-- @param uuid - The Team UUID
-- @return Team
local team = exports.st_teams:getTeamFromUUID(uuid)
Server Leave the team
Makes the user leave the team
-- @param source - The source which leaves the team
exports.st_teams:leaveTeam(source)
Server Add player to team
Adds a target to the team
-- @param source - The source which adds the target to the team
-- @param target - The target which is added to the team
exports.st_teams:AddPlayerToTeam(source, target)
Server Is Player in Team
Returns if player is in a team or not
-- @param source - The source which is in a team or not
-- @return Boolean
local isInTeam = exports.st_teams:IsPlayerInTeam(source)
Server Create Team
Creates a team
-- @param source - The source which creates the team
-- @param name - The name of the team (optional)
-- @return Team
local team = exports.st_teams:getTeamFromUUID(uuid)