View Single Post
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 12-08-2011 , 14:00   Re: SM RCon (updated 2011-09-29)
Reply With Quote #14

Can someone give advice, how I could log actions without showing to rcon user/spammer ?


Happen:
SMRCon_OnAuth()
SMRCon_OnCommand()

(And maybe rest Action: functions)...

PHP Code:
#include <smrcon>
new String:path[256];

public 
OnPluginStart()
{
    
BuildPath(Path_SMpathsizeof(path), "logs/smrcon.txt");
    
//RegConsoleCmd("sm_testi", testi);
}

public 
Action:testi(clientargs)
{
    
LogToFileEx(path"SMRCon_IsCmdFromRCon(%s)"SMRCon_IsCmdFromRCon() ? "true":"false");
    return 
Plugin_Handled;
}

public 
Action:SMRCon_OnAuth(rconId, const String:address[], const String:password[], &bool:allow)
{
    
//LogToFile(path, "rconId %i, address %s, password %s %s", rconId, address, password, allow ? "allow":"deny");
    
LogToFileEx(path"Liirum laarum");
}

public 
Action:SMRCon_OnCommand(rconId, const String:address[], const String:command[], &bool:allow)
{
    
//LogToFile(path, "rconId %i, address %s, command %s %s", rconId, address, command, allow ? "allow":"deny");
    
LogToFileEx(path"Uliuliuli huhuhu");
}

public 
SMRCon_OnDisconnect(rconId)
{
    
//LogToFile(path, "SMRCon_OnDisconnect(%i)", rconId);
    
LogToFileEx(path"Poispois");
}

public 
Action:SMRCon_OnLog(rconId, const String:address[], const String:logdata[])
{
    
//LogToFile(path, "rconId %i, address %s, logdata %s", rconId, address, logdata);
    
LogToFileEx(path"Tuu tuu tuu");

Should I delay this logging with datatimer ??
Attached Thumbnails
Click image for larger version

Name:	smrcon.gif
Views:	1321
Size:	28.8 KB
ID:	96433  
__________________
Do not Private Message @me
Bacardi is offline