AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Help wich Bcd HudTimer (https://forums.alliedmods.net/showthread.php?t=183763)

Carlosx 04-26-2012 09:37

Help wich Bcd HudTimer
 
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 ); 


.Dare Devil. 04-26-2012 15:03

Re: Help wich Bcd HudTimer
 
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--; 



Carlosx 04-26-2012 15:51

Re: Help wich Bcd HudTimer
 
thanks


All times are GMT -4. The time now is 07:51.

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