02.12.2014, 13:12
(
Последний раз редактировалось _Application_; 02.12.2014 в 13:56.
)
aLog Files
:Example
Download
aLog_Files.inc
Код:
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.
Код:
#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; }
aLog_Files.inc