Save players logs
#2

I write it in a file, don't see why I should save it in a mysql table.

PHP код:
function KickLog(string[])
{
    new
        
entry128 ],
        
year,
        
month,
        
day,
        
hour,
        
minute,
        
second
    
;
    
getdate(yearmonthday);
    
gettime(hourminutesecond);
    
format(entrysizeof(entry), "%s | (%d-%d-%d) (%d:%d:%d)\n",stringdaymonthyearhourminutesecond);
    new 
File:hFile;
    
hFile fopen("Basic/logs/KickLog.log"io_append);
    
fwrite(hFileentry);
    
fclose(hFile);

Use KickLog(string); under a format, example.
PHP код:
format(stringsizeof(string), "x has kicked y", ...);
SendClientMessage(playerid, -1string);
KickLog(string); 
Reply


Messages In This Thread
Save players logs - by pollo97 - 09.02.2017, 14:05
Re: Save players logs - by AndreiWow - 09.02.2017, 14:41
Re: Save players logs - by oMa37 - 09.02.2017, 14:45
Re: Save players logs - by pollo97 - 09.02.2017, 14:59
Re: Save players logs - by oMa37 - 09.02.2017, 15:03
Re: Save players logs - by AndreiWow - 09.02.2017, 15:07

Forum Jump:


Users browsing this thread: 1 Guest(s)