get uptime [solved solved solved]
how do i get the uptime that the server has been running, not how long this map has been or the system time, i want the time since hlds.exe was launched
|
Re: get uptime
Why not store get_systime() at server start and calculate it from that?
|
Re: get uptime
oh boy i guess this is no get uptime
systime then i would have to do all those differnt calculations thx anyways |
Re: get uptime
I haven't tested this, but it definitely doesn't involve anything remotely complex.. You could also use set_localinfo() rather than a cvar.
Code:
|
Re: get uptime
The most simple way would be: new Float:uptime = engfunc(EngFunc_Time)
|
Re: get uptime
which one do i try? lee or ven? ill try lee's
|
Re: get uptime
VEN's suggestion works fine! :wink:
|
Re: get uptime
ven's give me this:
uptime 1127667941 while the actual uptime is 3 ?? |
Re: get uptime
lee the "server_start_time" is "%i" LOL
works fine when i go: new zomg=get_systime() st = register_cvar("server_start_time", "0"); if(get_pcvar_num(st)==0){ server_cmd("server_start_time %d",zomg) } |
Re: get uptime
Quote:
Correct: server_print("%f", uptime) Incorrect: server_print("%d", uptime) Incorrect: server_print("%i", uptime) |
| All times are GMT -4. The time now is 07:58. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.