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

Fixed the spawn of vehicle with "Utility" class #1173

Merged
merged 2 commits into from
Aug 25, 2023

Conversation

KadDarem
Copy link
Contributor

The gas tank trailer replaces all vehicles with the "Utility" class (number 11).
I fixed the spawn by removing the number 11 from the list to spawn these vehicles as "automobile" and not as "trailer".

@NikartikTheBear
Copy link
Member

From what i remember there is a pr from @Arctos2win in the dev branch that solves the problem

@KadDarem
Copy link
Contributor Author

Yes. It's pretty similar

@NikartikTheBear
Copy link
Member

As an advice for future contributing, check the dev branch first because a problem may be already solved there and pull request to the dev branch not the main

@MoskalykA
Copy link
Contributor

My pull request also seems to correct this (but I'm not sure).

@KadDarem
Copy link
Contributor Author

My pull request also seems to correct this (but I'm not sure).

It fixes it too. But it's boring to add one by one all vehicles with your way.

@Gellipapa
Copy link
Member

Hi Guys! if I understand correctly the problem here is that if the vehicleType is 11 then the tanker will spawn?

Because there is a bug currently in car command that sometimes you enter a specific car so /car zentorno will sometimes spawn an orange tanker.

Can you guys look into this and test it in this pr?

Because this being commented out is not a solution, either delete or rework this part.

Thanks.

@Gellipapa Gellipapa changed the base branch from main to dev August 22, 2023 21:48
@KadDarem
Copy link
Contributor Author

Hi Guys! if I understand correctly the problem here is that if the vehicleType is 11 then the tanker will spawn?

Because there is a bug currently in car command that sometimes you enter a specific car so /car zentorno will sometimes spawn an orange tanker.

Can you guys look into this and test it in this pr?

Because this being commented out is not a solution, either delete or rework this part.

Thanks.

GetVehicleClassFromName return 11 for all vehicles with Utility class. So currently, they are all replaced by a gas tank trailer due to for ESX, 11 is trailer and not automobile.

You can't really rework this part due to trailer and utility return the same number. So you have two ways to fix it :

  • Enter one by one the list of utility vehicles to overwrite the vehicle class.
  • Spawn all vehicle with class 11 as automobile instead trailer.

I choose the second way to be compatible with add-on vehicles.

@Gellipapa
Copy link
Member

Hi Guys! if I understand correctly the problem here is that if the vehicleType is 11 then the tanker will spawn?
Because there is a bug currently in car command that sometimes you enter a specific car so /car zentorno will sometimes spawn an orange tanker.
Can you guys look into this and test it in this pr?
Because this being commented out is not a solution, either delete or rework this part.
Thanks.

GetVehicleClassFromName return 11 for all vehicles with Utility class. So currently, they are all replaced by a gas tank trailer due to for ESX, 11 is trailer and not automobile.

You can't really rework this part due to trailer and utility return the same number. So you have two ways to fix it :

  • Enter one by one the list of utility vehicles to overwrite the vehicle class.
  • Spawn all vehicle with class 11 as automobile instead trailer.

I choose the second way to be compatible with add-on vehicles.

Hi! Thank you for the detailed description.

Then let's make it so that you delete it, not just comment on it, and I'll test how compatible it is with the old version.

@Gellipapa
Copy link
Member

Gellipapa commented Aug 23, 2023

@KadDarem I have tested it to see if it works, please read my comment and fix it after I can merge.

@KadDarem
Copy link
Contributor Author

@KadDarem I have tested it to see if it works, please read my comment and fix it after I can merge.

It's good. I removed the line

Copy link
Member

@Gellipapa Gellipapa left a comment

Choose a reason for hiding this comment

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

Hi! Well done, I was tested and merged.

@Gellipapa Gellipapa merged commit e6775ef into esx-framework:dev Aug 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

4 participants