06.07.2015, 12:27
(
Последний раз редактировалось Mouiz; 06.07.2015 в 15:23.
)
I have made an object editing command but when i see the log,the object id is in other language 
The real object id is 2406 and output is:

Код:
SaveObjectToFile(playerid, objectid, Float:fX, Float:fY, Float:fZ, Float:fRotX, Float:fRotY, Float:fRotZ)
{
new
File:file,
line[100];
GetPlayerName(playerid, pnam, sizeof(pnam));
if(!fexist(ANIM_SAVE_FILE))file = fopen(ANIM_SAVE_FILE, io_write);
else file = fopen(ANIM_SAVE_FILE, io_append);
format(line, 100, "CreateObject(%s, %f, %f, %f, %f, %f, %f);\r\n",objectid, fX, fY, fZ, fRotX, fRotY, fRotZ);
fwrite(file, line);
fclose(file);
}
CMD:createobject(playerid, params[])
{
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_INPUT, "Objects", "Enter the object id you want to add", "OK", "Cancel");
CreateObject(4206, -1683.190917, 704.806335, 30.829187, -55.900032, -0.300000, 0.000000);
}
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;
}
public OnPlayerEditObject(playerid, playerobject, objectid, response, Float:fX, Float:fY, Float:fZ, Float:fRotX, Float:fRotY, Float:fRotZ)
{
if(response == EDIT_RESPONSE_FINAL)
{
SaveObjectToFile(playerid, cobj, fX, fY, fZ, fRotX, fRotY, fRotZ);
}
}
Код:
CreateObject(й›-ўљ, -1683.190917, 704.806335, 30.829187, -55.900032, -0.300000, 0.000000);


