[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
#2

good job Gavriel!
Reply
#3

Pretty simple but keep up.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)