ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Server functions
  3. getTeamFromName

Function

getTeamFromName

ServerTeamsIdentical to MTA:SA

Finds a team by its exact name.

Syntax

team getTeamFromName(string teamName)

Arguments

teamNamestring
The name.

Returns

The team or false.

Example

addCommandHandler("dolacz", function(player, cmd, name)
    local team = name and getTeamFromName(name)
    if not team then
        outputChatBox("Nie ma takiej drużyny.", player, 255, 0, 0)
        return
    end
    setPlayerTeam(player, team)
end)