Fwrite

From SA-MP Wiki

Jump to: navigation, search

Fwrite


Write in a file.


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


This function does not return a specific value.


public OnGameModeInit()
{
    new File:log = fopen("/ServerLog.txt", io_write); // Open the file
    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 might be useful as well, as they're related to this function in one way or another.

Personal tools