DarkRP.Player.ChangeAllowed

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:ChangeAllowed(string team)
Description:
Returns true or false depending on if the player is allowed, true means he/she is not banned.
Returns: boolean
Part of Library: Player
Realm: NewerServer.png
BBCode Link: [b][url=http://wiki.darkrp.com/index.php?title=DarkRP.Player.ChangeAllowed]Player:ChangeAllowed[/url][/b]

Examples

DescriptionSets if the player is banned or not to a global table.
Used onNewerServer.png
Code
CopBannedPlayers = {}
function CheckPlayer( ply )
	if ply:ChangeAllowed(TEAM_POLICE) == true then
		--Continue
	else
		table.insert(CopBannedPlayers, ply)
	end
end
OutputN/A


Additional Notes

  • True = Allowed and not Banned, False = Banned