Raised This Month: $ Target: $400
 0% 

finding server uptime


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Ghosted
Veteran Member
Join Date: Apr 2015
Location: Georgia
Old 06-27-2018 , 12:52   Re: finding server uptime
Reply With Quote #3

Quote:
Originally Posted by edon1337 View Post
PHP Code:
#include < amxmodx >

new g_iUpTime;

new const 
g_szLogFile[ ] = "ServerUptime.txt";

public 
plugin_init( )
{
    
register_plugin"Server Uptime Calculator""1.0""DoNii" );
    
set_task1.0"ServerRun"666__"b" );
}

public 
plugin_end( )
{
    
remove_task666 );

    
log_to_fileg_szLogFile"Server has been running for: %d seconds, %d hours, %d days"g_iUpTimeSecondsToHoursg_iUpTime ), SecondsToDaysg_iUpTime ) );
}

public 
ServerRun( )
{
    
g_iUpTime += 1;
}

SecondsToHoursiValue )
{
    return ( 
iValue 3600 );
}

SecondsToDaysiValue )
{
    return ( 
iValue 86400 );


666 ? huh? I smell hell.
__________________

[MOD] CS Weapon Mod V1.7.1
[MM] MetaMod-C V1.0
[MOD] CS NPC Mod (5%)


Probably Left AM
Ghosted is offline
 



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:27.


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