[DarkRP] How do I set job body groups on spawn?

I am using a player model from this (http://steamcommunity.com/sharedfiles/filedetails/?id=173932955) addon and would like to know how to set bodygroups on spawn for different jobs. All help is greatly appreciated.


TEAM_CITIZEN = DarkRP.createJob("Citizen", {
   color = Color(0, 0, 0, 255),
   model = {""YOUR PLAYER MODEL PATH HERE" FIND ADDON IN GMAD AND OPEN MODEL PATH "},
   description = [[Testing]],
   weapons = {},
   command = "citizen",
   max = 100,
   salary = 250,
   admin = 0,
   vote = true,
   hasLicense = true,
   candemote = true,
})

Honestly if you cannot read the model text then you should not have a server. This goes in addons/darkrpmodification/custom_things/jobs.lua

Thank you for your help, although as you can see below I already have the model implemented. The problem is setting the default body groups when a player changes to this job.

TEAM_OFFICER = DarkRP.createJob(“Officer”, {
color = Color(0, 0, 0, 255),
model = {
“models/player/scifi_male_02.mdl”
},
description = [[You are a officer, a high ranking member of the military.]],
weapons = {“weapon_752_de10”},
command = “officer”,
max = 10,
salary = 45,
admin = 0,
vote = false,
hasLicense = false,
category = “Non-comabt”,
})

So then you should add the model to every job you have? Or just change the base citizen model to that. It depends on what job they change to. I do not believe there is a code for allowing one model for every job so just add that model to every job I guess.

I don’t think DarkRP has support for that out of the box, and if I’m correct you could probably write a script to check for a team change and set the bodygroups you want when the player spawns into their new job

Also next time you need help with dev stuff don’t forget about the developer discussion forum

[editline]18th April 2016[/editline]

Try

http://wiki.darkrp.com/index.php/Hooks/Shared/OnPlayerChangedTeam

That’s a bummer, but thanks for the help. I’m going to head over there now, see if they can help me :smile:.