11.11.2010, 18:50
hum when i do /savelights it saves
but then if i do it again it remains in the .txt file the last light i saved
it dosnt do a new line or write it why?
but then if i do it again it remains in the .txt file the last light i saved
it dosnt do a new line or write it why?
pawn Код:
dcmd_savelights(playerid,params[])
{
#pragma unused params
new tmp[128],filename[25];
format(tmp,sizeof(tmp),"DAdmin/Config/lights.txt",filename);
new File:f = fopen(tmp,io_write);
format(tmp, sizeof(tmp), "CreateObject(354,%f %f %f,270,0.0, 0.0, 30.0);\r\n",
Lighter[playerid][X],
Lighter[playerid][Y],
Lighter[playerid][Z]);
fwrite(f, tmp);
fclose(f);
return 1;
}