06.07.2015, 11:40
I have a code:
But when it create and save the object,i want to save it in script files in Object.txt as CreateDynamicObject(...) or CreateObject(...)
But how to do it?
Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { if(dialogid == 1) { if(response) { new Float:x,Float:y,Float:z; GetPlayerPos(playerid, x, y, z); object = strval(inputtext); cobj = CreateObject(object, x, y, z, 0.0, 0.0, 0.0); EditObject(playerid, cobj); } } return 1; }
But how to do it?
Код:
public OnPlayerEditObject(playerid, playerobject, objectid, response, Float:fX, Float:fY, Float:fZ, Float:fRotX, Float:fRotY, Float:fRotZ) { if(response == EDIT_RESPONSE_FINAL) { // The player clicked on the save icon // Do anything here to save the updated object position (and rotation) } }