renzuzu / renzu_tuners

Fivem Advanced Vehicle System. Including Mileages , Degrations ,Multiple Engine Parts Variation like Racing Pistons , Tuning and more.
GNU General Public License v3.0
86 stars 26 forks source link

Must be a way to repair the parts #10

Closed m0rtos closed 1 year ago

m0rtos commented 1 year ago

Every time you want to repair a part, you mus change it and pay it full price. there must be an option to pay the percentage equivalent to the missing life of the part. And there must be an option to see witch advanced part is installed and let you remove it.

renzuzu commented 1 year ago

do you have suggestion what kind of repair? i am actually thinking the same, but no idea what kind of repair system. example repairing racing parts, its should be expensive as half?

we could create new item repair_parts for example.

without metadata. racing_repair elite_repair etc..

KrnkTV commented 1 year ago

i thinki will be better to repair every single part like if you brake turbo to repair turbo with turbo repair kit or something

m0rtos commented 1 year ago

I think it would be better, if when you try to install the same part that is already installed, just calculate the missing life of the piece, and the amount of money equivalent to the missing life is subtracted from the player, that is, if the piece is broken by 10 % and the price of the piece is 100k, it will only charge you 10% of the total value of the piece (10k). If the missing life is 75% then 75k will be charged. You could also add a repair kit as an item, which repairs a percentage of all the parts of the car but I would leave both systems available

renzuzu commented 1 year ago

using money is good idea.

when using item as a repair kit to repair a percentage, it need to be a fixed item 1 item to fixed any percentage. or complicated using durability metadata for repair kit which is not recommended to use as percentage based fixing.

m0rtos commented 1 year ago

Could you make a table like this? fixitems = { ['itemname'] = {fixpercent} }

and with each item when you use it, fix the value of the total life of the parts, that is to say that if the life of piece A = 70%, and piece B = 40%, and the item you use fixes 20%, piece A now has 90% and piece B 60% regardless of missing health You would simply loop through each item which has the degradation value, and add ActualValue + PercentageOfTheItem.

m0rtos commented 1 year ago

by the way, i want the money system, but its perfect if any script give you the versatility to add it to any server

renzuzu commented 1 year ago

i will add both, item Single (fix any parts), probably Metadata item for custom percentage.

and fixing parts via money or jobmoney