2021-04-17, 06:51 PM
Sorry sir. If i eddit my function, what need to add more for editing dynamic object attached to vehicle?
public OnPlayerEditDynamicObject(playerid, STREAMER_TAG_OBJECT:objectid, response, Float:x, Float:y, Float:z, Float:rx, Float:ry, Float:rz)
//public OnPlayerEditDynamicObject(playerid, STREAMER_TAG_OBJECT:objectid, response, Float:x, Float:y, Float:z, Float:rx, Float:ry, Float:rz);
{
//SendClientMessage(playerid, COLOR_RED, "Anda Sedang Mengedit DynamicObject.");
if(response == EDIT_RESPONSE_UPDATE)
{
SetDynamicObjectPos(objectid, x, y, z);
SetDynamicObjectRot(objectid, rx, ry, rz);
//SendClientMessage(playerid, COLOR_RED, "Anda Sedang Update DynamicObject.");
}
else if(response == EDIT_RESPONSE_CANCEL)
{
SendClientMessage(playerid, COLOR_RED, "Sir you have Cancel editing the DynamicObject.");
}
else if(response == EDIT_RESPONSE_FINAL)
{
SetDynamicObjectPos(objectid, x, y, z);
SetDynamicObjectRot(objectid, rx, ry, rz);
SendClientMessage(playerid, COLOR_RED, "Sir you succes edited DynamicObject.");
new lokasidynamicobject[500];
format(lokasidynamicobject, sizeof(lokasidynamicobject),
"ID Dynamic Object in gamemode %i, Coordinat: %f, %f, %f, Rotating in: %f, %f, %f)",
objectid, Float:x, Float:y, Float:z, Float:rx, Float:ry, Float:rz);
SendClientMessage(playerid, COLOR_RED, lokasidynamicobject);
SelectObject(playerid);
}
return 1;
}
I have a bug if the object selected and edited than that dynamic object cant to move, just stucking with his float.
public OnPlayerEditDynamicObject(playerid, STREAMER_TAG_OBJECT:objectid, response, Float:x, Float:y, Float:z, Float:rx, Float:ry, Float:rz)
//public OnPlayerEditDynamicObject(playerid, STREAMER_TAG_OBJECT:objectid, response, Float:x, Float:y, Float:z, Float:rx, Float:ry, Float:rz);
{
//SendClientMessage(playerid, COLOR_RED, "Anda Sedang Mengedit DynamicObject.");
if(response == EDIT_RESPONSE_UPDATE)
{
SetDynamicObjectPos(objectid, x, y, z);
SetDynamicObjectRot(objectid, rx, ry, rz);
//SendClientMessage(playerid, COLOR_RED, "Anda Sedang Update DynamicObject.");
}
else if(response == EDIT_RESPONSE_CANCEL)
{
SendClientMessage(playerid, COLOR_RED, "Sir you have Cancel editing the DynamicObject.");
}
else if(response == EDIT_RESPONSE_FINAL)
{
SetDynamicObjectPos(objectid, x, y, z);
SetDynamicObjectRot(objectid, rx, ry, rz);
SendClientMessage(playerid, COLOR_RED, "Sir you succes edited DynamicObject.");
new lokasidynamicobject[500];
format(lokasidynamicobject, sizeof(lokasidynamicobject),
"ID Dynamic Object in gamemode %i, Coordinat: %f, %f, %f, Rotating in: %f, %f, %f)",
objectid, Float:x, Float:y, Float:z, Float:rx, Float:ry, Float:rz);
SendClientMessage(playerid, COLOR_RED, lokasidynamicobject);
SelectObject(playerid);
}
return 1;
}
I have a bug if the object selected and edited than that dynamic object cant to move, just stucking with his float.