[Include] gLogs - Easiest way of creating logs - 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: Filterscripts (
https://sampforum.blast.hk/forumdisplay.php?fid=17)
+---- Forum: Includes (
https://sampforum.blast.hk/forumdisplay.php?fid=83)
+---- Thread: [Include] gLogs - Easiest way of creating logs (
/showthread.php?tid=424804)
gLogs - Easiest way of creating logs - Now with time -
FunnyBear - 23.03.2013
gLogs - Easiest way of creating logs
Introduction
This is my second include, and this is a new way of creating logs easily. You can now create a log in a few lines of text!
Example script
Here is an example script on how to make an easy log:
pawn Код:
CMD:log(playerid, params[])
{
new
log[ 128 ];
format(log, sizeof(log), "Player has done something"); // Change it to your own line
WriteLog("Log", log);
return 1;
}
If you were to create a log with time, it would like like this:
pawn Код:
CMD:log(playerid, params[])
{
new
fyear, fmonth, fday,
fhour, fminute, fsecond;
new
log[ 128 ];
getdate(fyear, fmonth, fday);
gettime(fhour, fminute, fsecond);
format(log, sizeof(log), "[%02d/%02d/%04d %02d:%02d:%02d] Player has done something", fday, fmonth, fyear, fhour, fminute, fsecond); // Change it to your own line
WriteLog("Log", log);
return 1;
}
There paramaters are,
pawn Код:
WriteLog("/*log name/location*/", /*log variable*/);
Download
Mediafire -
http://www.mediafire.com/?rdbcbe6vo1d53o3
Changelog
Код:
v1.0
- Added logs include
There seems to be no bugs, but if you find one, please contact me!
Thanks
Re: gLogs - Easiest way of creating logs -
FunnyBear - 24.03.2013
Any comments?
Re: gLogs - Easiest way of creating logs -
Dan.. - 24.03.2013
Now, this include is useless (there is no need for a include containing just one function).
Sugestions:
- multiple storage methods (sqlite databases, different text formats with custom time stamps, etc.)
Код:
WriteLog(log, format[], {Float,_}:...);
Re: gLogs - Easiest way of creating logs -
FunnyBear - 24.03.2013
Quote:
Originally Posted by Dan..
Try implementing this function:
Код:
WriteLog(log, format[], {Float,_}:...);
|
It is fine my way.
Re: gLogs - Easiest way of creating logs -
Dan.. - 24.03.2013
Quote:
Originally Posted by FunnyBear
It is fine my way.
|
I've updated my post with better sugestions. Since you posted it here, I guess you want people to use this include and they won't as long as it contains one stupid function.
Re: gLogs - Easiest way of creating logs -
FunnyBear - 24.03.2013
Quote:
Originally Posted by Dan..
I've updated my post with better sugestions. Since you posted it here, I guess you want people to use this include and they won't as long as it contains one stupid function.
|
It is my first time making a include, and your already insulting me? Why don't you fuck off!
Re: gLogs - Easiest way of creating logs -
Dan.. - 24.03.2013
Quote:
Originally Posted by FunnyBear
It is my first time making a include, and your already insulting me? Why don't you fuck off!
|
With that attitude, you won't get far. I've said that your function is stupid (pointless, worthless, etc.), not you. I think you are too if you can't tell the difference between insults and constructive criticism.
Re: gLogs - Easiest way of creating logs -
Rock - 24.03.2013
Are you copying
my include?
Re: gLogs - Easiest way of creating logs -
FunnyBear - 24.03.2013
No I'm not! Yours needs y_va to work with it, but mine doesn't!
Re: gLogs - Easiest way of creating logs -
Rock - 24.03.2013
I mean with the syntax and timestamp.