Save File
#2

PHP код:
stock Save(str[])
{
    new 
File:log fopen("Log.txt"io_append);
    
format(str256"%s\r\n"str);
    
fwrite(logstr);
    
fclose(log);
    return 
1;

Usage mode:

PHP код:
public OnPlayerDisconnect(playeridreason)
{
    new 
str[128], ymd;
    
getdate(ymd);
    
GetPlayerName(playeridstrsizeof str);
    
format(strsizeof str"%s - %s - Date: %02d/%02d/%04d"strreasondmy);
    
Save(str);
    return 
1;

This will be written like this in the file Log.txt (if player name is Alex_Obando and reason was 1):

Код:
Alex_Obando - 1 - 25/07/2011
Reply


Messages In This Thread
Save File - by Alex_Obando - 25.07.2011, 21:57
Re: Save File - by Shadoww5 - 25.07.2011, 23:03

Forum Jump:


Users browsing this thread: 1 Guest(s)