Advertisement
TheCodingBeast

Demote mayor on death

Mar 14th, 2014
3,513
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.86 KB | None | 0 0
  1. TEAM_MAYOR = DarkRP.createJob("Mayor", {
  2.     color = Color(150, 20, 20, 255),
  3.     model = "models/player/breen.mdl",
  4.     description = [[The Mayor of the city creates laws to govern the city.
  5.     If you are the mayor you may create and accept warrants.
  6.     Type /wanted <name>  to warrant a player.
  7.     Type /jailpos to set the Jail Position.
  8.     Type /lockdown initiate a lockdown of the city.
  9.     Everyone must be inside during a lockdown.
  10.     The cops patrol the area.
  11.     /unlockdown to end a lockdown]],
  12.     weapons = {},
  13.     command = "mayor",
  14.     max = 1,
  15.     salary = GAMEMODE.Config.normalsalary * 1.89,
  16.     admin = 0,
  17.     vote = true,
  18.     hasLicense = false,
  19.     mayor = true,
  20.     PlayerDeath = function(ply)
  21.         if ply:Team() == TEAM_MAYOR then
  22.             ply:changeTeam( TEAM_CITIZEN, true )
  23.             for k,v in pairs( player.GetAll() ) do
  24.                 DarkRP.notify(v, 1, 4, "The mayor has been killed!")
  25.             end
  26.         end
  27.     end,
  28. })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement