- Documentation
- Server functions
- getPlayerTeam
Function
getPlayerTeam
Returns the player's team.
Syntax
team getPlayerTeam(player thePlayer)Arguments
thePlayerplayer- The player.
Returns
The team or false.
Example
addEventHandler("onPlayerDamage", root, function(attacker)
if attacker and getElementType(attacker) == "player" and getPlayerTeam(attacker) == getPlayerTeam(source) then
outputChatBox("Nie strzelaj do swoich!", attacker, 255, 0, 0)
end
end)