altmp / altv-issues

Issues and roadmap for alt:V project
92 stars 17 forks source link

Vehmods not working properly #2216

Open Avepy opened 5 months ago

Avepy commented 5 months ago

Description of the problem

since the alt:V 16 before update car tuning looked like this with 7 1 - hood, 10 3 - roof:

obraz_2024-01-24_153004010

And now it looks like this with the same values:

obraz_2024-01-24_153028939

Car model: "tenf", but it happens to another vehicles too I'm setting it now by serverside C#:

vehicle.SetMod((byte) modType, (byte) variant);

but I've tried with clientside as well:

alt.on('consoleCommand', (command, ...args) => {
    if (command !== 'tuning') return;
    setVehicleMod(alt.Player.local.vehicle, parseInt(args[0]), parseInt(args[1]), false);
});

neither of these sets the correct modifications

Reproduction steps

Try to set ModType of vehicles

Expected behaviour

SetMod on server and client setting proper things For example that's how roof nr. 3 looks like in game files:

obraz_2024-01-24_163803953

So as on first screen, not like after update

Additional context

No response

Operating system

Windows 11

Version

release/16.0.51

Crashdump ID

No response

Confirmation of issue's presence

toyerovsky commented 4 months ago

Hello, any update on that? @vadzz-dev

ThomasMarangoni commented 4 months ago

Please don't tag our devs without real reason.

Avepy commented 2 months ago

The issue still persists, I've noticed that clientside has to have set the modkit to 0 for setting mods, and serverside needs to have modkit 1 set. Moreover, there's comparison between clientside and serverside tuning:

image Left one is the same tuning as the right one, but one on the left is set by clientside and one on the right by serverside.

Here's the code for serverside setting which I'm using

alt.onClient('createVehicle', (player: alt.Player, pos: alt.Vector3) => {
    const vehicle = new alt.Vehicle('tenf', pos.x, pos.y, pos.z, 0, 0, 0);
    vehicle.numberPlateText = 'TUNING';
    vehicle.engineOn = true;
    vehicle.modKit = 1;

    setTimeout(() => {
        vehicle.setMod(7, 1);
        vehicle.setMod(10, 3);
    }, 2500);
});

and here is clientside one

natives.setVehicleModKit(alt.Player.local.vehicle.scriptID, 0);
natives.setVehicleMod(alt.Player.local.vehicle, 7, 1, false);
natives.setVehicleMod(alt.Player.local.vehicle, 10, 3, false);

None of these tunings look like the ones from OpenIV

banbu123 commented 1 month ago

Hello, currently there is the problem that all tuning parts of the Vulcar Nebula Turbo are mixed up. Unfortunately it is not a server-side problem, but an “Alt:V problem”.

Something is wrong with the “tuning script” (if you call it that :D )

I would ask you to have a look at it, since the update in january the car has changed except for the paint job.

there was the same problem with the sentinel classic widebody back then.

Unfortunately I don't have a before and after picture, I also tried it on the server PlayV and there is always an error message.

banbu123 commented 3 weeks ago

i found a old picture of "my" Nebula.

nebula before

and now it looks a little different :*)

GTA5 2024-06-10 19-17-22

ItsMeDeli commented 1 week ago

Anything known about this?

ItsMeDeli commented 1 week ago

We noticed that the problem is less when all vehicles are merged into one resource. But still, it's not practical.