From DarkRP
Jump to navigation Jump to search
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 hooks.


DescriptionCalled when a player attempts to change their job title.
GAMEMODE:canChangeJob(Player ply, string job)
Returnscan_change (boolean): whether the player can change their name to the name given.

msg (string): the message to be shown when the answer is no

replace (string): A replacement of the job name


  • ply (Player)
  • The player who is trying to change their name

  • job (string)
  • The job


    DescriptionOnly citizens can change job, and the job will become "Citizen: <jobname>"
    hook.Add("canChangeJob", "citizens", function(ply, job)
    	if ply:Team() ~= TEAM_CITIZEN then return false, "Only citizens can change job" end
    	return true, nil, "Citizen: " .. job
    Outputwhen saying "/job Prop surf teacher" as citizen, the job will become "Citizen: Prop surf teacher" The player will get a notification when he's not a citizen.