11.04.2012, 00:52
I haven't experienced too much with file writing, but I reckon this is how it would go
So I'm guessing you would add SaveObjects(); in your edit object command?
This is just an example.
pawn Код:
stock SaveObjects()
{
// You would make new variables that will hold the object info
new
modelid,
Float:x,
Float:y,
Float:z,
Float:rotX,
Float:rotY,
Float:rotZ,
coordstring[128]
;
for(new i=0;i<11;i++) // Make a loop through 11 objects.
{
GetObjectRot(i, rotX, rotY, rotZ);
GetObjectPos(i, x, y, z);
new File:objects = fopen("objects.txt",io_append);
format(coordstring,sizeof(coordstring),"%d,%f,%f,%f,%f,%f,%f\r\n",i,x,y,z,rotX,rotY,rotZ);
fwrite(objects, coordstring);
fclose(objects);
}
return 1;
}
This is just an example.