AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Approved Plugins (https://forums.alliedmods.net/forumdisplay.php?f=8)
-   -   Played Time (https://forums.alliedmods.net/showthread.php?t=53126)

Alka 03-26-2007 09:58

Played Time
 
2 Attachment(s)
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

vvg125 03-26-2007 10:11

Re: Played Time
 
Would it be possible to also add total played time using MySQL or nVault?

Da_sk8rboy 03-26-2007 10:13

Re: Played Time
 
Quote:

Originally Posted by vvg125 (Post 457080)
Would it be possible to also add total played time using MySQL or nVault?

yeah, i agree that'd be nice.

mp5ser 03-26-2007 10:54

Re: Played Time
 
then what is the command for players?

Alka 03-26-2007 11:43

Re: Played Time
 
@vvq125 - Yeah....would be nice....Maybe i do this :) Thanks....
@mp5ser - I updated the main post! Command: !ptime :wink:

YamiKaitou 03-26-2007 12:14

Re: Played Time
 
Quote:

Originally Posted by Alka (Post 457071)
  • 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.

Alka 03-26-2007 12:26

Re: Played Time
 
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! :wink:

Arkshine 03-26-2007 12:29

Re: Played Time
 
It means, I think :

amx_tdmode <0|1> : 0 = chat only ; 1 = Hud only

Alka 03-26-2007 12:31

Re: Played Time
 
now i get the point. :P thanks...
Updated

Arkshine 03-26-2007 12:52

Re: Played Time
 
I don't understand why you've done that :

Code:

if (timep==1)
{
    [...]
}



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

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