Darkrp jobs.

Okay let me lay this out in a bigger picture, lets say I join a darkrp server and get the job as mob boss and there is also a job mob hitman, but the only way for you to become mob hitman is to be promoted by the mob boss you cannot vote, and you cannot pick it, I know its possible because I have seen it before, if anyone could link me to a tutorial or point me in the general direction or give me some examples I would very much be in your gratitude.

Updated, please help.

o hai thar, joe! :smiley:

Do You Mean Like Having It As Gangster>Mobboss>Mob Hitman?

Its like when your a police officer and then you can promote your self to chief typing /chief but lets say I was a mob boss and you where a gangster, there is a third mob job as mob hitman but the only way for you to be a mob hitman is if I as the mob boss type /mobhit “best4bond”

Sub Teams?
Look at some coding of the CHIEF and POLICE

Look

Police

TEAM_POLICE = AddExtraTeam(“Civil Protection”, Color(25, 25, 170, 255), “models/player/police.mdl”, [[The protector of every citizen that lives in the city .
You have the power to arrest criminals and protect innocents.
Hit them with your arrest baton to put them in jail
Bash them with a stunstick and they might learn better than to disobey
the law.
The Battering Ram can break down the door of a criminal with a warrant
for his/her arrest.
The Battering Ram can also unfreeze frozen props(if enabled).
Type /wanted <name> to alert the public to this criminal
OR go to tab and warrant someone by clicking the warrant button]], {“arrest_stick”, “unarrest_stick”, “weapon_glock2”, “stunstick”, “door_ram”, “weaponchecker”, “weapon_doorknock”, “item_ammo_pistol”}, “cp”, 4, 65, 0, true, true)

TEAM_POLICE (regular cop is voted)

Now, you look at the chief

TEAM_CHIEF = AddExtraTeam(“Civil Protection Chief”, Color(20, 20, 255, 255), “models/player/combine_soldier_prisonguard.mdl”, [[The Chief is the leader of the Civil Protection unit.
Coordinate the police forces to bring law to the city
Hit them with arrest baton to put them in jail
Bash them with a stunstick and they might learn better than to

disobey the law.
The Battering Ram can break down the door of a criminal with a
warrant for his/her arrest.
Type /wanted <name> to alert the public to this criminal
Type /jailpos to set the Jail Position]], {“arrest_stick”, “unarrest_stick”, “weapon_deagle2”, “stunstick”, “door_ram”, “weaponchecker”, “weapon_doorknock”, “item_ammo_pistol”}, “chief”, 1, 75, 0, false, true, TEAM_POLICE)

it has
TEAM_POLICE
at the end which certifies it is sub group of Police,

so something like this.

TEAM_GANGSTERPICKER = AddExtraTeam(“Gangster Door Picker”, Color(75, 75, 75, 255), “models/player/group03/male_01.mdl”, [[The lowest person of crime.
A gangster generally works for the Mobboss who runs the crime family.
The Mobboss sets your agenda and you follow it or you might be punished.]], {“weapon_doorknock”, “lockpick”, “unarrest_stick”}, “picker”, 3, 45, 0, false, false, TEAM_GANG)

Wont this allow gangsters to freely switch to gangsterpicker other then being promoted by the mob boss?

He wants a team nobody can choose to be, the mob boss has to use a command to make you one if you are a gangster already

Yes that’s what im looking for, but that information you provided will greatly help me as well.

Yes it will allow them to be freely able to go to gangster picker,

its /gangster then /picker and ur it.

You have to create a module for it to be promoted.

Could you link me to any references/tutorials for modules?

Here is an example from DarkRP, (sleep)

KnockoutTime = 5

function ResetKnockouts(player)
player.SleepRagdoll = nil
player.KnockoutTimer = 0
end
hook.Add(“PlayerSpawn”, “Knockout”, ResetKnockouts)

function KnockoutToggle(player, command, args, caller)
if not player.SleepSound then
player.SleepSound = CreateSound(player, “npc/ichthyosaur/water_breath.wav”)
end
if player:Alive() then
if player.KnockoutTimer and player.KnockoutTimer + KnockoutTime < CurTime() then
if player.Sleeping and ValidEntity(player.SleepRagdoll) then
player.SleepSound:Stop()
local ragdoll = player.SleepRagdoll
local health = player:Health()
player:Spawn()
player:SetHealth(health)
player:SetPos(ragdoll:GetPos())
player:SetAngles(Angle(0, ragdoll:GetPhysicsObjectNum(10):GetAngles().Yaw, 0))
player:UnSpectate()
player:StripWeapons()
ragdoll:Remove()
if player.WeaponsForSleep and player:GetTable().BeforeSleepTeam == player:Team() then
for k,v in pairs(player.WeaponsForSleep) do
player:Give(v)
end
local cl_defaultweapon = player:GetInfo( “cl_defaultweapon” )
if ( player:HasWeapon( cl_defaultweapon ) ) then
player:SelectWeapon( cl_defaultweapon )
end
player:GetTable().BeforeSleepTeam = nil
else
GAMEMODE:PlayerLoadout(player)
end
player.WeaponsForSleep = {}
local RP = RecipientFilter()
RP:RemoveAllPlayers()
RP:AddPlayer(player)
umsg.Start(“DarkRPEffects”, RP)
umsg.String(“colormod”)
umsg.String(“0”)
umsg.End()
RP:AddAllPlayers()
if command == true then
player:Arrest()
end
player.Sleeping = false
else
player.WeaponsForSleep = {}
for k,v in pairs(player:GetWeapons( )) do
player.WeaponsForSleep[k] = v:GetClass()
end
local ragdoll = ents.Create(“prop_ragdoll”)
ragdoll:SetPos(player:GetPos())
ragdoll:SetAngles(Angle(0,player:GetAngles().Yaw,0))
ragdoll:SetModel(player:GetModel())
ragdoll:Spawn()
ragdoll:Activate()
ragdoll:SetVelocity(player:GetVelocity())
ragdoll.OwnerINT = player:EntIndex()
player:StripWeapons()
player:Spectate(OBS_MODE_CHASE)
player:SpectateEntity(ragdoll)
player.IsSleeping = true
player.SleepRagdoll = ragdoll
player.KnockoutTimer = CurTime()
player:GetTable().BeforeSleepTeam = player:Team()
–Make sure noone can pick it up:
SPropProtection.PlayerMakePropOwner(player, ragdoll)
local RP = RecipientFilter()
RP:RemoveAllPlayers()
RP:AddPlayer(player)
umsg.Start(“DarkRPEffects”,RP)
umsg.String(“colormod”)
umsg.String(“1”)
umsg.End()
RP:AddAllPlayers()
player.SleepSound = CreateSound(ragdoll, “npc/ichthyosaur/water_breath.wav”)
player.SleepSound:PlayEx(0.10, 100)
player.Sleeping = true
end
end
return “”
else
Notify(player, 1, 4, “Sleep is disabled when you are dead.”)
return “”
end
end
AddChatCommand("/sleep", KnockoutToggle)
AddChatCommand("/wake", KnockoutToggle)
AddChatCommand("/wakeup", KnockoutToggle)

local function DamageSleepers(ent, inflictor, attacker, amount, dmginfo)
local ownerint = ent.OwnerINT
if ownerint and ownerint ~= 0 then
for k,v in pairs(player.GetAll()) do
if v:EntIndex() == ownerint then
if attacker == GetWorldEntity() then
amount = 10
dmginfo:ScaleDamage(0.1)
end
v:SetHealth(v:Health() - amount)
if v:Health() <= 0 and v:Alive() then
v:Spawn()
v:UnSpectate()
v:SetPos(ent:GetPos())
v:SetHealth(1)
v:TakeDamage(1, inflictor, attacker)
if v.SleepSound then
v.SleepSound:Stop()
end
ent:Remove()
end
end
end
end
end
hook.Add(“EntityTakeDamage”, “Sleepdamage”, DamageSleepers)

Scary, I cant understand a lick of it, ill relay it to a friend hopefully he can translate.