Gmod Stamina System + Editable HUD - Script
Stamina means Endurance in English. Gmod Stamina System + Customisable HUD is a stamina management mod, and movement based on this stamina, it incorporates a gauge system, plus a customisable HUD, it adds the notion of stamina on your Gmod server, which can involve your users to make strategic decisions based on this additional variable that enriches the gameplay of your project. Underwater the Stamina bar will become a blue oxygen bar. Configure restrictions related to Stamina when stamina is at its lowest, for example choose if there is no possibility to jump or run when stamina is at Zero. Make this state of weakness last by activating the breathless mode, the user will have to recover a percentage of his stamina to be able to recover his functions. All this with a fully customizable HUD.
❮
❯
Description of Gmod Stamina System + Editable HUD
Summary:- π Presentation of Gmod Stamina System + Customisable HUD
- π¦ Contents
- πͺ Stamina max Upgrade System
- π Editing options for the stamina bar in the HUD.
- πΉοΈ Commands
- πΎ Save and persistence
- βοΈ Configuration file
- πͺ Examples of Spawnable entities in Gmod Stamina System + Customisable HUD
- π The functions associated with the Player Class and the creation of objects for development
- π Anti b-hopping System for GMod
- βοΈ Compatibility
π Presentation of Gmod Stamina System + Customisable HUD
Improve your gamemode on your Garry's mod server with Gmod Stamina System + Customisable HUD.
Working without any Gamemode this system brings a whole new concept to your server and to the players that can be strategic, or simply bring a touch of realism.
How does it work for the player?
He will run and his stamina will decrease. His stamina drops to zero and he will not be able to continue his sprint, he will see his stamina bar slowly filling up but it will be red. When the stamina bar is red it indicates that the user has reached the minimum threshold of zero, and has entered the state of breathlessness. The state of breathlessness will prevent the user from sprinting irrationally again while juggling with the little stamina that will be recharged, in short it is not realistic. In the configuration you will be able to choose at which level of recovery the breathlessness ends. For example when the player has recovered 20% of his stamina. Then the stamina bar will return to its original color.
Underwater the stamina bar becomes an oxygen bar. The remaining stamina will be the amount of oxygen available. Once the oxygen is at zero you can define if he loses life points or if he loses life directly.
On the item side you can create stamina recharge or upgrade items, define if the stamina max increases with the user level.
What about customization? See the video above. Or the screenshots. You can modulate everything from gameplay rules to stamina and HUD.
π¦ Contents
You will find:
1. A database system for users.
2. A Module of management of the system of stamina according to the ranks: superadmin, admin, moderator, vip, user, etc
3. Modular Stamina bar in the HUD.
4. An oxygen bar that takes over when the user is underwater. The stamina becomes the oxygen.
5. A module to manage the stamina system according to the DARKRP JOBS: mayer, citizen, vip, etc.
6. A customization system for the stamina bar in the HUD (see below or screenshots).
7. A lot of customizable HUD styles (even carrots as stamina bar).
8. Spawnable Stamina regeneration entities and a max Stamina upgrade entity.
9. Stamina related gameplay customization options
10. Full documentation.
πͺ Stamina max Upgrade System
With Gmod Stamina System + Customisable HUD, you will be able to decide if the Stamina max evolve with the level of the player, provided you have a leveling system installed on your server garry's mod, if you find a homemade one in the store / Gmod addons section
It will be possible to choose the upgrade possibilities of the stamina max either by finding a key item (preferably rare to make it valuable), or according to the level of your users. The progress of your users is saved, stamina points to avoid your players disconnecting and reconnecting to recharge their stamina.
π Editing options for the stamina bar in the HUD.
You will have the possibility to customize the stamina bar in all directions in a responsive way.
What is customizable in the HUD of Gmod Health Management + HUD Editor?
1. The position X Y
2. Length and width
3. The background color of the bar
4. The color of the progress bars
5. The color of the text
6. The color of the icon
7. The font of the text
8. Replace default icons with your own by simple image link.
9. 19 HUD styles, circle, horizontal bar, hearts, textual, etc.
10. Changes applicable without rebooting your server.
πΉοΈ Commands
To access the menu the chat command : !stamina
The console command : norda_hud_stamina_system
πΎ Save and persistence
The Stamina Stats Backup System is included. Offer your users a continuation of their next session by progressing with the stats they had at their disconnection, it also avoids the abuse of reloading stats with a simple disconnection.
βοΈ Configuration fileMost of the configuration is done from an interface, which makes the configuration file very minimal.
You will be able to configure:
cfg.FX_to_Open = "F3" -- 0 = Disabled, defines if the menu can be opened with the F1 F2 F3 F4 key.
cfg.Delay_Stamina_Loop = 2 -- Every 2 seconds during a Sprint the Stamina wears out, at stop the Stamina regenerates.
cfg.Custom_Fonts = "Trebuchet24" -- Custom Fonts of the HUD
cfg.MaxStamina_define_per_lvl = 0 -- 0 = User has to buy or find the item that increases his max Stamina, 1 = Max Stamina goes up with user level.
cfg.Stamina_start = 100 -- This is the starting Stamina of the user who starts on your server.
cfg.MaxStamina_gain_per_levelup = 10 -- The additional max Stamina per level up, here the user gains 10 max Stamina points per level.
cfg.MaxStamina_max = 1000 -- Set the max Stamina limit on your server. A player will not be able to have more. Even if he collects upgrade items.
cfg.Stamina_Sprint_Use=20 -- The amount of stamina used during a script. The variable: cfg.Delay_Stamina_Loop above allows to set the delay.
πͺ Examples of Spawnable entities in Gmod Stamina System + Customisable HUD
The addon includes spawnable entities that can be used as examples or tools to enrich the content of your server, e.g. by placing them as loot or merchantable items at a merchant. Spawnable entities can be disabled in the configuration file with the variable, cfg.Enable_Items_Spawnable.
The different spawnable entities are :
Stamina reloads which have the effect of restoring the Stamina of the user who picks them up by pressing USE on it.
The Upgrades of the Stamina max which has the effect to upgrade the max limit of the Stamina points of the user when he picks them up. This max limit is saved and the user keeps the wear and tear and his stats when he disconnects.
The spawnable entities are automatically deleted after 30 seconds by default, this time can be defined in the configuration file.
π The functions associated with the Player Class for developers and the creation of objects for development
1. Glua functions on Client and Server side :
player:Stamina() = Allows you to know the user's Stamina points if you need it for example to limit melee attacks when the player is out of breath.
player:GetMaxStamina() = Allows you to know the user's max Stamina points.
2. Glua's server-side functions :
The following functions allow:
player:addStamina(number) = Allows to give or remove the Stamina. For example. 10 = Adds 10 of Stamina to the stamina it already has. -10 Removes 10. He can't go below Zero.
player:setStamina(number) = Set the Stamina of the player.
Manage max Stamina via function items:
player:addMaxStamina(number) = Allows to increase or decrease the max Stamina. If you want to create entities that upgrade or downgrade max stamina points.
player:setMaxStamina(number) = Allows you to set the max Stamina points of the player.
π Anti b-hopping system for GMod
Without really wanting to, the system brings an anti b-hopping system since you can activate a stamina wear when he jumps and limit the jump when he has no stamina left. No more players jumping around for nothing. Perfect for a serious roleplay setting.
βοΈ Compatibility
Still works even without gamemode installed.
Path: garrysmod/addons/norda_hud_stamina_system
- The AddWorkshop function is automatically added to the script server file and can be deactivated from the configuration file. : resource.AddWorkshop( 2717708756 )
- To add gmod workshop resources to your collection : Gmod Stamina System + Editable HUD [Content Only] | Gmod Workshop
The console command : norda_hud_stamina_system
Or via the shortcuts of my administration system if you don't want to have fun remembering all the commands of my scripts.
ON : Stamina enabled
OFF : Stamina deactivated
ON : The player has his stamina regenerated during rest.
OFF: The player has no regeneration of his stamina.
ON : The player will get his stats back when he logs in again
OFF: The player will start over again when reconnecting.
ON: The player is breathless when his stamina drops to zero. The player can no longer run or jump while out of breath. The breathlessness ends when he has recovered 20% of his stamina (Editable value)
OFF: Breathlessness does not exist.
ON: The player uses stamina when he jumps. Perfect for a software anti b-hopping and to put the player in stressful situations when he is chased by the living dead.
OFF: The player can b-hop without any problem to break the seriousness and realism of your server well.
Go to menu / Mod / stamina_is_oxygene : ON | OFF
ON : The player will see his stamina bar become an oxygen bar underwater.
OFF : Oxygen deactivated
ON : The player will respawn with the stamina bar full.
OFF: The player will respawn with the stamina at zero.
ON: The player will log in with the full stamina bar on his first login.
OFF: The player will log in with the empty stamina.
You will be able to change, X Y position, Length and Width, The background color of the bar, color of the progress bars, text color, icon color, font, Replace the default icons with yours by simple image link.
For example instead of removing 0.55 stamina points every 0.05 seconds, I prefer to optimize by 20 the process by doing it only once per second instead of 20 times, so a removal of 11 (0.55 * 20) stamina points. This kind of optimization allows to not ask too much from the server and to save it for other heavier tasks. The player doesn't realize it because a smoothing of the client side allows to smooth the display. The player does not go from 100 to 89 stamina points. The bar starts a smooth animation, which makes it go from 100 to 89 smoothly.
cfg.Delay_Stamina_Loop = 2 -- Every 2 seconds during a Sprint the Stamina wears out, at stop the Stamina regenerates.
Go to the HUD management menu and set the second line to ON.
If you have an old save and the option doesn't appear, simply reset your HUD.
Tip to avoid the leak of Gmod Stamina System + Editable HUD installed on your Garry's Mod server: How avoid the Leak of your Gmod scripts
How Install an addon on Gmod? : How install an addon on Gmod
How Publish an addon on the Gmod workshop? : Documentation how create a content pack to publish on the workshop?
Creator: Norda Scripts
Sales | 102 |
Published | 3 years |
Last update | |
Version | version 3.3 |
DRM | Yes |
Categories | Gmod addons |
Requierements | Garry's Mod Server |
Languages | π¬π§ π«π· π©πͺ π·πΊ πͺπΈ |
Admin DarkRP Donation Jobs HUD Optimisation Gameplay Management Allgamemode |