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

Played Time


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   Statistical        Approver:   Hawk552 (427)
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 03-26-2007 , 09:58   Played Time
Reply With Quote #1

Played Time v1.3
[IMG]http://img183.**************/img183/7858/playedtimems6.png[/IMG]

Author: Alka;
Version: v1.3;
  • Description:
-With this plugin players can know how much they stay on a server & current time with one command.
-The thime can show in HUD or in chat message controled by Cvar.
-In message is show the "current played time","total played" time and current-time.
-Admins can know played time of a player.
-Played time is shown in minutes.
-The time is store in "data/Vault folder" and when the player connects his total played time is loaded!(New and Improved).
-Original plugin use IP to store vaultdata.If you want to use Authid just use "played_time_authid"!
-Have a Prune function to delete vaultdata old than "x" time.
-Top15 for TotalPlayedTime.(*Only for online players).
(Note:TotalPlayedTime is show in Chat and admin command.)
  • Cvars:
amx_pt_mod (Default 1) -Message type(0=Plugin Off , 1=Chat, 2=Hud)
  • Admin command:
amx_playedtime "#name" - See (total)played time of a player.
  • Player command:
!ptime - See (total)played time & current time.
/pttop15 - Top15 for TotalPlayedTime.( * )
  • Changelog:
v1.0
-First release.
-Code optimized by arkshine.
v1.1
-Now plugin use nvault to store total played time.
-Fixed chat bug.
v1.2
-Changed Vault functions to nVault(nvault are faster so it shouldn't make any lag at all)
v1.3
-Added Prune function.
-Added Top15 for TotalPlayedTime.(Only for online players).
  • Required Module:
nVault - If you want to store total played time.
(Note:If you don't want to store total played time just comment this line):
Code:
#define NVAULT
Prune Function:
1.Uncomment this line:
Code:
//#define PRUNE

2.Set prune time(in seconds):
Code:
#define PRUNE_TIME 2592000
  • Credits:
arkshine - Optimized version.
Deviance - nVault functions.
XxAvalanchexX
Attached Files
File Type: sma Get Plugin or Get Source (played_time.sma - 17687 views - 5.3 KB)
File Type: sma Get Plugin or Get Source (played_time_authid.sma - 12607 views - 5.5 KB)
__________________
Still...lovin' . Connor noob! Hello

Last edited by Alka; 04-09-2007 at 13:19.
Alka is offline
vvg125
AMX Mod X Beta Tester
Join Date: Dec 2006
Location: Queens (Douglaston), New
Old 03-26-2007 , 10:11   Re: Played Time
Reply With Quote #2

Would it be possible to also add total played time using MySQL or nVault?
__________________
vvg125 is offline
Send a message via AIM to vvg125 Send a message via MSN to vvg125 Send a message via Yahoo to vvg125
Da_sk8rboy
Veteran Member
Join Date: Jul 2006
Old 03-26-2007 , 10:13   Re: Played Time
Reply With Quote #3

Quote:
Originally Posted by vvg125 View Post
Would it be possible to also add total played time using MySQL or nVault?
yeah, i agree that'd be nice.
__________________
i stop around here and there.
Da_sk8rboy is offline
mp5ser
New Member
Join Date: Jan 2007
Old 03-26-2007 , 10:54   Re: Played Time
Reply With Quote #4

then what is the command for players?
mp5ser is offline
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 03-26-2007 , 11:43   Re: Played Time
Reply With Quote #5

@vvq125 - Yeah....would be nice....Maybe i do this Thanks....
@mp5ser - I updated the main post! Command: !ptime
__________________
Still...lovin' . Connor noob! Hello
Alka is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 03-26-2007 , 12:14   Re: Played Time
Reply With Quote #6

Quote:
Originally Posted by Alka View Post
  • Cvars:
amx_ptinchat 1 / 0 (Default 0)
amx_ptinhud 1 / 0 (Default 1)
(Note:Only one type of message can be used!)

What is the point of having 2 cvars if they both can't be enabled? Try putting it into one cvar.
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 03-26-2007 , 12:26   Re: Played Time
Reply With Quote #7

amx_ptinchat is to show message in Chat, & amx_ptinhud is to show message in HUD,can't be both "1",or use chat messages or Hud!
__________________
Still...lovin' . Connor noob! Hello
Alka is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 03-26-2007 , 12:29   Re: Played Time
Reply With Quote #8

It means, I think :

amx_tdmode <0|1> : 0 = chat only ; 1 = Hud only
__________________
Arkshine is offline
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 03-26-2007 , 12:31   Re: Played Time
Reply With Quote #9

now i get the point. thanks...
Updated
__________________
Still...lovin' . Connor noob! Hello

Last edited by Alka; 03-26-2007 at 12:35.
Alka is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 03-26-2007 , 12:52   Re: Played Time
Reply With Quote #10

I don't understand why you've done that :

Code:
if (timep==1) 
{
    [...]
}
__________________
Arkshine is offline
Reply


Thread Tools
Display Modes

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 00:57.


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