citizenfx / fivem

The source code for the Cfx.re modification frameworks, such as FiveM, RedM and LibertyM, as well as FXServer.
https://cfx.re/
3.52k stars 2.07k forks source link

feat(server): Populate CVehicleCreationDataNode with server-sided metadata on vehicle creation. #2614

Open spoty123 opened 3 months ago

spoty123 commented 3 months ago

What happened?

Currently, vehicles the server creates lack specific features set from their meta files.

After discussing with members of the Engineering Group, it was mentioned that the server has nowhere to pull those meta files from and thus can't set the required properties during the vehicle object's creation.

One of the contributors mentioned that this could be fixed by inserting model info metadata into the server files, allowing the server to pull metadata related to vehicle models.

Expected result

The server should have populated the CVehicleCreationDataNode with the correct data from the meta files.

Reproduction steps

Spawning the vehicle kuruma2 via the server.

The handling.meta file of the vehicle kuruma2 has the property strModelFlags set to a value where the vehicle tyres should be unburstable by default on the vehicle's spawn. While using client-sided vehicle creation this flag works just fine, but when spawning via the server, it doesn't work due to the reasons mentioned above.

Importancy

Slight inconvenience

Area(s)

FiveM, FXServer, OneSync

Specific version(s)

Not version-specific.

Additional information

(this is a feature request and not a bug)

spoty123 commented 3 months ago

An enhancement issue regarding this topic with some (maybe) useful implementation hints already exists: #840