Raised This Month: $ Target: $400
 0% 

Detect Round Time 0:00


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
VEN
Veteran Member
Join Date: Jan 2005
Old 04-15-2007 , 12:16   Re: Detect Round Time 0:00
Reply With Quote #1

Alka's code will not work. I believe he just thought that you need to check if mp_roundtime CVar value is equal to 0. But this is not the case here.

This is the only way to do it
Code:
#include <amxmodx> #define TASK_ID 934279423 new g_pcvar_mp_roundtime public plugin_init() {         register_event("HLTV", "remove_existing_task", "a", "1=0", "2=0")         register_logevent("logevent_round_start", 2, "1=Round_Start")         register_logevent("remove_existing_task", 3, "2=Planted_The_Bomb")         g_pcvar_mp_roundtime = get_cvar_pointer("mp_roundtime") } public logevent_round_start() {         set_task(float(floatround(get_pcvar_float(g_pcvar_mp_roundtime) * 60.0, floatround_floor)), "time_is_up", TASK_ID) } public time_is_up() {         set_cvar_num("sv_restart", 1) } public remove_existing_task() {         if (task_exists(TASK_ID))                 remove_task(TASK_ID) }

Last edited by VEN; 04-15-2007 at 12:23.
VEN 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 11:22.


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