[Include] gLogs - Easiest way of creating logs
#1

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
Reply
#2

Any comments?
Reply
#3

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,_}:...);
Reply
#4

Quote:
Originally Posted by Dan..
Посмотреть сообщение
Try implementing this function:
Код:
WriteLog(log, format[], {Float,_}:...);
It is fine my way.
Reply
#5

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.
Reply
#6

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!
Reply
#7

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.
Reply
#8

Are you copying my include?
Reply
#9

No I'm not! Yours needs y_va to work with it, but mine doesn't!
Reply
#10

I mean with the syntax and timestamp.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)