Command logging
#1

Hey!

Right now, my server just logs the regular chat into the server console and server_log.txt file.
I want to log every command and text with parametres to another file.
I'm using zcmd and sscanf for commands.

Currently I can only see, that possible way to make a log for commands, is to create a log file and add a piece of code to every command, that would send the command with parametres to the file.

Is there any other way?
Reply
#2

pawn Code:
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
    printf("[CMD]%s |%s|%d", PlayerName(playerid), cmdtext, success);
    return 1;
}
This prints it to the server_log.txt. Feel free to modify it as you wish.
Reply
#3

Thanks, works great.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)