Raised This Month: $ Target: $400
 0% 

Countdown


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ironskillz1
AlliedModders Donor
Join Date: Jul 2012
Location: Sweden
Old 01-18-2013 , 16:45   Countdown
Reply With Quote #1

i made a little countdown
its doesnt working so well
1. the numbers is on each other but the countdown works
2. its flashing when other hud message on the screen comes up ? can i some how fix that?

and how can i add so when the countdown is on 0 i can set a hud message
Code:
public CountDown()
{
 set_task( 3.0, "CountDown1")
} 
public CountDown1()
{
 g_iCountTime = CountSeconds;
 set_task( 1.0, "Count" , _ , _ , _ , "a" , g_iCountTime );
}
public Count() 
{        
 set_hudmessage ( 10, 10, 255, -1.0, 0.35, 0, 0.1, 5.0, 0.1, 0.1, -1 )  
 show_hudmessage( 0 , "[%d] Seconds left to hide!" , g_iCountTime-- );
 
}
__________________
I have many private and unique plugins for Jailbreak and Hide'N'Seek. PM me for more info.

Pm me.

Check out my roulette site.
ironskillz1 is offline
Send a message via Skype™ to ironskillz1
Bos93
Veteran Member
Join Date: Jul 2010
Old 01-18-2013 , 18:45   Re: Countdown
Reply With Quote #2

http://www.amxmodx.org/funcwiki.php?...sage&go=search

Quote:
1. the numbers is on each other but the countdown works
big hold time.

set_hudmessage ( 10, 10, 255, -1.0, 0.35, 0, 0.1, 5.0, 0.1, 0.1, -1 )
--->
set_hudmessage ( 10, 10, 255, -1.0, 0.35, 0, 0.1, 1.0, 0.1, 0.1, -1 )

Quote:
2. its flashing when other hud message on the screen comes up ? can i some how fix that?
use CreateHudSyncObj() or dhud
__________________

Last edited by Bos93; 01-18-2013 at 18:46.
Bos93 is offline
Send a message via ICQ to Bos93 Send a message via Skype™ to Bos93
Blizzard_87
Veteran Member
Join Date: Oct 2012
Old 01-19-2013 , 02:00   Re: Countdown
Reply With Quote #3

PHP Code:
#include <amxmodx>

#define TASKID  1996
#define SECONDS 10

new iSeconds

public plugin_init()
{
    
register_plugin"Countdown Example""1.0""Wrecked" )
    
    
register_logevent"LogEventRoundStart"2"1=Round_Start" )
}

public 
LogEventRoundStart()
{
    if( 
task_existsTASKID ) )
        
remove_taskTASKID )
        
    
iSeconds SECONDS
    set_task
1.0"TaskShowCountdown"TASKID__"a"SECONDS )
}

public 
TaskShowCountdown()
{
    
set_hudmessage1201201200.500.5000.10.80.10.1, -)
    
show_hudmessage0"Seconds Remaining: %i"iSeconds-- )

this is code from this thread.. => http://forums.alliedmods.net/showthread.php?t=130616


hope it helps.
Blizzard_87 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 13:42.


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