Save players logs
#4

Quote:
Originally Posted by AndreiWow
Посмотреть сообщение
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); 
Even if I have to show on the website?



Quote:
Originally Posted by oMa37
Посмотреть сообщение
If you want to show the logs in your website, You gotta save it with MySQL.
Even though if you don't want to show it in your website, I always prefer MySQL for saving stuff.
Saving into database every time that a player gives a weapon or pays someone.. doesn't create too much lag?
And this amount of data stored into the database isn't a problem?
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)