GetPlayerTeam

From GT-MP
Jump to: navigation, search
GetPlayerTeam
Shared Function
Utilities-terminal.png Server-Side System-users.png Client-Side
Csharp.png C# Javascript.png JavaScript

This function returns the team of the given player.


Syntax

API.getPlayerTeam(Client player);

Required Arguments

  • player: parameter input should be in Client type.

Usage example(s)

/myteam command which tells what your team is:

In C#
Server-Side Function

[Command("myteam")]
public void CMD_MyTeam(Client player)
{
    API.sendChatMessageToPlayer(player, "Your team is: " + API.getPlayerTeam(player));
}

References