altmp / altv-issues

Issues and roadmap for alt:V project
93 stars 16 forks source link

Some serverside vehicle setters not working correctly #737

Open C0kkie opened 3 years ago

C0kkie commented 3 years ago

Client/server version

Build #dev/2.1-dev65, branch dev

Current behavior

Also if you shoot a window like this: https://img.c0kkie.de/c0kkie_08-12-2020_23-52-49.jpg And you restream the window is totally broken https://img.c0kkie.de/c0kkie_08-12-2020_23-53-02.jpg

FDiskas commented 3 years ago

Please also check getDoorState method vehicle.getDoorState(doorIndex); always returns 0

[17:48:44] {"doorIndex":5,"doorState":0}
[17:49:51] {"doorIndex":2,"doorState":0}
[17:50:23] {"doorIndex":1,"doorState":0}

image

FDiskas commented 3 years ago

Also there is more getters not working

Kingwolfi commented 3 years ago

I did some tests and the vehicle.SetDoorState only works for no netowner players but not for the netowner (RPC Error). The other result is if a door is open and the netowner walks away and stream back in the vehicle the door is closed. If another player is in range of the vehicle the netowner is changed to this one and the doors are open if you stream in the vehicle. there is something wrong with the netowner handling.

If you use this code the doorstate changes also for the netowner but afterwards the sync is bad (just a test) vehicle.SetNetworkOwner(null); vehicle.SetDoorState(door, state);

FabianTerhorst commented 2 years ago

Test the wheel setters again in 11.0-dev21

Yiin commented 1 year ago

getDoorState does seem to work fine for doors, but bonnet and trunk (door id 4 and 5) still always return 0 for some vehicles, namely rebel, rebel2, bodhi2, probably some others with similar trunks/bonnets.

nacelol commented 6 months ago

getDoorState does seem to work fine for doors, but bonnet and trunk (door id 4 and 5) still always return 0 for some vehicles, namely rebel, rebel2, bodhi2, probably some others with similar trunks/bonnets.

Yeah, still relevant today. This seems to be the problem in all vehicles that have only 2 seats (e.g. sultanrs, winky)