Raised This Month: $ Target: $400
 0% 

get uptime [solved solved solved]


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
kp_uparrow
Penalized Member
Join Date: Jun 2006
Location: 192.168.0.1
Old 07-30-2007 , 21:17   Re: get uptime
Reply With Quote #1

lol opps

lee your uptime in hours is wrong, it goes in to 1:70s (1 hour and 70 minutes), i think same with minutes
__________________
I USED A SECOND ACCOUNT TO DO MORE KARMA UPS AND DOWNS UNTIL GREENTRYST CAUGHT ME

Last edited by kp_uparrow; 07-30-2007 at 21:53.
kp_uparrow is offline
Old 07-30-2007, 22:53
kp_uparrow
This message has been deleted by kp_uparrow.
Lee
AlliedModders Donor
Join Date: Feb 2006
Old 07-31-2007 , 00:22   Re: get uptime
Reply With Quote #3

Try..
Code:
client_print(0, print_chat, "Uptime in hours: %i:%i", upTime / 3600, (uptime / 3600) % 60);
Lee is offline
kp_uparrow
Penalized Member
Join Date: Jun 2006
Location: 192.168.0.1
Old 07-31-2007 , 12:47   Re: get uptime
Reply With Quote #4

:p
__________________
I USED A SECOND ACCOUNT TO DO MORE KARMA UPS AND DOWNS UNTIL GREENTRYST CAUGHT ME
kp_uparrow is offline
Minimum
Senior Member
Join Date: Jun 2006
Old 07-31-2007 , 19:34   Re: get uptime
Reply With Quote #5

Not why you would want to know how long HLDS has been running. But there is a really simple way of getting how long the server has been on the current map in seconds.

Code:
new maptime = get_gametime()

Just my two cents.

Last edited by Minimum; 07-31-2007 at 19:37.
Minimum is offline
Send a message via AIM to Minimum Send a message via MSN to Minimum
kp_uparrow
Penalized Member
Join Date: Jun 2006
Location: 192.168.0.1
Old 07-31-2007 , 21:23   Re: get uptime
Reply With Quote #6

i need uptime, not time on map
__________________
I USED A SECOND ACCOUNT TO DO MORE KARMA UPS AND DOWNS UNTIL GREENTRYST CAUGHT ME
kp_uparrow is offline
Lee
AlliedModders Donor
Join Date: Feb 2006
Old 07-31-2007 , 22:15   Re: get uptime
Reply With Quote #7

You haven't told me whether or not it worked.. You can try searching Google for ways to convert seconds to hours if not..
Lee is offline
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 08-01-2007 , 04:43   Re: get uptime
Reply With Quote #8

I have this plugin on my server and it's works fine! VEN's idea.
Attached Files
File Type: sma Get Plugin or Get Source (uptime_shower.sma - 607 views - 762 Bytes)
__________________
Still...lovin' . Connor noob! Hello
Alka is offline
kp_uparrow
Penalized Member
Join Date: Jun 2006
Location: 192.168.0.1
Old 08-01-2007 , 13:20   Re: get uptime
Reply With Quote #9

whats with the float to string to num?
__________________
I USED A SECOND ACCOUNT TO DO MORE KARMA UPS AND DOWNS UNTIL GREENTRYST CAUGHT ME
kp_uparrow is offline
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 08-01-2007 , 14:38   Re: get uptime
Reply With Quote #10

In my version 'Uptime' is returned in Float:Seconds... so i convert float in num , to convert in hours, mins easyer
__________________
Still...lovin' . Connor noob! Hello

Last edited by Alka; 08-01-2007 at 14:41.
Alka is offline
Reply



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 07:58.


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