Ola gente eu vô posta esse plugin aqui que eu já tava pensando em fazer então ta ai uma contagem do estilo de algum servidor que vi (se não me engano era o da propria zplague) que tem essa contagem ai.
Sma:
Sma:
- Código:
#include <amxmodx>
#define TASK_COUNTDOWN 54683216
static szTime, g_MsgSync
new const sounds[][] = { "fvox/one.wav", "fvox/two.wav", "fvox/three.wav", "fvox/four.wav", "fvox/five.wav", "fvox/six.wav", "fvox/seven.wav", "fvox/eight.wav", "fvox/nine.wav", "fvox/ten.wav" };
const Float:HUD_X_POS = -1.0; const Float:HUD_Y_POS = 0.33;
const HUD_R_COLOR = 0; const HUD_G_COLOR = 255; const HUD_B_COLOR = 255
const FADE_R_COLOR = 0; const FADE_G_COLOR = 255; const FADE_B_COLOR = 255; const FADE_ALPHA = 90
public plugin_init()
{
register_plugin( "[ZP] Addon: Contagem + Fade \r[Estilo Algum sv Que vi]\w", "1.0" , "Luqqas' aka lucas_7_94 & Mr.Apple || [P]erfec[T] [S]cr[@]s[H]" );
register_event( "HLTV" , "event_round" , "a" , "1=0" , "2=0" );
g_MsgSync = CreateHudSyncObj();
}
public plugin_precache()
{
for(new i = 0 ; i < sizeof sounds ; i++) precache_sound(sounds[i]);
precache_sound("ambience/alien_beacon.wav")
}
public event_round()
{
set_task(0.4, "CountDown", TASK_COUNTDOWN);
client_cmd(0, "spk ambience/alien_beacon")
szTime = get_cvar_num("zp_delay");
}
public CountDown(id)
{
id -= TASK_COUNTDOWN
switch(szTime)
{
case 0: {
client_cmd(id, "stopsound") // Parar o sound do alien_beacon
remove_task(id + TASK_COUNTDOWN)
ClearSyncHud(id, g_MsgSync)
}
case 1: client_cmd(id, "spk fvox/one")
case 2: client_cmd(id, "spk fvox/two")
case 3: client_cmd(id, "spk fvox/three")
case 4: client_cmd(id, "spk fvox/four")
case 5: client_cmd(id, "spk fvox/five") // Sounds da contagem
case 6: client_cmd(id, "spk fvox/six")
case 7: client_cmd(id, "spk fvox/seven")
case 8: client_cmd(id, "spk fvox/eight")
case 9: client_cmd(id, "spk fvox/nine")
case 10: client_cmd(id, "spk fvox/ten")
}
if(szTime > 0) {
set_hudmessage(HUD_R_COLOR, HUD_G_COLOR, HUD_B_COLOR, HUD_X_POS, HUD_Y_POS, 1, 0.1, 3.0, 0.05, 0.05, -1);
ShowSyncHudMsg(id, g_MsgSync, "[Infeccao Em]^n.: %i :.", szTime);
for(new i = 0; i < get_maxplayers(); i++) if(is_user_alive(i)) ScreenFade(i, 1, FADE_R_COLOR, FADE_G_COLOR, FADE_B_COLOR, FADE_ALPHA)
set_task(1.0, "CountDown", id+TASK_COUNTDOWN);
--szTime ;
}
}
stock ScreenFade(id, Timer, R, G, B, Alpha)
{
message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("ScreenFade"), _, id);
write_short((1<<12) * Timer)
write_short(1<<12)
write_short(0)
write_byte(R)
write_byte(G)
write_byte(B)
write_byte(Alpha)
message_end()
}