AttachDynamicObjectToVehicle & EditDynamicObject
#1

Hi guys ..

I want to make a vehicle attachaments editor, like players can edit their body objects.
This is my code:
pawn Код:
if ( listid == mHold[ 8 ] )
    {
        if ( response )
        {
            if ( !IsPlayerInAnyVehicle( playerid ) )
                return SendError( playerid, "You need to drive a vehicle to use this editor !" );
               
            new
                p_Object,
                Float:lf_v_X,
                Float:lf_v_Y,
                Float:lf_v_Z,
                VehicleID = GetPlayerVehicleID( playerid )
            ;
            GetVehiclePos( VehicleID, lf_v_X, lf_v_Y, lf_v_Z );
           
            p_Object = CreateDynamicObject( modelid, lf_v_X, lf_v_Y, lf_v_Z, 0.0, 0.0, 0.0 );
            AttachDynamicObjectToVehicle( p_Object, VehicleID, lf_v_X, lf_v_Y, lf_v_Z, 0.0, 0.0, 0.0 );
           
            Streamer_Update( playerid );
            EditDynamicObject( playerid, p_Object );
        }
    }
(part).

I tried to use EditDynamicObject without AttachDynamicObjectToVehicle and it works. When i added "AttachDynamicObjectToVehicle" and i try to edit the object, it automaticlly disappear (i think it's moved to another place, because my "mouse" is still on the screen).

What can i do?

PS> Sorry for some gramatical mistakes.
Reply


Messages In This Thread
AttachDynamicObjectToVehicle & EditDynamicObject - by Edvin - 25.01.2013, 12:50
Re: AttachDynamicObjectToVehicle & EditDynamicObject - by arakuta - 25.01.2013, 13:08
Re: AttachDynamicObjectToVehicle & EditDynamicObject - by Edvin - 25.01.2013, 13:20
Re: AttachDynamicObjectToVehicle & EditDynamicObject - by Adeon - 09.11.2014, 07:53

Forum Jump:


Users browsing this thread: 1 Guest(s)