AttachObjectToVehicle. HELP!
#3

You using this streamer: https://sampforum.blast.hk/showthread.php?tid=102865

If you read the thread, you will establish the fact that this include does not posses a AttachDynamicObjectToVehicle, so when you use the default function, it does not respond/do anything.

Although there is a obvious solution to this problem, may i hint with a bit of code?

Код:
stock AttachDynamicObjectToVehicle(vehicleid, objectid, Float:OffsetX, Float:OffsetY, Float:OffsetZ, Float:RotX, Float:RotY, Float:RotZ)
{
    DestroyDynamicObject(objectid);// :O
    new Float:x, Float:y, Float:z;
    GetVehiclePos(vehicleid, x, y, z);
    new object = CreateObject(objectid, x + 2.0, y + 2.0, z, 0.0, 0.0, 100.0);//Make sure you set the draw distance to suit your fancy. (Default: 100.0)
    AttachObjectToVehicle(object, vehicleid, OffsetX, OffsetY, OffsetZ, RotX, RotY, RotZ);
    return 1;
}
Note: NOT tested.


Then simply, DestroyObject and CreateDynamicObject to "Detach".


You get the point tho.
Reply


Messages In This Thread
AttachObjectToVehicle. HELP! - by Mecool - 29.04.2012, 20:18
Re: AttachObjectToVehicle. HELP! - by FalconX - 29.04.2012, 21:07
Re: AttachObjectToVehicle. HELP! - by warcodes_ - 30.04.2012, 06:07
Re: AttachObjectToVehicle. HELP! - by Mecool - 02.05.2012, 16:26

Forum Jump:


Users browsing this thread: 1 Guest(s)