Mayor doesn't demote on death
I own a dark rp and whenever we use this code on our job which was what apparently works it doesn't work.
Does anyone know how to make the mayor demote on death?
TEAM_MAYOR = DarkRP.createJob("Mayor", {
color = Color(255, 0, 0, 255),
model = "models/player/breen.mdl",
description = [[The Mayor of the city creates laws to govern the city. As the mayor you can control the city through your computer in your office and manage the city's funds and resources.]],
weapons = {},
command = "mayor",
max = 1,
salary = 800,
admin = 0,
vote = true,
hasLicense = false,
mayor = true,
category = "Police",
level = 25,
PlayerDeath = function(ply, weapon, killer)
ply:teamBan()
ply:changeTeam(GAMEMODE.DefaultTeam, true)
if killer:IsPlayer() then
DarkRP.notifyAll(0, 4, "The mayor has been killed and is therefore demoted.")
else
DarkRP.notifyAll(0, 4, "The mayor has died and is therefore demoted.")
end
end
})
i believe its in the settings.lua/disabled_defaults.lua in darkrpmodificationmaster/darkrp_config
i dont know the exact line but i remember a setting in there.