Hooks/Server/playerCanChangeTeam

From DarkRP
Jump to navigation Jump to 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[edit]

  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[edit]

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

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