Fwrite

From SA-MP Wiki

Jump to: navigation, search


Write in a file.


Parameters:
(File:handle, string[])
handleThe file to write to
stringThe string to write


ReturnsThis function doesn't return a specific value


public OnGameModeInit()
{
    new File:log = fopen("/ServerLog.txt", io_write); // Open the file
    if(log)
    {
        fwrite(log, "Server started.\r\n"); // Write to the file (\r\n is for a new line)
        fclose(log); // Close the file
    }
    return 1;
}

Related Functions

The following functions may be useful, as they are related to this function in one way or another.

Personal tools