SA-MP Forums Archive
how can I check - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: how can I check (/showthread.php?tid=333161)



how can I check - HondaCBR - 10.04.2012

Im using object editor it saves objects as:
pawn Код:
format(string1, sizeof(string1), "%d, %f,%f,%f, %f,%f,%f,%d\r\n",inputtext, X+1,Y+1,Z+1, 0,0,0,object);
"object" variable is the ID (new object = 0; object++)

If you type /load ID
eg /load 2, how ca I create the object that has 2 at the end ?
("%d, %f,%f,%f, %f,%f,%f,2\r\n) <--


Re: how can I check - HondaCBR - 10.04.2012

oh comon, there must be a way of checking?


Re: how can I check - Jonny5 - 10.04.2012

it happens when you create the object

https://sampwiki.blast.hk/wiki/CreateObject
pawn Код:
new myobj = CreateObject(2587, 2001.195679, 1547.113892, 14.283400, 0.0, 0.0, 96.0);
myobj will hold the id of the object to be used in script


Re: how can I check - HondaCBR - 10.04.2012

Ok different story.

im trying to do this
pawn Код:
public OnPlayerEditObject(playerid, playerobject, objectid, response, Float:fX, Float:fY, Float:fZ, Float:fRotX, Float:fRotY, Float:fRotZ)
{
    if(response == 1)
    {
        new File:hFile;
        hFile = fopen("Ustawienia/obiekty.txt", io_write);
        new line[128];
        format(line, sizeof(line), "%d, %f,%f,%f, %f,%f,%f,%d\r\n",Selected1[playerid], fX,fY,fZ,fRotX,fRotY,fRotZ,SelectedO[playerid]);
        fwrite(hFile, line);
    }
}
so after You click save in the new 0.3e editor, I want the created object to be updated, but to do that it has to overwrite this, but how without checking?