Hello, I recently came across a very nice player model pack that would be great for darkRP. However this pack relies on bodygroups alot, so I was wondering how I would go about using specific body groups in the DarkRP job config
[code]
model = "models/player/themodel.mdl", "the bodygroup i want"
[/code]
Something like that basically.
ALSO I've already read the wiki's and know about entity.SetBodygroup but do not know how to implement it or know if its the correct class to use for this situation. So
If someone could point me in the right direction or even give me an example that would be great.
I'm not expert at it myself. I believe you would want to add a hook for when a player spawns and is a specific class, then you could use the entity.setbodygroup.
Thanks, Ill look into hooking.... Anyone else have a more in-depth answer?
thats as in depth as you get, make a SV file that hooks PlayerSpawn and check if the player is a certain team, and set the bodygroup.
[url]http://wiki.darkrp.com/index.php/DarkRP:CustomJobFields[/url]
You can use the PlayerSpawn field to set the bodygroup
just add something like
[code]
PlayerSpawn = function(ply) ply:SetBodyGroup(stuff) end
[/code]
to the job you want
[QUOTE=Arizard;45297960][url]http://wiki.darkrp.com/index.php/DarkRP:CustomJobFields[/url]
You can use the PlayerSpawn field to set the bodygroup
just add something like
[code]
PlayerSpawn = function(ply) ply:SetBodyGroup(stuff) end
[/code]
to the job you want[/QUOTE]
Thanks! Now how would go about finding the bodygroup numbers and stats?
You can find the bodygroup numbers by right clicking the icon in the spawnmenu and clicking edit icon.
It will show you all the bodygroups to choose from, sequences, and skins. Although this will only work in the sandbox gamemode, or a gamemode based off it that didn't change the spawnmenu. I'm not quite sure what you mean by stats though.
[QUOTE=Arizard;45297960][url]http://wiki.darkrp.com/index.php/DarkRP:CustomJobFields[/url]
You can use the PlayerSpawn field to set the bodygroup
just add something like
[code]
PlayerSpawn = function(ply) ply:SetBodyGroup(stuff) end
[/code]
to the job you want[/QUOTE]
Just to let you guys know, this code should actually be something like:
[code]
PlayerSpawn = function(ply) ply:SetBodygroup(stuff) end
[/code]
SetBodygroup seems to be case sensitive and needs a lower case g or it will spit out a lua error at you.
Hi everyone,i know this thread is quite old but i have the same problem and your codes are not working x_x
I also had this problem and to fix it I had to do:
[CODE]PlayerSpawn = function(ply) return ply:SetBodygroup(stuff) end[/CODE]
Just adding a return worked for me :P
I am really having a big issue with this. Although I have used all of your codes none work.
These are the variations of what I put into my jobs but to no effect.
[CODE]PlayerSpawn = function(ply) return ply:SetBodygroup(Skin, 5) end
PlayerSpawn = function(ply) return ply:SetBodygroup(Skin,5) end
PlayerSpawn = function(ply) return ply:SetBodygroup(1, 5) end
PlayerSpawn = function(ply) return ply:SetBodygroup(1,5) end[/CODE]
Any help would be great thanks :)
Sorry, you need to Log In to post a reply to this thread.