Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(esx_lscustom): default wheels #621

Merged

Conversation

meeehdi-dev
Copy link
Contributor

Hi,

this fixes the default value for wheels.
Currently, if you change to custom wheel type you can never go back to the car default wheels.

Regards

Copy link
Contributor

@iSentrie iSentrie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

price = math.floor(vehiclePrice * data.current.price / 100)

data.current.price will return a nil

you need to set a price, otherwise it will return a nil and fail on calculating the price

label = " " .. TranslateCap('by_default'),
modType = "modFrontWheels",
modNum = -1,
wheelType = -1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

set additional value
price = 1
or something

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, thanks for the review.

I put the price to 1 like you said, but I'm thinking of maybe setting the default price in the config so anyone can just change it like the other wheels prices, what do you think?

Copy link
Contributor

@iSentrie iSentrie Nov 11, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

config is the proper way to do it too👍

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok it's pushed, i've set it to 2 by default since the other wheels are at 4+ price, thought 50% would be a good value but if you prefer 1 i change it in a sec

@JackDUpModZ JackDUpModZ merged commit 9dcfef3 into esx-framework:main Nov 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants