SA-MP Forums Archive
Problem when editing object please help - 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: Problem when editing object please help (/showthread.php?tid=655797)



Problem when editing object please help - ShadowBlack - 29.06.2018

ok i have this function:


new testOBJECT;

CMD:whatever(playerid, params[])
{
new vehicleID = GetPlayerVehicleID(playerid);

testOBJECT = CreateObject(19327, 0.0, -1.8, 0.2, 270.0, 0.0, 0.0, 100.0);
SetObjectMaterialText(testOBJECT, 0, "test", OBJECT_MATERIAL_SIZE_256x128, "Arial", 28, 0, 0xFFFFFFFF, 0, 1);
AttachObjectToVehicle(testOBJECT, vehicleID, 0.0, -1.9, 0.3, 270.0, 0.0, 0.0);

EditObject(playerid, testOBJECT);

return 1;
}

public OnPlayerEditObject(playerid, playerobject, objectid, response, Float:fX, Float:fY, Float:fZ, Float:fRotX, Float:fRotY, Float:fRotZ )
{
SetObjectPos(objectid, fX, fY, fZ);
SetObjectRot(objectid, fRotX, fRotY, fRotZ);

SCMf(playerid, COLOR_RED, "xyz: %f %f %f, rxyz: %f %f %f", fX, fY, fZ, fRotX, fRotY, fRotZ);

return 1;
}

and when i try to edit, the object is not moving, is not working how i can do? please help how i can edit attached objeect