Raised This Month: $ Target: $400
 0% 

Server time


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Alucard^
AMXX Moderator: Others
Join Date: Sep 2007
Location: Street
Old 06-14-2010 , 12:45   Re: Server time
Reply With Quote #2

You mean this?

Is just an example ofcourse...

Code:
#include <amxmodx> #define PLUGIN "SchlumPF" #define VERSION "1.0" #define AUTHOR "Uptime" new g_bRoundStarted; new g_iMessageSayText; new g_pAlert; public plugin_init( ) {     register_plugin( PLUGIN, VERSION, AUTHOR );         g_pAlert = register_cvar( "uptime_alert", "1" );         register_clcmd( "say /up", "cmdUptime" );     register_clcmd( "say /uptime", "cmdUptime" );         g_iMessageSayText = get_user_msgid( "SayText" )         register_logevent( "eventRoundStart", 2, "1=Round_Start" );     register_message( get_user_msgid( "RoundTime" ), "msgRoundTime" ); } public cmdUptime( plr ) {     static message[192], gametime;     message[0] = 0x04;     formatex( message[1], 190, "[XJ] " );     message[6] = 0x01;         gametime = floatround( get_gametime( ), floatround_floor );         formatex( message[7], 186, "This server's uptime is %02i:%02i", gametime / 60, gametime % 60 );         message_begin( MSG_ONE_UNRELIABLE, g_iMessageSayText, { 0, 0, 0 }, plr );     write_byte( plr );     write_string( message );     message_end( );         return PLUGIN_HANDLED; } public eventRoundStart( ) {     g_bRoundStarted = true; } public msgRoundTime( ) {     if( g_bRoundStarted )     {         g_bRoundStarted = false;         set_task( 3600.0 , "tskTimerBug" );     } } public tskTimerBug( ) {     if( get_pcvar_num( g_pAlert ) )     {         static message[192];         message[0] = 0x04;         formatex( message[1], 190, "[XJ] " );         message[6] = 0x01;                 formatex( message[7], 186, "Uptime is now 60:00, better restart to avoid timerbugs!" );                 for( new i ; i <= get_maxplayers( ) ; i++ )         {             message_begin( MSG_ONE_UNRELIABLE, g_iMessageSayText, { 0, 0, 0 }, i);             write_byte( i );             write_string( message );             message_end( );         }     } }
__________________
Approved Plugins - Steam Profile

Public non-terminated projects:
All Admins Menu, HLTV parameters, Subnick,
Second Password (cool style), InfoZone,
Binary C4 plant/defuse, and more...

Private projects:
NoSpec (+menu), NV Surf Management,
PM Adanved System, KZ longjump2, and more...
Alucard^ is offline
Send a message via Skype™ to Alucard^
 



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 14:43.


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