How to fix this?
#1

I have made an object editing command but when i see the log,the object id is in other language

Код:
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);
	}
}
The real object id is 2406 and output is:

Код:
CreateObject(й›-ўљ, -1683.190917, 704.806335, 30.829187, -55.900032, -0.300000, 0.000000);
Reply


Messages In This Thread
Saving Bug (How to fix it?) - by Mouiz - 06.07.2015, 12:27
Re: How to fix this? - by rymax99 - 06.07.2015, 12:44
Re: How to fix this? - by Mouiz - 06.07.2015, 13:35
Re: How to fix this? - by Prokill911 - 06.07.2015, 13:46
Re: How to fix this? - by Mouiz - 06.07.2015, 13:51
Re: How to fix this? - by Mouiz - 06.07.2015, 13:54
Re: How to fix this? - by JaydenJason - 06.07.2015, 13:55
Re: How to fix this? - by rymax99 - 06.07.2015, 13:58
Re: How to fix this? - by Mouiz - 06.07.2015, 14:01
Re: How to fix this? - by rymax99 - 06.07.2015, 14:13

Forum Jump:


Users browsing this thread: 1 Guest(s)