Raised This Month: $ Target: $400
 0% 

countdown sound.


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
One
Veteran Member
Join Date: Oct 2008
Location: Hardstyle-eSports.de
Old 06-20-2009 , 07:32   countdown sound.
Reply With Quote #1

hi,

im writig my first plugin yea no mod anymore & i have a mini problem.

i catch the freetime & give a countdown on screen.
so i want now to add the sounds. but the freezetime can be changed. how can i know howmany sounds schould be played?

PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <screenfade_util>

new time_s

public plugin_init() 
{
    
register_plugin("Freezetime Countdown""1.0""One")
    
register_event("HLTV""event_round_start""a""1=0""2=0")
}
public 
event_round_start()
{
    
set_task(1.0"Start_countdown")
    new 
freezetime get_cvar_num("mp_freezetime")
    
time_s freezetime 2
}
public 
Start_countdown(id)

    
set_hudmessage(17900, -1.00.2820.021.00.010.110); 
    
show_hudmessage(0"New round begin in %i!!"time_s); 
    
UTIL_ScreenFade(id,{255,0,0},1.0,0.0,200)
    --
time_s;
    
    if(
time_s >= 0)
    {
        
set_task(1.0"Start_countdown")
    }  
    if(
time_s == 0)
    {
        
set_task(1.0"Start_countdown1")
    }  
}  
public 
Start_countdown1(id)
{
    
set_hudmessage(255255255, -1.00.2820.021.00.010.110); 
    
show_hudmessage(0"Go"time_s);
    
UTIL_ScreenFade(id,{0,255,0},1.0,0.0,200)

i thinked with case but i dont think that its a good idea. any ideas?
__________________
One is offline
Send a message via ICQ to One Send a message via AIM to One Send a message via MSN to One Send a message via Yahoo to One Send a message via Skype™ to One
 



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 15:37.


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