Garry's Mod Leaks

bodyGroupr - The friendly DarkRP bodygroup manager!

Submitted by TheoZbeul, , Thread ID: 198831

Banned without appealing rights
24-02-2021, 12:53 AM
[font="Hind Vadodara", sans-serif]
Content locked
This content has been locked. Please login or register in order to unlock it.

[font="Hind Vadodara", sans-serif]Customise playermodel appearance using bodygroups and skins![/font]

[font="Hind Vadodara", sans-serif][font="Hind Vadodara", sans-serif]Tired of downloading so many playermodels?
Too often have we needed to sit down and wait for hundreds of megabytes of playermodels to download. It's a pain, and we're sick of it.
But what if we didn't have to? What if there was an addon that allowed us to unlock the full potential of many workshop playermodel packs?
[b]Bodygroups[/b], if you haven't heard of them by now, are small changes to a playermodel's appearance (such as clothing) which are included within the model's files. Rather than having separate playermodels for each different item of clothing, bodygroups allow you to interchange, switch, swap, and shuffle your playermodel's appearance to any combination you desire.
When using bodyGroupr, these bodygroups are no longer locked away in the code, and can be accessed freely by the players. This way, you (the owner) can minimize the disk space and network bandwidth that gets wasted each time a new player joins!
"But Arizard, there is no way to change bodygroups in DarkRP!" you say. "The default bodygroup editor is drab and boring, and it's not even usable on DarkRP!"
[b]Fear not, citizen! bodyGroupr[/b] is a fast and easy way to customise your playermodel's bodygroups. This addon lets you shuffle between bodygroups that are allowed by the server owner, to customise the appearance of your particular job, just the way you like it.
For example: You want citizens, medics and gangsters to look totally different, but you only want one playermodel pack! The answer is simple: [b]bodyGroupr[/b]. Using this addon, you (the owner) can specify which bodygroups are available to certain jobs. Citizens will have access to all the neutral bodygroups, medics will have access to the doctor/medic bodygroups, and gangsters will have access to the thick, grey rebel outfits in the playermodel pack. The best part is - you only need one playermodel pack for all three jobs, instead of one pack for each job. This saves data, power and most importantly, time.
  • [b]Different skins for different jobs[/b]

  • [b]Different bodygroups for different jobs[/b]

  • [b]Bodygroups can be configured to increase a player's armor[/b]

  • [b]Easy to install[/b]

  • [b]Easy to configure[/b]

  • [b]Easy to use, with an intuitive interface[/b]

  • [b]Supports bodygroups AND skins (including facemaps)[/b]

  • [b]Lifetime support from me[/b]

  • [b]Cheap as chips[/b]

  • [b]Super compatible with [/b]Enhanced Citizens V4 by Zelpa

  • [b]French translation[/b] options available

  • [b]German translation[/b] options available (thanks to Ultimate RP!)
[font="Hind Vadodara", sans-serif][font="Hind Vadodara", sans-serif]How do I install it?
  • Simply drag and drop the bodygroupr folder into your addons directory

  • Configure your jobs.lua file to specify which bodygroups should be available to certain jobs - check the README.lua in the bodygroupr folder!

  • Restart your server
[font="Hind Vadodara", sans-serif][font="Hind Vadodara", sans-serif]How do I use it?
  • Hold C to access the context menu

  • Click on the bodyGroupr icon in the top left of the screen

  • Select your bodygroups - They will be applied as you edit them.
[font="Hind Vadodara", sans-serif][font="Hind Vadodara", sans-serif]Configuration
The below code snippet is an example configuration. It includes setting the playermodel, the bodygroups, and the skins for a Job. It also has an example of setting the armor parameters for each bodygroup.
[font=SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace]-- Arizard's bodyGroupr
-- How to edit jobs.lua

--Simple Example
TEAM_CITIZEN = DarkRP.createJob("Citizen", {
color = Color(20, 150, 20, 255),
model = {
description = [[The Citizen is the most basic level of society you can hold besides being a hobo. You have no specific role in city life.]],
weapons = {},
command = "citizen",
max = 0,
salary = GAMEMODE.Config.normalsalary,
admin = 0,
vote = false,
hasLicense = false,
candemote = false,

-- !!! LOOK HERE !!! --

skins = {4,5,6}, -- example configuration
bodygroups = {
["torso"] = {0,2,3},
["legs"] = {0,1,2,3,4,5},
["beanies"] = {0,1,2},
["glasses"] = {0,1}, -- these are all examples, please don't actually copy-paste them because they might not work.
} -- check below for playermodels that support this addon, and use the sandbox playermodel selector to check bodygroups.

armorbodygroups = { -- configure armor to give players here (for Prior). first number in the pair is the bodygroup, second number is how much armor to give.
-- eg. in this case, setting the "torso" bodygroup to 2 gives the player 30 armor.
-- Note that armor is only given on spawn, and is reduced if the player takes off the bodygroup.
["torso"] = { {0,10},{1,20}, {2,30} },
["legs"] = {{0,12},{1,13},{2,14}},


-- some supported playermodels:

-- -- Enhanced Citizens Playermodels [Zelpa]
-- -- Halo 3 Spartan Playermodels [Vipes]
-- -- Metropolice Pack [DPotatoMan]

Closets are an in-world alternative way to access the bodyGroupr interface. Players can press E on a Closet and it will open the bodyGroupr menu. Server owners can decide to either have permanent, in-world Closets which spawn when the server starts, or they can add the Closet as a shipment, letting players purchase the Closet to edit their appearance.
To make your server Closets-only, navigate to bodygroupr/lua/bodyman/bodyman_config.lua and edit the BODYMAN.ClosetsOnly = false line so that it equals true. This means players will need to use a Closet to access the menu, and they can no longer edit their appearance using the C menu.
If you want permanent Closets:
  • Hold C to access the context menu

  • Click on the bodyGroupr Admin Menu icon (It may be abbreviated to "bodyGroupr Ad…" or something similar)

  • Use the menu to spawn Closets at certain parts of the map

  • Click "Save Closets" in the Admin Menu. They will now respawn when the map changes.
[font="Hind Vadodara", sans-serif][font="Hind Vadodara", sans-serif]If you want players to have to purchase Closets:
  • Simply create a new entity in your entities.lua file, using the entity class bodyman_closet
[font="Hind Vadodara", sans-serif][font="Hind Vadodara", sans-serif]Playermodel Support
A great playermodel pack to try is Enhanced Citizens v4 by Zelpa - it's 100% compatible with bodyGroupr (in fact, it bodyGroupr was created specifically with this playermodel pack in mind!). If you're looking for more options, try Extended Citizens by Zelpa, which adds even more bodygroups and skins to the existing models in Enhanced Citizens v4.
Looking for more quality DarkRP addons? Visit my profile here!
Works with DarkRP 2.5.X and 2.6.X[/font]

Users browsing this thread: 1 Guest(s)