Garry's Mod

Garry's Mod

Not enough ratings
Tood's SWRP Entities v2
3
   
Award
Favorite
Favorited
Unfavorite
Content Type: Addon
Addon Type: Gamemode
Addon Tags: Fun, Roleplay
File Size
Posted
Updated
27.541 KB
13 Apr, 2020 @ 12:46pm
15 Mar, 2021 @ 9:54pm
4 Change Notes ( view )

Subscribe to download
Tood's SWRP Entities v2

Description


ALL SUPPORT IS NOW HANDLED VIA MY NEW DISCORD: discord.gg/YSzU6MY2Yb

Tood's SWRP Entities v2.

PLEASE READ THE CONFIGURATION SECTION BEFORE USE.

DON'T FORGET THE REQUIRED CONTENT.

Features:

Communications Array: Once destroyed, this entity will disable everyone's ability to use the following commands in chat, /comms /ad /adv /advert, any job that you give the repair tool to must repair the comms array for communications to restore.

Gravity Generator: Once destroyed, this entity will disable gravity for all players and lower the friction amount which will cause players to slide along the ground making it slighty more difficult to run and walk, any job that you give the repair tool to must repair the generator to restore gravity and friction back to default.

Life Support System: Once destroyed, this will slowly take health away from all players overtime, every 1.5 seconds players will lose 2hp, THIS DOES NOT AFFECT ARMOR, any job you give the repair tool to must repair the system to restore life support and players will no longer receive overtime damage from this being destroyed.

Power System: Once destroyed, this will force ALL map doors under the name "func_door" to close if open and lock if closed meaning no one can get in or out of rooms if the doors are locked, any job that you give the repair tool to must repair the power station to restore power and unlock all doors.

Health Bar: All 4 entities have a set amount of health located in each shared.lua file, if a player is within a specific distance then they will either see a Cam3D2D health bar appear above the entity or they won't if they are too far away (Old health bar was replaced on Update v1.1 with a new Cam3D2D HUD, refer to the screenshots for the look).

Repair Tool: I've made a repair tool that is specifically for the 4 entities I've made in this addon, you must be pretty close to any of the 4 entities and left-click to repair the entity. There is a 1 second delay between each left-click, might increase it later down the line.

In-Game Configuration: Save time roughing through lines of code and modify your config in-game! Simply hold C, right click on the entity, click "Edit Properties" and boom! Good to go, you have quite a bit of freedom with the config options and there's quite a few options.

Future Plans: More entities? I've drawn a blank so drop your suggestions below in the suggestions discussion!
______________________________________________________________________



Tood - Coding, designing and creating the script itself.
Doctor - Prop Models I used for this addon.
_______________________________________________________________________



- Spawn the entity in-game, hold C, right click on the entity and click "Edit Properties", if you change the health and model values in the menu then you MUST press E on the entity (or your +USE key) for the changes to happen. To edit the properties, it's Admin+.

Communications Array Config Options
- Choose if you would like to disable /comms when the entity is destroyed until the entity is repaired again..
- Choose if you would like to disable /advert when the entity is destroyed until the entity is repaired again..
- Choose if you want to display the health bar.
- Use the default model or choose your own.
- Use the default health or set your own value.

Gravity Generator
- Choose if you would like to disable gravity when the entity is destroyed until the entity is repaired again.
- Choose if you would like to disable friction (Make players slide along the ground when running.) when the entity is destroyed until the entity is repaired again.
- Choose if you want to display the health bar.
- Use the default model or choose your own.
- Use the default health or set your own value.

Life Support
- Choose if you would like to disable life support when the entity is destroyed until the entity is repaired again.
- If you choose to disable life support then you can use the slider to choose how much damage players take while it's disabled when the entity is destroyed until the entity is repaired again..
- If you choose to disable life support then you can set the timer per damage tick (in seconds), so how between each damage amount if the entity is destroyed until the entity is repaired again.
- Choose if you want to display the health bar.
- Use the default model or choose your own.
- Use the default health or set your own value.

Power Station
- Choose if you would like to lock all map doors when the entity is destroyed until the entity is repaired again.
- Choose if you would like to turn off all map lights when the entity is destroyed until the entity is repaired again.
- Choose if you want to display the health bar.
- Use the default model or choose your own.
- Use the default health or set your own value.
_______________________________________________________________________



You have full permission to edit my code to preference but must be kept at personal use only for your own server.

You do not have permission to reupload this or claim this script as your own.
If you wish to use my script in another script then do not merge the files with your own, simply add my script as "Required Content".
________________________________________________________________________

Update v1.1

- Current Health HUD replaced with a Cam3D2D HUD. No more null entity script errors when you noclip through the map.
________________________________________________________________________

Update v1.2

- Player:InVehicle() check added in for the life support entity, LFS and Star Wars Vehicles have been tested and now players won't take damage when in a vehicle if the life support has been destroyed.
- Player:Team() == GAMEMODE.DefaultTeam added in so when players log into DarkRP base servers they won't take any damage from the life support being destroyed if said player is on the default spawn job.
________________________________________________________________________

Update v2
- Added a tonne of in-game config options.
- Reworked all entities to accommodate the move to an in-game config.
- Config moved to in-game. Hold C, right click on the entity and click Edit Properties.
- Cleaned up Power Station code.
- Cleaned up Life Support code.

Want to donate and support my Development Progression? Click the image below <3
[paypal.me]
_________________________________________________________________________

If you have any questions, comments or concerns then drop them down below and I'll be more than willing to help you out however I can.
Feel free to drop a like if you enjoy this addon and if you have any suggestions or bug reports then please use the designated discussion posts.
Enjoy!!
26 Comments
junior jr 2 Sep, 2024 @ 5:27am 
how can i make it stay there
junior jr 2 Sep, 2024 @ 5:27am 
Hey man when i permprop it i cant distroy it
Tood  [author] 26 Jul, 2024 @ 11:13am 
Per the description;

"Spawn the entity in-game, hold C, right click on the entity and click "Edit Properties", if you change the health and model values in the menu then you MUST press E on the entity (or your +USE key) for the changes to happen. To edit the properties, it's Admin+."
Mental sups.gg 25 Jul, 2024 @ 10:56pm 
Why dose the health not change when I set it
Tood  [author] 22 Feb, 2021 @ 1:03pm 
Your server must be using a weird communications system then. The communications array checks to see if the health is <= 0 then if the command typed in chat is any of those I listed in my previous comment then it returns "" instead of the command typed.
⚓Galiant🦈 22 Feb, 2021 @ 12:36pm 
ours uses /comms but whenever we damage the comms array to zero hp it wont block out that command
Tood  [author] 20 Feb, 2021 @ 3:57pm 
Depends on what your comms command is, it blocks /comms /ad /adv and /advert. If you use a different command then you will need to add it to the init.lua for the commsarray
⚓Galiant🦈 20 Feb, 2021 @ 2:27pm 
I am struggling to get your comm's array to disable our comms is there some kind of setup we need to do it get it work or no?
Wildcard 19 Jul, 2020 @ 9:23am 
Alright, Thanks Tood!
Tood  [author] 18 Jul, 2020 @ 12:00pm 
You can change the model via the entity folder and inside the init.lua but be warned that I'm not going to edit the Cam3D2D, that will stay in the same position so if you decided to use a model which is double the size I used and the Cam3D2D ends up inside the model because it's so big then that's on you to fix :)