SA-MP Forums Archive
attachdynamicobject to vehicle - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: attachdynamicobject to vehicle (/showthread.php?tid=559260)



attachdynamicobject to vehicle - lean1337 - 22.01.2015

Hi, this is driving me crazy.

pawn Код:
DestroyDynamicObject( POBJECT[playerid] ); // Destroying old sprayobject
    POBJECT[playerid] = CreateDynamicObject( 19482, XYZ[playerid][0], XYZ[playerid][1], XYZ[playerid][2], XYZ[playerid][3], XYZ[playerid][4], XYZ[playerid][5], GetPlayerVirtualWorld(playerid), GetPlayerInterior(playerid), -1, 200 ); //Creating the object
    SetDynamicObjectMaterialText( POBJECT[playerid], 0, POBJECTN[playerid], OBJECT_MATERIAL_SIZE_256x256, "Diploma", 25, 0, 0xFFFFFFFF, 0, 1 ); // Setting the object text with our choosen graffiti text
    if(isveh[playerid] == 1)
    {
        AttachDynamicObjectToVehicle(POBJECT[playerid], GRAVEH[playerid], XYZ[playerid][0], XYZ[playerid][1], XYZ[playerid][2], XYZ[playerid][3], XYZ[playerid][4], XYZ[playerid][5]);
        new string [95];
        format(string, sizeof(string)," DEBUGG: if(isveh[playerid] == 1) processed %d VEH ID",GRAVEH[playerid]);
        SCM(playerid, COLOR_LIGHTRED, string);
    }
when im not attaching it to a vehicle it works fine, I can see the object but when I attach it to a vehicle it dissapears. This is a graffiti mod im working with vehicle ID is correct and all