DarkRP.Player.ChangeAllowed
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: | |
BBCode Link: | [b][url=http://wiki.darkrp.com/index.php?title=DarkRP.Player.ChangeAllowed]Player:ChangeAllowed[/url][/b] |
Examples[edit]
Description | Sets if the player is banned or not to a global table. |
---|---|
Used on | |
Code | CopBannedPlayers = {}
function CheckPlayer( ply )
if ply:ChangeAllowed(TEAM_POLICE) == true then
--Continue
else
table.insert(CopBannedPlayers, ply)
end
end
|
Output | N/A |
Additional Notes[edit]
- True = Allowed and not Banned, False = Banned