lil' help here
#4

Never used any files with pawn. Short read on wiki:

io_write Writes in a file, clears all earlier written text
io_read Reads the file, the file must exist, otherwise a crash will occur
io_append Appending to a file, writing only
io_readwrite Reads the file or makes a new one


So, just change io_write to io_append, and it will work.

pawn Код:
dcmd_savelights(playerid,params[])
{
    #pragma unused params
    new File:savefile = fopen("DAdmin/Config/lights.txt", io_append);
    new str[80];
    format(str, sizeof(str), "CreateObject(354,%f, %f, %f,270,0.0, 0.0, 30.0);\r\n",
    Lighter[playerid][X],
    Lighter[playerid][Y],
    Lighter[playerid][Z]);
    fwrite(savefile, str);
    fclose(savefile);
    return 1;
}
Reply


Messages In This Thread
lil' help here - by dark_clown - 11.11.2010, 18:50
Re: lil' help here - by TheXIII - 11.11.2010, 18:58
Re: lil' help here - by dark_clown - 11.11.2010, 19:10
Re: lil' help here - by TheXIII - 11.11.2010, 19:56
Re: lil' help here - by The_Moddler - 11.11.2010, 20:00

Forum Jump:


Users browsing this thread: 1 Guest(s)