AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   How to get roundtime left? (https://forums.alliedmods.net/showthread.php?t=87020)

AlejandroSk 03-05-2009 16:58

How to get roundtime left?
 
Is there a way to get roundtime left? :oops:

Exolent[jNr] 03-05-2009 17:03

Re: How to get roundtime left?
 
Code:
#include <amxmodx> #include <amxmisc> new Float:g_round_start = -1.0; new Float:g_round_time; new mp_roundtime; public plugin_init() {     register_logevent("EventRoundStart", 2, "1=Round_Start");     register_logevent("EventRoundEnd", 2, "1=Round_End");     register_event("TextMsg", "EventRoundRestart", "a", "2&#Game_C", "2&#Game_w");         mp_roundtime = get_cvar_pointer("mp_roundtime"); } public EventRoundStart() {     g_round_start = get_gametime();     g_round_time = get_pcvar_float(mp_roundtime) * 60.0; } public EventRoundEnd() {     g_round_start = -1.0; } public EventRoundRestart() {     g_round_start = -1.0; } Float:get_roundtime_left() {     return (g_round_start == -1.0) ? 0.0 : ((g_round_start + g_round_time) - get_gametime()); }

ehha 03-05-2009 18:00

Re: How to get roundtime left?
 
http://forums.alliedmods.net/showthread.php?t=61754

AlejandroSk 03-05-2009 18:11

Re: How to get roundtime left?
 
Quote:

Originally Posted by ehha (Post 774741)

ROUND TIMELEFT

@exolent thanksyou

ehha 03-06-2009 06:53

Re: How to get roundtime left?
 
ROUND TIMELEFT & time left in a round, same thing. ConnorMcLeod made it great.

Peasants, please leave your name when you give karma, thanks.


All times are GMT -4. The time now is 17:06.

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