From DarkRP
Jump to navigation Jump to search
Hook name canChangeJob(Player ply, string job)
Whether a player can change their job. NOTE: This is only for the /job comand! The hook for changing to a pre-existing job is playerCanChangeTeam.
Returns: boolean canChangeJob, string message, string replace
Realm: NewerServer.png
BBCode Link: [b][url=http://wiki.darkrp.com/index.php?title=Hooks/Server/canChangeJob]canChangeJob hook[/url][/b]


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

  3. job (string)
  4. The job name (what the player entered in the /job command).

Return values[edit]

  1. canChangeJob (boolean)
  2. Whether the player can change their job name (doesn't change their team).

  3. message (string)
  4. The message to show when the player cannot take the job. Only useful when canChangeJob is false.

  5. replace (string)
  6. A replacement for the job name. Only useful when canChangeJob is true.