wrong Z pos after EditObject
#1

pawn Код:
public OnPlayerEditDynamicObject(playerid, objectid, response, Float:x, Float:y, Float:z, Float:rx, Float:ry, Float:rz)
{
    new Float:x1,Float:y1,Float:z1;
    GetVehiclePos(lastveh[playerid],x1, y1, z1);
    new Float:vx = x - x1;
    new Float:vy = y - y1;
    new Float:vz = z - z1;
    if(response == 1)
    {
        if(vInSlot[playerid][0] == 1)
        {
            AttachDynamicObjectToVehicle(vObj[playerid][0], lastveh[playerid], vx, vy, vz, rx,ry,rz);
            vSlots[playerid][0] = 1;
            printf("%f, %f, %f", vx,vy,vz);
        }
    }
    return 1;
}
Everything seems fine except the Z position after the object was attached. It's lower than the real position.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)