Garry's Mod

Garry's Mod

52 ratings
Florian's Script - Character System
   
Award
Favorite
Favorited
Unfavorite
Content Type: Addon
Addon Type: Server content
Addon Tags: Roleplay, Realism
File Size
Posted
Updated
176.727 KB
6 Mar, 2020 @ 9:54am
12 Mar, 2024 @ 12:33pm
22 Change Notes ( view )

Subscribe to download
Florian's Script - Character System

Description
This addon was originally created for the French community "Combined-Roleplay", after its closure and following requests from some server creators, I decided to rewrite it from scratch in order to be published on the Steam Workshop.

After several hours of work, I recreated this addon by trying to make it easily modifiable through various ways, the code of the addon has been made much more readable (and commented) than the first versions.

Here are the features of the addon :
  • Adding a physical description and identification number system.
  • Saves many player variables (Health, armor, position, hunger, skin, job, and much more...).
  • Change settings and operation of the addon via various means (parameters, events (hook)...).
  • Access to the addon commands through a special menu.
  • Characters control through various ways (administration menu, context menu, commands...).
  • Compatibility with the gamemode Sandbox, DarkRP and derived.
  • Compatibility with the inventory addon: ItemStore[www.gmodstore.com].
  • Compatibility of menus with the vast majority of screen sizes/resolutions (responsive).
  • Multi-language support (English and French translation included by default).
  • Optimization of the front/back-end to minimize the impact of the addon's operation on the server and for the players.

This addon saves the data in a new format recently allowed in Garry's Mod: JSON. This allows easy editing of character data. However, in the future, it will be possible to save through a SQLite/MySQL database to improve performance.

Here is a list of all the items saved by the addon :
  • Roleplay name
  • Health
  • Armor
  • Position/Angle
  • Playermodel
  • Skin
  • Weapons
  • Ammunition
  • Bodygroups
  • Identification number (added by the addon)
  • Physical description (added by the addon)
  • Hunger (DarkRP)
  • Jobs (DarkRP)
  • Money (DarkRP)
  • Wanted notice (DarkRP)
  • Jail (DarkRP)
  • Inventory (ItemStore)
  • Storage (ItemStore)
  • Whatever you want...

All technical information about the addon.

Github repository: https://github.com/FlorianLeChat/FScript-Character-System

Don't forget to report any problem (bugs, security vulnerability...) directly in the comments, even if you have any suggestion to make this script better.

Dedication to Sam for the creation of the addon logo.

INFORMATION for english speaking users: I'm French, so do not hesitate to report any translation problem in the addon or on the workshop page, I would be happy to correct and improve it.

If you like this addon, don't forget to evaluate it, it would make me extremely happy. Thank you! ☺
77 Comments
HexStrain 7 Aug, 2024 @ 11:20am 
Thank you so much, this addon is really great. U did a good job
Florian #  [author] 7 Aug, 2024 @ 9:56am 
Unfortunately I haven't been active on Garry's Mod community for a few years now, the addon is maintenance only and won't be receiving any more features in the near future. However, I try to keep my addons working through Garry's Mod updates.
AliBabaHajjHasan 7 Aug, 2024 @ 2:54am 
a way to do factions?
Florian #  [author] 17 May, 2024 @ 11:32pm 
My addon doesn't interact with God Mode in any way, I just use functions provided with DarkRP. If you experience this kind of issue, try to see if it's another addon that's adding this behavior.
HexStrain 13 May, 2024 @ 12:23pm 
Hey Florian, forget about the previous question i asked. I solved it. But i have another problem. Some players have god mode, why does this happen?
Florian #  [author] 15 Jan, 2024 @ 11:17pm 
I can guarantee that this addon is perfectly compatible with all player models (because it doesn't use predefined playermodels). This code simply checks if the player is already using a registered model, if not, it will check if it's a valid model (everything but not a red ERROR) at server level and if it's invalid, then it will use a function to define a replacement model (which will depend on your gamemode, see below) to avoid defining an ERROR.

https://github.com/FlorianLeChat/FScript-Character-System/blob/master/lua/fscript_modules/core/sh_functions.lua#L112-L139

If you're on DarkRP, it will use a job model, and if not, it will use an HL2 Citizen model which doesn't include Kleiner/Magnus. You should check your addons to see if any of them might conflict with my character system.
HexStrain 15 Jan, 2024 @ 2:57pm 
I have a problem and i don't know if this addon causes it or not. So i'm writing here.

I use custom PM's in my server. But some people seem to spawn with default scientist PM's (Kleiner, Magnus) after creating a character. I explored the codes and found this:

if PlayerModel ~= ply:GetModel() then
if util.IsValidModel(PlayerModel) then
ply:SetModel(PlayerModel)
else
ply:SetModel(FScript.GetDefaultModels()[1])
end
end


Maybe the mod doesn't register my custom PM's and ignores them, then proceeds to use the defaullt models. Could this be the problem?
Florian #  [author] 5 Dec, 2023 @ 4:07am 
Unfortunately, this is probably why people trust GmodStore more than Workshop, for "guaranteed" support.
HexStrain 5 Dec, 2023 @ 3:59am 
yeah yeah... Majority of them dont even give support for their addons
Florian #  [author] 5 Dec, 2023 @ 3:57am 
I guess people now prefer buying stupidly than looking for good addons on the Workshop or making some for their own server...