Hey, I noticed a bug with the CreateAutoMobile native; planes created by this native does not sync landing gears status and animations.
The script I used:
local CreateAutoMobile = function(model, x, y, z, heading) return Citizen.InvokeNative(`CREATE_AUTOMOBILE`, model, x, y, z, heading) end
local plane = `cuban800`
RegisterCommand("automobile", function(source, args, raw)
local ped = GetPlayerPed(source)
local pos = GetEntityCoords(ped)
CreateAutoMobile(plane, pos.x, pos.y, pos.z, 0.0)
end)
RegisterCommand("vehicle", function(source, args, raw)
local ped = GetPlayerPed(source)
local pos = GetEntityCoords(ped)
CreateVehicle(plane, pos.x, pos.y, pos.z, 0.0, true, true, true)
end)
Steps to see the problem:
- Join the server with a friend.
- Spawn a vehicle using
automobile
command which usingCreateAutoMobile
native. - Fly with your friend and fold the plane wheels (Default G)
- Now your friend won’t see and changes to the landing gears status or animation.
Now, if you do the literally same thing with CreateVehicle, it will sync:
- Join the server with a friend.
- Spawn a vehicle using
vehicle
command which usingCreateVehicle
native. - Fly with your friend and fold the plane wheels (Default G)
- Now your friend should see that the landing gears animation play just fine.
DEMO VIDEO: