Descarcare:
Code: Select all
#include < amxmodx >
#define MAX_SOUNDS 2 // numarul maxim de sunete
#define TIME_AFTER_COUNTDOWN 6.0 // timpul inainte sa porneasca sunetul in secunde 2.0 = 2 secunde etc..
#define TASK_AMBIENCE 1232
new const szRandomSounds[ MAX_SOUNDS ][ ] = {
"zombimod/zp_roind_start.wav",
"zombimod/zp_round_start2.wav"
};
public plugin_init( )
{
register_plugin( "Biohazard Ambience","1.4", "YONTU" );
register_event( "HLTV", "hltv_NewRound", "a", "1=0", "2=0" );
register_logevent( "logevent_RoundEnd", 2, "1=Round_End" );
}
public plugin_precache( )
{
for( new i = 0; i < sizeof szRandomSounds; i++ )
precache_sound( szRandomSounds[ i ] );
}
public client_putinserver( id )
{
remove_task( id );
}
public client_disconnected(id)
{
remove_task(id);
}
public hltv_NewRound( )
{
new szPlayers[ 32 ], iNum;
get_players( szPlayers, iNum, "ch" );
for( new i = 0; i < iNum; i++)
{
new id = szPlayers[ i ];
if( is_user_alive( id ) && is_user_connected( id ) )
{
set_task( TIME_AFTER_COUNTDOWN, "task_AmbiencesEffect", TASK_AMBIENCE );
}
}
}
public logevent_RoundEnd( )
{
remove_task( TASK_AMBIENCE );
}
public task_AmbiencesEffect( taskid )
{
PlaySoundToClients( szRandomSounds[ random_num( 0, sizeof szRandomSounds - 1 ) ] );
}
PlaySoundToClients( const szSound[ ] )
{
if( equal( szSound[ strlen( szSound ) - 4 ], ".mp3" ) )
client_cmd( 0, "mp3 play ^"sound/%s^"", szSound );
else
client_cmd( 0, "spk ^"%s^"", szSound );
}
Versiune: 1.4
Link oficial: oldones
Instalare:
1. Fisierul zp_countdown.sma il puneti in addons/amxmodx/scripting
2. Fisierul zp_countdown.amxx il puneti in addons/amxmodx/plugins
3. Intrati in fisierul addons/amxmodx/configs/plugins.ini si adaugati la urma:
Code: Select all
zp_countdown.amxx
Cvar-uri (se adauga in fisierul amxmodx\configs\amxx.cfg): -
Imagini: -