[Include] Log Files Functions.
#1

aLog Files

Код:
        native CreateLog(const logname[]) - This function is used to create log.
        native WriteInLog(const logname[], string) - This function is used to write in log file.
        native DeleteLog(const logname) - This function is used to delete the log file.
:Example
Код:
#include <a_samp>
#include <aLog_Files>

new pName[MAX_PLAYERS][MAX_PLAYER_NAME+1];

public OnGameModeInit()
{
    CreateLog("connect");
    return 1;
}

public OnPlayerConnect(playerid)
{
    new string[64];
    GetPlayerName(playerid, pName[playerid], MAX_PLAYER_NAME);
    format(string, sizeof(string), "%s has joined the server.", pName[playerid]);
    WriteInLog("connect", string);
    return 1;
}


public OnPlayerDisconnect(playerid, reason)
{
    DeleteLog("connect");
    return 1;
}
Download
aLog_Files.inc
Reply


Messages In This Thread
Log Files Functions. - by _Application_ - 02.12.2014, 13:12
Re: Log Files Functions. - by LorDWarS - 02.12.2014, 16:05
Re: Log Files Functions. - by Excips - 05.12.2014, 05:02

Forum Jump:


Users browsing this thread: 1 Guest(s)