SA-MP Forums Archive
Help Log system with mysql - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Help Log system with mysql (/showthread.php?tid=560073)



Help Log system with mysql - Slicebook - 26.01.2015

Hello! Please help,

This is saving dini, How to change that MYSQL save?
Код:
Code:
stock CKLog(playerid, text[])
{
		new playerfile[24],string[178],	fyear, fmonth, fday,
  		fhour, fminute, fsecond;
    	getdate(fyear, fmonth, fday);
    	gettime(fhour, fminute, fsecond);
        format(playerfile,sizeof(playerfile),"Logs/%s.txt",GetName(playerid));
       	format(string, sizeof(string),"[%02d/%02d/%04d %02d:%02d:%02d] [*Dead*] %s: %s \r\n", fday, fmonth, fyear, fhour, fminute, fsecond, GetName(playerid),text);
        new File:ftw=fopen(playerfile, io_append);
        if(ftw)
        {
            fwrite(ftw, string);
        }
        fclose(ftw);
    	return 1;
}



Re: Help Log system with mysql - Slicebook - 26.01.2015

up!!