CastiaL Posted April 9, 2023 Share Posted April 9, 2023 character enters some vehicles by jumping from the window, how can we turn it off ? for exp vehicle id: 480 Link to comment
johnm18 Posted April 10, 2023 Share Posted April 10, 2023 https://wiki.multitheftauto.com/wiki/EngineReplaceAnimation - take a look at that, I think that is most suited for your case. Link to comment
JeViCo Posted April 10, 2023 Share Posted April 10, 2023 (edited) You're probably looking for a animGroup property in setVehicleHandling function. Wiki says that setting new value is disabled, but you can give it a try. If it doesn't work, replacing original animations is the only option Edited April 10, 2023 by JeViCo Link to comment
FLUSHBICEPS Posted April 10, 2023 Share Posted April 10, 2023 u can cancel the event of entering that vehicle then using setPedAnimation -- car_doorlocked anim And setTimer(warpPedIntoVehicle, 1000, ..) Link to comment
Anoir Tizaoui Posted April 12, 2023 Share Posted April 12, 2023 (edited) To make a specific vehicle (in this case, vehicle ID 480) open its doors like all other cars in MTASA, you can use the setVehicleHandling function to modify the "vehicleanim" attribute of the vehicle's handling data. This attribute determines the animation that plays when the player enters or exits the vehicle, so setting it to a value that matches other cars in the game should make the doors open in a more conventional manner. local vehicle = getVehicleByID(480) local handling = getVehicleHandling(vehicle) handling["vehicleanim"] = "SALOON_DoorSH_L" setVehicleHandling(vehicle, handling) Edited April 12, 2023 by Anoir Tizaoui Link to comment
P[ow]er Posted April 13, 2023 Share Posted April 13, 2023 On 09/04/2023 at 16:57, CastiaL said: character enters some vehicles by jumping from the window, how can we turn it off ? for exp vehicle id: 480 function onVehicleStartEnter(player, seat, jacked) local vehicle = getPedOccupiedVehicle(player) if vehicle and getElementModel(vehicle) == 480 then cancelEvent() outputChatBox("You cannot enter this vehicle.") end end addEventHandler("onVehicleStartEnter", getRootElement(), onVehicleStartEnter) Link to comment
Administrators Tut Posted April 13, 2023 Administrators Share Posted April 13, 2023 A reply targeting another user was removed 1 Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now