Functions/Player/Server/changeTeam

From Official DarkRP Wiki
Jump to navigation Jump to search
Function
Function name Player:changeTeam(number team, boolean force, boolean suppressNotification)
Description:
Change the team of a player.
Returns: boolean allowed
Part of Library: Player
Realm: NewerServer.png
BBCode Link: [b][url=http://wiki.darkrp.com/index.php?title=Functions/Player/Server/changeTeam]Player:changeTeam[/url][/b]

Function parameters

  1. team (number)
  2. The team (job number).

  3. force (boolean) (optional)
  4. Force the change (ignore restrictions that players usually have to get the job).

  5. suppressNotification (boolean) (optional)
  6. Suppress any notifications.


Function return values

  1. allowed (boolean)
  2. Whether the player is allowed to get the job.