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(client/vehicleproperties): vehicle must be fixed for extras to apply visually #392

Merged
merged 3 commits into from
Aug 15, 2023

Conversation

jellyton255
Copy link
Contributor

When using SetVehicleAutoRepairDisabled, you need to repair the vehicle for the applied extras to be visible.

@thelindat
Copy link
Member

Not sure why extras are moved up? Need the TS types updated to reflect the new optional arg.

Comment on lines 278 to 280
---@param fixVehicle? boolean
---@return boolean?
function lib.setVehicleProperties(vehicle, props)
if not DoesEntityExist(vehicle) then error(("Unable to set vehicle properties for '%s' (entity does not exist)"):
format(vehicle))
function lib.setVehicleProperties(vehicle, props, fixVehicle)
Copy link
Member

Choose a reason for hiding this comment

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

Requires TS definition.

Comment on lines +297 to +302
if props.extras then
for id, disable in pairs(props.extras) do
SetVehicleExtra(vehicle, tonumber(id) --[[@as number]], disable == 1)
end
end

Copy link
Member

Choose a reason for hiding this comment

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

Why is this moved up?

@thelindat thelindat merged commit 0c072ef into overextended:master Aug 15, 2023
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.

2 participants