25.01.2013, 12:50
(
Последний раз редактировалось Edvin; 25.01.2013 в 13:24.
)
Hi guys ..
I want to make a vehicle attachaments editor, like players can edit their body objects.
This is my code:
(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.
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 );
}
}
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.