29.06.2018, 20:07
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
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