Raised This Month: $32 Target: $400
 8% 

Admin Time Played


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
farhanhyper
Member
Join Date: Dec 2017
Location: Finland
Old 10-31-2018 , 17:17   Admin Time Played
Reply With Quote #1

Hi Guys,

I need a plugin that shows how much time admins played in the server.thank you so much for your attention to my request <3
farhanhyper is offline
Barlap
Senior Member
Join Date: Apr 2016
Location: Romania
Old 11-01-2018 , 04:18   Re: Admin Time Played
Reply With Quote #2

you don't need a plugin, just simple add yourserver on gametracker.com and you can monitoring total hours of each player.
Barlap is offline
Send a message via ICQ to Barlap Send a message via Skype™ to Barlap
Nutu_
AlliedModders Donor
Join Date: Mar 2016
Location: Germany
Old 11-01-2018 , 09:42   Re: Admin Time Played
Reply With Quote #3

i guess that's what u need,
Code:
/playedtime - shows your time on a motd in gt.com
/playedtime name - shows a person's time on a motd in gt.com
Code:
/* Plugin generated by AMXX-Studio */

#include < amxmodx >
#include < amxmisc >

#define PLUGIN "GT Played Time"
#define VERSION "1.1.5"

new const g_szGameTracker[ ] = "http://www.gametracker.com/player";

new g_szServerIp[ 32 ];
new g_szCustomUrl[ 128 ];

public plugin_init( )
{
	//--|Credits to Laurr for his idea. ( https://forums.alliedmods.net/showthread.php?t=220727 ).
	register_plugin( PLUGIN, VERSION, "Askhanar" );
	
	register_clcmd( "say", "HookClCmdSayOrSayTeam" );
	register_clcmd( "say_team", "HookClCmdSayOrSayTeam" );
	
	register_clcmd( "gt_playedtime", "ClCmdPlayedTime" );
	//register_clcmd( "say /playedtime", "ClCmdSayPlayedTime" );
	
	get_user_ip( 0, g_szServerIp, sizeof ( g_szServerIp ) -1, 0 ); //--| Ii luam ip la sv cu tot cu port!
	// Add your code here...
}

public HookClCmdSayOrSayTeam( id )
{
	static szArgs[ 192 ], szCommand[ 192 ];
	read_args( szArgs, sizeof ( szArgs ) -1 );
	
	if( !szArgs[ 0 ] )
		return PLUGIN_CONTINUE;
	
	remove_quotes( szArgs );
	
	if( equal( szArgs,  "/playedtime", strlen(  "playetime" ) ) )
	{
		replace( szArgs, sizeof ( szArgs ) -1, "/", ""  );
		formatex( szCommand, sizeof ( szCommand ) -1, "gt_%s", szArgs );
		client_cmd( id, szCommand );
		return PLUGIN_HANDLED;
	}
	
	return PLUGIN_CONTINUE;
}

public ClCmdPlayedTime( id )  
{
	
	new szFirstArg[ 32 ];
    	read_argv( 1, szFirstArg, sizeof ( szFirstArg ) -1 );

	if( equali( szFirstArg, "" ) ) 
		DisplayPlayedTime( id, id );
	
	else
	{
		
	
		new iPlayer = cmd_target( id, szFirstArg, 8 );
		if(!iPlayer || iPlayer == id )
			return PLUGIN_CONTINUE;
	
		DisplayPlayedTime( id, iPlayer );
	}
	
	return PLUGIN_CONTINUE;
}

public DisplayPlayedTime( id, iPlayer )
{
	new szName[ 32 ];
	get_user_name( iPlayer, szName, sizeof ( szName ) -1 );
	MakeNameSafe( szName, sizeof( szName ) -1 );
	
	formatex( g_szCustomUrl, sizeof ( g_szCustomUrl ) -1, "%s/%s/%s/",
		g_szGameTracker, szName, g_szServerIp );
		
	show_motd( id, g_szCustomUrl );
	
}

MakeNameSafe( szName[ ], iLen )
{
	replace_all( szName, iLen, "#", "%23" );
	replace_all( szName, iLen, "?", "%3F" );
	replace_all( szName, iLen, ":", "%3A" );
	replace_all( szName, iLen, ";", "%3B" );
	replace_all( szName, iLen, "/", "%2F" );
	replace_all( szName, iLen, ",", "%2C" );
	replace_all( szName, iLen, "$", "%24" );
	replace_all( szName, iLen, "@", "%40" );
	replace_all( szName, iLen, "+", "%2B" );
	replace_all( szName, iLen, "=", "%3D" );
	replace_all( szName, iLen, "®", "®" );
	
}
__________________
a simple act of caring creates an endless ripple.

Last edited by Nutu_; 11-02-2018 at 02:46.
Nutu_ is offline
Alber9091
Veteran Member
Join Date: Jun 2014
Location: Karachi, Pakistan
Old 11-01-2018 , 11:59   Re: Admin Time Played
Reply With Quote #4

https://forums.alliedmods.net/showthread.php?t=53126
Alber9091 is offline
farhanhyper
Member
Join Date: Dec 2017
Location: Finland
Old 11-02-2018 , 02:35   Re: Admin Time Played
Reply With Quote #5

@Alber9091 , @Nutu_ , @Barlap thank you so much :X

Last edited by farhanhyper; 11-02-2018 at 02:35.
farhanhyper 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 09:40.


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