Jump to content

Vampire's Vehicle Degradation


TheVampire

Recommended Posts

Vampire's Vehicle Degradation

-------------------------------------------

Are you tired of those perfect drivers who never have to repair their vehicles?
Are you tired of the unrealistic effects of vehicles not wearing down with use?
Do you think that players need to spend more money to keep their vehicles running?
Well then I have a script for you!

 

What is it?

This script allows you to configure vehicles to take damage over time while they are in use.
You set an amount of time a player must be driving and an amount of damage to give to the vehicle for them driving that amount.
You can also configure the locations to damage the vehicle, the type of vehicle, how far they have to have moved in the time limit, and more!

 

Where can I get it?

It's available here:

https://github.com/SMVampire/Vamp-Vehicle-Degradation

 

What if I have issues?

You can post about it here to see if others can help you, or you can open an issue on the github here:

https://github.com/SMVampire/Vamp-Vehicle-Degradation/issues

 

Can I alter your code and release it as a different mod and/or combine it with a different mod?

This code is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0):
https://creativecommons.org/licenses/by-nc-sa/4.0/

If you are unsure if your intended use is in violation of my license, please send me a PM.

Link to comment
Share on other sites

Hey, it is really a good idea, but I see some smaller problems. The first is, if there are 60 players online, the Server runs 60 Loops parallel. Better would be running it Client Side in this case.

Then you only Check if the Player is in a Vehicle and if the Vehicle is driving. If there are 5 players in this Vehicle, the damage will be given 5x (or have I overseen an additional Check?) 

We would use this addon on our new planned Survival Server and I will make some changes in the code. If you are interested, I will send it to you then and you can compare it.

Link to comment
Share on other sites

I might modify it to just do damage on the server side and loop on the client. I actually had some ideas to simplify it.

Multiplying damage by the crew would be easy but kinda unrealistic. For example the off-road weighs 1615Kg or 3560lbs. An extra 400lbs in men and equipment wouldn't change the overall wear that much. Having 7 men might.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Discord

×
×
  • Create New...