On server closing or opening the server_log.txt get auto reset?
#1

As the answer title, is possible to make a function every time that the server closes or opens the server_log.txt get cleared automatically, to avoid logs lag?

Regards.
Reply
#2

What do you mean logs lag? I never had that issue before.
Reply
#3

That's not an issue, that's a function question.
I want to clear the server log while server closing or opening
Reply
#4

Quote:
Originally Posted by xEF
Посмотреть сообщение
That's not an issue, that's a function question.
I want to clear the server log while server closing or opening
dont start your server
Reply
#5

Make a .bat file to do both.

PHP код:
@echo off
del server_log
.txt /q
samp
-server.exe 
Save this in your server directory as "StartServer.bat", then double-click it.
Reply
#6

Or just clear the log at "OnGameModeInit" by using the io_write method
https://sampwiki.blast.hk/wiki/Fopen
Код:
public OnGameModeInit()
{
    new File:log = fopen("YourlogFile.txt", io_write);
    fwrite(log, "---- Log File Cleared ----");  //you can leave this out if you want
    fclose(log);
    //rest of your cdode
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)