Raised This Month: $ Target: $400
 0% 

Catch "player connected" string in a log.


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Jo Jim
New Member
Join Date: Sep 2008
Old 05-21-2009 , 12:20   Catch "player connected" string in a log.
Reply With Quote #1

Hi,
For some purpose i would like to catch the string in the log like
L 05/21/2009 - 19:52:20: "NickName<1082><4294967295><>" connected, address "XXX.XXX.XXX.XXX:XXXX"
I would like to do it with register_logevent() command. But there are some tricks for this particular case. I did not found similar example. I tried several combinations but all of them don't work. I believe there is something very simple what i can't see.
Could somebody please help to bring the following code in order.
Code:
public plugin_init ()
{
    register_plugin ( PLUGIN, VERSION, AUTHOR )
    log_message("[AMXX] Connect_catch")
    register_logevent( "event_user_connected", 3, "1=connected, address" )
    return PLUGIN_CONTINUE 
}
public event_user_connected()
{
    new Arg0[64], Arg2[64], 
    read_logargv(0,Arg0,63) 
    read_logargv(2,Arg2,63) 
    log_message("[AMXX] Connect_catch:", Arg0, Arg2)
    return PLUGIN_CONTINUE
}
I believe there is something wrong with comma. Maybe it makes 4 parameters instead of 3. I tried:
Code:
register_logevent( "event_user_connected", 4, "1=connected" "2=address" )
It don't work either.
Jo Jim is offline
 



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 01:24.


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