Raised This Month: $51 Target: $400
 12% 

[REQ] Steam ID logger


Post New Thread Reply   
 
Thread Tools Display Modes
rtk
Senior Member
Join Date: Dec 2009
Old 02-07-2011 , 16:16   Re: [REQ] Steam ID logger
Reply With Quote #11

Someone please give me the script to do this (as said on the first post).
__________________
Never argue with an idiot. He lowers you to his level and then wins on experience!
rtk is offline
McFlurry
Veteran Member
Join Date: Mar 2010
Location: RemoveEdict(0);
Old 02-07-2011 , 17:03   Re: [REQ] Steam ID logger
Reply With Quote #12

PHP Code:
new String:path[PLATFORM_MAX_PATH];

public 
OnPluginStart()
{
    
BuildPath(Path_SMpathsizeof(path), "logs\steams.log");
}    

public 
OnClientAuthorized(client, const String:auth[])
{
    new 
Handle:file OpenFile(path"a");
    
WriteFileLine(fileauth);
    
FlushFile(file);
    
CloseHandle(file);

This should work.
__________________
McFlurry is offline
Send a message via Skype™ to McFlurry
FaTony
Veteran Member
Join Date: Aug 2008
Old 02-07-2011 , 17:35   Re: [REQ] Steam ID logger
Reply With Quote #13

You forgot "\n".
__________________
FaTony is offline
McFlurry
Veteran Member
Join Date: Mar 2010
Location: RemoveEdict(0);
Old 02-07-2011 , 17:39   Re: [REQ] Steam ID logger
Reply With Quote #14

Sourcemod API says "A new line is automatically appended" for WriteFileLine
__________________
McFlurry is offline
Send a message via Skype™ to McFlurry
FaTony
Veteran Member
Join Date: Aug 2008
Old 02-07-2011 , 17:58   Re: [REQ] Steam ID logger
Reply With Quote #15

Oh, ok then.
__________________
FaTony is offline
rtk
Senior Member
Join Date: Dec 2009
Old 02-13-2011 , 11:06   Re: [REQ] Steam ID logger
Reply With Quote #16

Quote:
Originally Posted by McFlurry View Post
PHP Code:
new String:path[PLATFORM_MAX_PATH];

public 
OnPluginStart()
{
    
BuildPath(Path_SMpathsizeof(path), "logs\steams.log");
}    

public 
OnClientAuthorized(client, const String:auth[])
{
    new 
Handle:file OpenFile(path"a");
    
WriteFileLine(fileauth);
    
FlushFile(file);
    
CloseHandle(file);

This should work.
Thank you very much for the code, but cant compile it...
error 027: invalid character constant

I'm probably missing something...
__________________
Never argue with an idiot. He lowers you to his level and then wins on experience!
rtk is offline
MomemtumMori
SourceMod Donor
Join Date: Oct 2009
Old 02-13-2011 , 12:49   Re: [REQ] Steam ID logger
Reply With Quote #17

The backslash must be disabled.
PHP Code:
"logs\\steams.log" 
But doesnt sourcemod takes '/' only?
__________________
MomemtumMori is offline
rtk
Senior Member
Join Date: Dec 2009
Old 02-13-2011 , 13:04   Re: [REQ] Steam ID logger
Reply With Quote #18

Replaced with '/' and its working fine.
Thank you guys very much
__________________
Never argue with an idiot. He lowers you to his level and then wins on experience!
rtk is offline
Danny_l4d
Senior Member
Join Date: Feb 2010
Old 02-22-2011 , 21:59   Re: [REQ] Steam ID logger
Reply With Quote #19

is it also possible to add IP and name in this code?
__________________
Danny_l4d is offline
Leonardo
Veteran Member
Join Date: Feb 2010
Location: 90's
Old 02-23-2011 , 03:15   Re: [REQ] Steam ID logger
Reply With Quote #20

PHP Code:
new String:sFilePath[PLATFORM_MAX_PATH];

public 
OnPluginStart()
    
BuildPath(Path_SMsFilePathsizeof(sFilePath), "logs/steams.log");

public 
OnClientAuthorized(iClient, const String:sClientAuth[])
{
    new 
Handle:hFile OpenFile(sFilePath"a");

    new 
String:sClientIP[16];
    
GetClientIP(iClientsClientIPsizeof(sClientIP), true);

    new 
String:sLine[4096];
    
Format(sLinesizeof(sLine), "%d %s %s %N"GetTime(), sClientAuthsClientIPiClient);

    
WriteFileLine(hFilesLine);
    
FlushFile(hFile);

    
CloseHandle(hFile);


Last edited by Leonardo; 02-23-2011 at 03:20.
Leonardo is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 06:13.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode