Small question! - 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: Small question! (
/showthread.php?tid=553307)
Small question! -
Ryz - 29.12.2014
hey i needed to write upto 15 different logs for my server so i want to know that
Which one is good for log writing dini or Y_ini?
Re: Small question! -
Nitin - 29.12.2014
y_ini
Re: Small question! -
Ryz - 29.12.2014
i just added 25 lines of Y_ini in gamemode for log writing and gm size 5 mb increased! its normal?
AW: Small question! -
CutX - 29.12.2014
Quote:
Originally Posted by Ryz
i just added 25 lines of Y_ini in gamemode for log writing and gm size 5 mb increased! its normal?
|
ye that's normal.
if you include y_ini, following files also get included (by y_ini)
Код:
internal/y_version (also including a_http here, version checks)
internal/y_natives
internal/y_globaltags
y_scriptinit
y_utils
y_debug
internal/y_funcinc
y_amx
y_bit
y_cell
y_inline
y_malloc
y_hooks
internal/y_unique
y_hooks/impl
internal/y_plugins
y_als
ppl often freak out about the file size after including YSI ^^
but all that stuff is necessary for everything to work the way it should.
Re: Small question! -
Ryz - 29.12.2014
ohh ok ty
Re: Small question! -
dominik523 - 29.12.2014
If you need simple logs, you can use this (it was not made by me):
pawn Код:
stock Log(sz_fileName[], sz_input[]) {
new sz_logEntry[156], i_dateTime[2][3], File: fileHandle = fopen(sz_fileName, io_append);
gettime(i_dateTime[0][0], i_dateTime[0][1], i_dateTime[0][2]);
getdate(i_dateTime[1][0], i_dateTime[1][1], i_dateTime[1][2]);
format(sz_logEntry, sizeof(sz_logEntry), "[%i/%i/%i - %i:%i:%i] %s\r\n", i_dateTime[1][0], i_dateTime[1][1], i_dateTime[1][2], i_dateTime[0][0], i_dateTime[0][1], i_dateTime[0][2], sz_input);
fwrite(fileHandle, sz_logEntry);
return fclose(fileHandle);
}