Raised This Month: $ Target: $400
 0% 

What do i have to change in the admin.sma?


Post New Thread Reply   
 
Thread Tools Display Modes
djmd378
Senior Member
Join Date: Sep 2004
Old 11-27-2007 , 19:30   Re: What do i have to change in the admin.sma?
Reply With Quote #11

I just noticed that I should have used client_authorized instead because client_connect doesn't always have the users STEAM_ID yet. So heres the fixed version + what ever you wanted the rest for.


PHP Code:
#include <amxmodx>
#include <amxmisc> 

#define PLUGIN  "Log Connections"
#define VERSION "0.2" 
#define AUTHOR  "MysticDeath.com"

public plugin_init()
        
register_plugin(PLUGINVERSIONAUTHOR)

public 
client_authorized(id) { // calls when client connects to server and server obtains their steam id

        
if (is_user_admin(id) || is_user_bot(id))
                return

        new 
szName[36], szAuthid[36], szIP[36], sFlags[36], PingLoss
        get_user_name
(idszName35// gets connecting players name
        
get_user_authid(idszAuthid35// steam id..
        
get_user_ip(idszIP35// ip...
        
get_flags(idsFlags35// flags..
        
get_user_ping(idPingLoss// ping...

        
log_amx("Connected: ^"%s<%d><%s><>^" (access ^"%s^") (address ^"%s^") (ping ^"%i^") (loss ^"%i^")"szNameget_user_userid(id), szAuthidsFlagsszIPPingLoss// logs to log file that player has connected

__________________
djmd378 is offline
cs1.6
Senior Member
Join Date: Dec 2006
Old 11-27-2007 , 20:11   Re: What do i have to change in the admin.sma?
Reply With Quote #12

Oh my god, djmd378 you have made my dream come true!

Thanks so much, man! I really needed this little treasure! If i can help you out in anyway, just tell me! I'm always open for testing scripts and plugins on the server and give feedback from me as well as from the players.

It compiled flawlessly and works like a charm!

Cheers!
cs1.6 is offline
alexinno
Senior Member
Join Date: Mar 2007
Location: C:\
Old 11-28-2007 , 05:26   Re: What do i have to change in the admin.sma?
Reply With Quote #13

this is a really nice little script , what i would like to add is , how can i keep the log's up to 60 days ?
alexinno is offline
cs1.6
Senior Member
Join Date: Dec 2006
Old 12-01-2007 , 16:31   Re: What do i have to change in the admin.sma?
Reply With Quote #14

Hey djmd378 ,

This plugin has become my bread and butter for everyday server monitoring. It is an absolute neccessity for me and i really have fun using it every time, because i remember how it was before i had that! I was a real pain!


As said i am more than happy to have this plugin, but if you have time and you feel like it, you could take a look at it and figure out if it would take much time to make the ping function work. It allways shows (ping "0") (loss "0") with every user. Man, THAT would be a thing, if i finally could even see the ping of the players! For me it would be like a world wonder!

Thanks,

cs
cs1.6 is offline
alexinno
Senior Member
Join Date: Mar 2007
Location: C:\
Old 12-02-2007 , 03:44   Re: What do i have to change in the admin.sma?
Reply With Quote #15

the loged flags are mess up too
Code:
L 12/02/2007 - 10:55:49: [log.amxx] Connected: "KGB<439><VALVE_ID_LAN><>" (access "abc") (address "IP") (ping "0") (loss "0")
L 12/02/2007 - 10:55:56: [log.amxx] Connected: "andandu<440><VALVE_ID_LAN><>" (access "a") (address "IP") (ping "0") (loss "0$
L 12/02/2007 - 11:05:52: [log.amxx] Connected: "ChAoS.RbK - Frost<441><VALVE_ID_LAN><>" (access "a") (address "IP") (ping "0")$
L 12/02/2007 - 11:06:32: [log.amxx] Connected: "ursus<442><VALVE_ID_LAN><>" (access "b") (address "IP") (ping "0") (loss "0")
L 12/02/2007 - 11:39:51: [log.amxx] Connected: "Pitch<443><VALVE_ID_LAN><>" (access "ab") (address "IP") (ping "0") (loss "$
L 12/02/2007 - 11:40:41: [log.amxx] Connected: "-=ArX=-ElementaL<444><VALVE_ID_LAN><>" (access "c") (address "IP") (ping "0$
alexinno is offline
djmd378
Senior Member
Join Date: Sep 2004
Old 12-03-2007 , 19:23   Re: What do i have to change in the admin.sma?
Reply With Quote #16

Sorry, the flags was my bad. For the ping issue, it isn't showing because the user is still connecting to the server when it checks for the ping thus it shows as 0. To fix this I added a delay before it logs.

PHP Code:
#include <amxmodx>
#include <amxmisc> 

#define PLUGIN  "Log Connections"
#define VERSION "0.3" 
#define AUTHOR  "MysticDeath.com"

#define LOGTASK 84516

public plugin_init()
        
register_plugin(PLUGINVERSIONAUTHOR)

public 
client_authorized(id) { // calls when client connects to server and server obtains their steam id

        
if (is_user_admin(id) || is_user_bot(id))
                return

        
set_task(30.0"logstuff"id+LOGTASK)
}

public 
client_disconnect(id)
        if (
task_exists(id+LOGTASK))
                
remove_task(id+LOGTASK)

public 
logstuff(task_id) {
        new 
id task_id-LOGTASK

        
if (!is_user_connected(id))
                return

        new 
szName[36], szAuthid[36], szIP[36], sFlags[36], Flags get_user_flags(id), PingLoss
        get_user_name
(idszName35// gets connecting players name
        
get_user_authid(idszAuthid35// steam id..
        
get_user_ip(idszIP35// ip...
        
get_flags(FlagssFlags35// flags..
        
get_user_ping(idPingLoss// ping...

        
log_amx("Connected: ^"%s<%d><%s><>^" (access ^"%s^") (address ^"%s^") (ping ^"%i^") (loss ^"%i^")"szNameget_user_userid(id), szAuthidsFlagsszIPPingLoss// logs to log file that player has connected

__________________
djmd378 is offline
cs1.6
Senior Member
Join Date: Dec 2006
Old 12-03-2007 , 19:55   Re: What do i have to change in the admin.sma?
Reply With Quote #17

Quote:
Originally Posted by djmd378 View Post
Sorry, the flags was my bad. For the ping issue, it isn't showing because the user is still connecting to the server when it checks for the ping thus it shows as 0. To fix this I added a delay before it logs.
Awesome! I'm gonna try it out, right now! The reason why the pings couln't be showed at the time the ping was asked, is kinda what i expected, too! The delay you added for getting the user ping sounds fantasic and is the perfect logical solution for that problem! I can't wait to see the pings!

Last edited by cs1.6; 12-03-2007 at 19:58.
cs1.6 is offline
cs1.6
Senior Member
Join Date: Dec 2006
Old 12-03-2007 , 20:16   Re: What do i have to change in the admin.sma?
Reply With Quote #18

HA HA!..it (compiles and) works perfectly! I can't believe i can see the user pings now! It's awesome, the pings are the same i know from the individual players when i am in the game with them. The old laggers that i know and the guys that always have a good ping..haha.

'Loss' is always 0 though, i don't know if that's correct and is supposed to be!

Oh ..and the flag accesses are a perfect 'z' now!

This is such a usefull and perfect functioning plugin! It's worth to be released..though it's so cool that i want it just for myself!
cs1.6 is offline
M249-M4A1
I <3 Mac
Join Date: May 2005
Location: Not interested
Old 12-03-2007 , 20:52   Re: What do i have to change in the admin.sma?
Reply With Quote #19

Loss is usually 0, and that's a good thing
__________________
M249-M4A1 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 23:13.


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