19.07.2012, 21:38
Is the mode io_readwrite used for reading and writing? so you could read from the file and write without reopening it?
|
Originally Posted by SA-MP Wiki
io_readwrite Reads the file or creates it
|
new File:example = fopen("file.txt", io_readwrite);
if(example) //If it exists, it writes.
{
fwrite(example, "Whatever you want to write");
fclose(example);
}
else
{
fread(example, string[], sizeof(string));
fclose(example);
}