DarkRP.Player.TeamBan

From Official DarkRP Wiki
Jump to: navigation, search
This page refers to DarkRP 2.4.3. This information may be incorrect as of later versions.
Check here for a up-to-date list of functions.
Function
Function name Player:TeamBan(table team)
Description:
Bans the player from their current team or, if supplied, the team passed into the function.
Returns: nil
Part of Library: Player
Realm: NewerServer.png
BBCode Link: [b][url=http://wiki.darkrp.com/index.php?title=DarkRP.Player.TeamBan]Player:TeamBan[/url][/b]

Examples

DescriptionBans the player from their current team.
Used onNewerServer.png
Code
function AnnoyPlayer( act, ply )
	ply:TeamBan()
	ply:ChatPrint("Lolz " .. act.Nick() .. " just banned you!")
end
OutputN/A


DescriptionBans the player from the TEAM_POLICE team.
Used onNewerServer.png
Code
function BanFromPolice( ply )
	ply:TeamBan(TEAM_POLICE)
end
OutputN/A