Query all vehicles (including Add-on ones) known to the sever

Hi,
Can someone explain me if it’s possible to query all the vehicle hashes/names known to the server, so I can implement it into my own vehicleshop system? I read through the VehicleHash Enum (in C#), but I think it only includes hashes for the default vehicles, not the Add-on ones.

Thank you for your help!

The server doesn’t even load vehicle data at all, so that is as simple as “empty set”.

1 Like

Then how can I query it client side? Can the GetAllVehicles method be used for this? Or it only gives the vehicle handles for the vehicles that are currently spawned in the game, if I can say that.

Or how can I get all the vehicle hashes at all? Or how other vehicle shop resources list the available vehicles?

If you have the list of vehicles simply run a loop with the GetHashKey native and output results to print or a file or another database up to you what you want to do.

GetHashKey(“modelName”)

Thank you, but I don’t have a list, that’s what I want to get. I need the game to tell me, what vehicles are available.

Pretty sure there isn’t one; assuming that you’re talking about addon cars. If you want regular cars just Google it, there is a list somewhere.

You might be able to do something with Python if you have the knowledge and open all addoncars vehicles.meta and get the spawn name

Thank you. Im gonna try.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.