Raised This Month: $ Target: $400
 0% 

Milisecond Timer


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
OvidiuS
Chillaxin'
Join Date: Dec 2009
Location: Serbia
Old 08-15-2012 , 21:04   Re: Milisecond Timer
Reply With Quote #5

http://forums.alliedmods.net/showthread.php?t=146556
Quote:
Code:
#include <amxmodx> #include <engine> new const Version[] = "0.1"; const iCountTime = 1500; new g_iCountdownEntity; new g_iCounter; public plugin_init() {     register_plugin( "Fast Countdown" , Version , "bugsy" );         g_iCountdownEntity = create_entity( "info_target" );     entity_set_string( g_iCountdownEntity , EV_SZ_classname , "countdown_entity" );     register_think( "countdown_entity" , "fw_CountdownEntThink" );         register_clcmd( "say /countdown" , "ShowCountdown" ); } public ShowCountdown() {     g_iCounter = iCountTime;     entity_set_float( g_iCountdownEntity , EV_FL_nextthink , get_gametime() + 0.01 ); } public fw_CountdownEntThink( iEntity ) {     if ( iEntity == g_iCountdownEntity )     {         set_hudmessage( 255 , 255 , 255 , -1.0 , -1.0 , 0 , 0.1 , 0.1 );         show_hudmessage( 0 , "[ Countdown ends in: %d ]" , --g_iCounter );                 if ( g_iCounter )             entity_set_float( g_iCountdownEntity , EV_FL_nextthink , get_gametime() + 0.01 );         else             server_cmd( "sv_restartround 1" );     } }
OvidiuS is offline
Send a message via Skype™ to OvidiuS
 



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 05:50.


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