Raised This Month: $ Target: $400
 0% 

Total Time Connection


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   Admin Commands       
oMz'
Member
Join Date: Jul 2010
Location: Everywhere ;D
Old 06-27-2011 , 06:48   Total Time Connection
Reply With Quote #1

Total Time Connection v1.1


Description:

This plugin count, for each player, the time past on the server in hours, minutes and seconds.
It uses nVault and can be useful to see if a player often comes on the server.
You can choose to use color or not in the plugin. If you don't want to use color, comment this line :

Code:
#define COLOR
->
Code:
//#define COLOR

And if you want to use it, install this plugin on your server : http://forums.alliedmods.net/showthread.php?p=851160



Cvar:

ttc_addtime (default: 1)
• 1: The plugin add time only if the player is in T/CT Team.
• 2: The plugin add time even if the player is in Spectator Team.


Command:

ttc_infos < authid >

This command will show total time connection of a player even if he is disconnected
That should appears like this:

Code:
] ttc_infos "STEAM_0:1:12345678" 
Total Time Connection of AuthID STEAM_0:1:12345678 : 0 hour, 1 minute, 54 seconds
Flag required : ADMIN_KICK


To do:

- MultiLingual
- Sql Database
- Top15
- ... (gives me others ideas)



Changelog:

Code:
v1.1 - Add ttc_addtime cvar
v1.0 - First release


Thanks to:

- Bugsy for his nVault tutorial
- Highness for some tests



Sorry for my bad english.
Attached Files
File Type: sma Get Plugin or Get Source (TotalTimeConnection.sma - 808 views - 5.0 KB)

Last edited by oMz'; 07-12-2011 at 17:06.
oMz' is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 06-27-2011 , 07:10   Re: Total Time Connection
Reply With Quote #2

  • I'm quite sure I've seen plugins for this already.
  • Using a set_task() for this is a very very poor method for doing this.
  • You can remove:

    PHP Code:
            client_printid print_console "You have not access!" ); 
    because cmd_access() already does it for you already.
__________________
fysiks is offline
oMz'
Member
Join Date: Jul 2010
Location: Everywhere ;D
Old 06-27-2011 , 07:14   Re: Total Time Connection
Reply With Quote #3

Quote:
Originally Posted by fysiks View Post
I'm quite sure I've seen plugins for this already.
Where ?

Quote:
Originally Posted by fysiks View Post
Using a set_task() for this is a very very poor method for doing this.
How can I do without task ?

Quote:
Originally Posted by fysiks View Post
You can remove:

PHP Code:
        client_printid print_console "You have not access!" ); 
because cmd_access() already does it for you already.
Done.
oMz' is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 06-27-2011 , 07:28   Re: Total Time Connection
Reply With Quote #4

https://forums.alliedmods.net/showthread.php?t=23603
https://forums.alliedmods.net/showthread.php?t=53126
__________________
fysiks is offline
GANGSTA_
Senior Member
Join Date: Nov 2010
Location: IR/ Romania
Old 06-27-2011 , 07:40   Re: Total Time Connection
Reply With Quote #5

hmm .. not bad good plugin
__________________
Quitted! Cya xD

Last edited by GANGSTA_; 06-27-2011 at 07:45.
GANGSTA_ is offline
Send a message via Yahoo to GANGSTA_
borjomi
Senior Member
Join Date: May 2010
Location: Russia, Novosibirsk
Old 06-27-2011 , 07:53   Re: Total Time Connection
Reply With Quote #6

Quote:
Originally Posted by oMz' View Post
How can I do without task ?
I think good method is, when player connected, strore in varible connect_time=get_gametime(), when he disconnected total_time=get_gametime()-connect_time and then ++ in his previous time on server
__________________
Selling some Private plugins like anti Fps Hack
and other fun's projects (legal and not very) borjomi-page.at.ua
borjomi is offline
Send a message via ICQ to borjomi
oMz'
Member
Join Date: Jul 2010
Location: Everywhere ;D
Old 06-27-2011 , 08:17   Re: Total Time Connection
Reply With Quote #7

With this both plugins, you can't see the time played of a player disconnected.
oMz' is offline
cFG
SourceMod Donor
Join Date: Aug 2009
Location: Poland, Łódź
Old 06-27-2011 , 11:16   Re: Total Time Connection
Reply With Quote #8

sql addition would be awesome
__________________
HLXBans - worthy successor of AMXBans
cFG is offline
oMz'
Member
Join Date: Jul 2010
Location: Everywhere ;D
Old 06-27-2011 , 11:39   Re: Total Time Connection
Reply With Quote #9

This will be done later
oMz' is offline
koyot
Member
Join Date: Dec 2009
Location: Bulgaria
Old 06-28-2011 , 02:24   Re: Total Time Connection
Reply With Quote #10

Can u add a cvar whitc the plugin save information by nick ?

...sorry for bad EN!
__________________
koyot 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:44.


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