Hooks/Server/playerCanChangeTeam

From Official DarkRP Wiki
Jump to: navigation, search
Hook
Hook name playerCanChangeTeam(Player ply, number team, boolean force)
Description:
Whether a player can change their team.
Returns: boolean canChange, string reason
Realm: NewerServer.png
BBCode Link: [b][url=http://wiki.darkrp.com/index.php?title=Hooks/Server/playerCanChangeTeam]playerCanChangeTeam hook[/url][/b]

Parameters

  1. ply (Player)
  2. The player whom is to change their team.

  3. team (number)
  4. The team number.

  5. force (boolean)
  6. Whether this team change is important.

Return values

  1. canChange (boolean)
  2. Whether the player can change their team.

  3. reason (string)
  4. The reason why the player cannot change their team.