Код:
AttachVehicleToObject(vehicleid, objectid, Float:offsetX, Float:offsetY, Float:offsetZ, Float:RotX, Float:RotY, Float:RotZ)
+ possibly something like
Код:
GetPositionOffsetRelativeToObject(objectid, Float:x, Float:y, Float:z, &Float:offsetX, &Float:offsetY, &Float:offsetZ)
to easier attach such vehicle to object but not necessary.
What a purpose? For example we want to do a dodo short landing on a driving NPC with attached object.
Link to watch a video about landing Shamal on NPC vehicle with attached objects
As you can see on my video it is possible. But would be nice if such NPC could drive not only on straight roads but also on sloped roads, changing speed, turning. This function could freeze player control, but not classic freeze - player still could be rotating camera. If player would like to continue driving He would have press keys -> OnPlayerKeyStateChange -> DetachObjectFromVehicle(objectid, vehicleid).
May it sounds odd, but would be interesting. For example build mini airport (runway + some parking) on the flying NPC AT400 body. I don't know how complicated it would be to implement this.
EDIT:
Would be also nice if scripters could know if vehicle/player is in the air or on the ground - are touching anything by legs themselves. Or vehicle is in the air or on some ground (also this CreatedObject & AttachedToVehicle). I don't know GTA SA engine, but we all know that player/vehicle can falling down and finally hit surface (we lose hp, die, or vehicle lose hp) - so I think somewhere may be some flag to know current state whether we are falling in the air or stay tough on the ground.
This above would be helpful to detect when Dodo lands on moving NPC with attached objects, set some timer to detect when speed reach 0km/h and finally AttachVehicleToObject automatically or triggered by some key.
My english is not the best.