Update vehicle anims for motorcycle
Pull Request Description
Updated in vehicle anims for working motorcycles.
old anim

Pull Request Checklist:
- [x] Have you followed the guidelines in our Contributing document and Code of Conduct?
- [x] Have you checked to ensure there aren't other open Pull Requests for the same update/change?
- [x] Have you built and tested NPWD in-game after the relevant change?
With your changes the ped now sits forward in the car and they have to leave the car, pull the phone out and put it away again to return to the normal driving animation. The same issue occurs on motorcycles where the pen is stuck with their hand in the air.
You'd need to change the dict/anim based off the class the player is in.
https://github.com/project-error/npwd/blob/8bec2f254dc57f18f9964df60538df0db2446124/resources/client/animations/animation.service.ts#L50
private handleCallAnimation(playerPed: number) {
if (IsPedInAnyVehicle(playerPed, true)) {
this.handleOnCallInVehicle(playerPed);
} else {
this.handleOnCallNormal(playerPed);
}
}
private handleOpenAnimation(playerPed: number) {
if (IsPedInAnyVehicle(playerPed, true)) {
this.handleOpenVehicleAnim(playerPed);
} else {
this.handleOpenNormalAnim(playerPed);
}
}
private handleCallEndAnimation(playerPed: number) {
if (IsPedInAnyVehicle(playerPed, true)) {
this.handleCallEndVehicleAnim(playerPed);
} else {
this.handleCallEndNormalAnim(playerPed);
}
}
private handleCloseAnimation(playerPed: number) {
if (IsPedInAnyVehicle(playerPed, true)) {
this.handleCloseVehicleAnim(playerPed);
} else {
this.handleCloseNormalAnim(playerPed);
}
}
You'd need to pass the class to the anim functions and then adjust the dics based off the class, can refer to the docs https://docs.fivem.net/natives/?_0x29439776AAA00A62. Your approach wouldn't work without rewriting your current pr entirely as you assume player vehicle = motorcycle where current method is just a blanket solution for most vehicle classes with the obvious exception of bikes. You'd just compare current class to see if its 8 and adjust the dics/anim locals accordingly.
As soon as possible I'm check this and editing.
I'm updated file for check player is in vehicle or motorcycles, but if in vehicles always restart opening animation and didn't find why made this.
Fixed formating and using let/const
I'll test it this week.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
After lots of anim version checking and open/close test, there is too much problem.
- lots of anim stuck
- prop missing