Raised This Month: $51 Target: $400
 12% 

Help wich Bcd HudTimer


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Carlosx
New Member
Join Date: Feb 2012
Location: n/a
Old 04-26-2012 , 09:37   Help wich Bcd HudTimer
Reply With Quote #1

hello, I need a little help from a plugin. the count of ten onward to show only one screen, zero no sound and not on the screen, you think you can fix? Thanks.

PHP Code:
#include < amxmodx >
#include < csx >

#pragma semicolon 1

new g_hMessageSync;
new 
g_iC4Timer;

public 
plugin_init( ) {
    
register_plugin"Bcd Hudtimer""1.0""claudiuhks" );
    
register_event"HLTV""Event_RoundStart""a""1=0""2=0" );
    
    
g_hMessageSync CreateHudSyncObj( );
}

public 
Event_RoundStart( )
    
remove_task652452 );

public 
bomb_planted( ) {
    
g_iC4Timer get_cvar_num"mp_c4timer" ) - 1;
    
    
set_task1.0"Func_DisplayTime"652452__"a"g_iC4Timer );
}

public 
bomb_defused( )
    
remove_task652452 );

public 
bomb_explode( )
    
remove_task652452 );

public 
Func_DisplayTime( ) {
    switch( 
g_iC4Timer ) {
            case 
40: {
            
Func_Speak"spk ^"vox/fourty seconds until explosion^"" );
            
            
set_hudmessage221221221, -1.00.2501.03.00.010.01, -);
            
            
ShowSyncHudMsg0g_hMessageSync"40 seconds until explosion!" );
        }

        case 
30: {
            
Func_Speak"spk ^"vox/thirty seconds until explosion^"" );
            
            
set_hudmessage221221221, -1.00.2501.03.00.010.01, -);
            
            
ShowSyncHudMsg0g_hMessageSync"30 seconds until explosion!" );
        }
        
        case 
20: {
            
Func_Speak"spk ^"vox/twenty seconds until explosion^"" );
            
            
set_hudmessage221221221, -1.00.2501.03.00.010.01, -);
            
            
ShowSyncHudMsg0g_hMessageSync"20 seconds until explosion!" );
        }
        
        case 
10Func_Speak"spk vox/ten" );
        case 
9Func_Speak"spk vox/nine" );
        case 
8Func_Speak"spk vox/eight" );
        case 
7Func_Speak"spk vox/seven" );
        case 
6Func_Speak"spk vox/six" );
        case 
5Func_Speak"spk vox/five" );
        case 
4Func_Speak"spk vox/four" );
        case 
3Func_Speak"spk vox/three" );
        case 
2Func_Speak"spk vox/two" );
        case 
1Func_Speak"spk vox/one" );
        case 
0Func_Speak"spk vox/zero" );
    }
    
    if( 
g_iC4Timer 11 ) {
        
set_hudmessage221221221, -1.00.8001.01.00.010.01, -);
        
        
ShowSyncHudMsg0g_hMessageSync"%i"g_iC4Timer );
    }
     
    
g_iC4Timer--;
}

public 
Func_SpeaksLine[ ] )
    for( new 
iPlayer 1iPlayer <= 32iPlayer++ )
        if( 
is_user_connectediPlayer ) && get_user_teamiPlayer ) )
            
client_cmdiPlayersLine ); 

Last edited by Carlosx; 04-26-2012 at 14:55.
Carlosx is offline
.Dare Devil.
Veteran Member
Join Date: Sep 2010
Old 04-26-2012 , 15:03   Re: Help wich Bcd HudTimer
Reply With Quote #2

PHP Code:
#include <amxmodx> 
#include <csx> 

#pragma semicolon 1 

new g_hMessageSync
new 
g_iC4Timer

public 
plugin_init() 

    
register_plugin("Bcd Hudtimer""1.0""claudiuhks"); 
    
register_event("HLTV""Event_RoundStart""a""1=0""2=0"); 
     
    
g_hMessageSync CreateHudSyncObj(); 


public 
Event_RoundStart() 
    
remove_task(652452); 

public 
bomb_planted() 

    
g_iC4Timer get_cvar_num("mp_c4timer") - 1
     
    
set_task(1.0"Func_DisplayTime"652452__"a"g_iC4Timer); 


public 
bomb_defused() 
    
remove_task(652452); 

public 
bomb_explode() 
    
remove_task(652452); 

public 
Func_DisplayTime() 

    switch(
g_iC4Timer
    { 
        case 
40
        { 
                        
client_cmd(0"speak  ^"vox/forty seconds until explosion^""); 
             
            
set_hudmessage(221221221, -1.00.2501.03.00.010.01, -1); 
            
ShowSyncHudMsg(0g_hMessageSync"40 seconds until explosion!"); 
        } 
        case 
30
        { 
                        
client_cmd(0"speak  ^"vox/thirty seconds until explosion^"");
             
            
set_hudmessage(221221221, -1.00.2501.03.00.010.01, -1); 
                    
ShowSyncHudMsg(0g_hMessageSync"30 seconds until explosion!"); 
               }   
            case 
20
        { 
                        
client_cmd(0"speak  ^"vox/twenty seconds until explosion^"");
             
                    
set_hudmessage(221221221, -1.00.2501.03.00.010.01, -1); 
                    
ShowSyncHudMsg(0g_hMessageSync"20 seconds until explosion!"); 
            } 
        } 
     
    if( 
g_iC4Timer 11
    { 
        static 
numword[25];
        
num_to_wordg_iC4Timernumwordcharsmax(numword));
        
client_cmd(0"speak ^"vox/%s^""numword);        

        
set_hudmessage(221221221, -1.00.8001.01.00.010.01, -1); 
        
ShowSyncHudMsg(0g_hMessageSync"%i"g_iC4Timer); 
    } 
        
g_iC4Timer--; 


Last edited by .Dare Devil.; 04-26-2012 at 15:36.
.Dare Devil. is offline
Carlosx
New Member
Join Date: Feb 2012
Location: n/a
Old 04-26-2012 , 15:51   Re: Help wich Bcd HudTimer
Reply With Quote #3

thanks
Carlosx 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 08:38.


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