Contagem Regressiva, CountDown
http://www.mediafire.com/download/kl0zi6k05tez8dk/zp_countdown.rar
Última edição por Biel-oGrande em 30/11/2013, 1:54 pm, editado 1 vez(es)
http://www.mediafire.com/download/kl0zi6k05tez8dk/zp_countdown.rar
Código:
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <amxmisc>
#include <dhudmessage>
#include <zombieplague>
#define PLUGIN "[ZP] CountDown"
#define VERSION "1.0"
#define AUTHOR "Biel-oGrande"
new CountDownCheck[33]
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_event("HLTV", "event_new_round", "a", "1=0", "2=0")
set_task(2.0, "Restart")
}
public precache() {
precache_sound("zombie_plague/CountDown/15.wav")
precache_sound("zombie_plague/CountDown/14.wav")
precache_sound("zombie_plague/CountDown/13.wav")
precache_sound("zombie_plague/CountDown/12.wav")
precache_sound("zombie_plague/CountDown/11.wav")
precache_sound("zombie_plague/CountDown/10.wav")
precache_sound("zombie_plague/CountDown/9.wav")
precache_sound("zombie_plague/CountDown/8.wav")
precache_sound("zombie_plague/CountDown/7.wav")
precache_sound("zombie_plague/CountDown/6.wav")
precache_sound("zombie_plague/CountDown/5.wav")
precache_sound("zombie_plague/CountDown/4.wav")
precache_sound("zombie_plague/CountDown/3.wav")
precache_sound("zombie_plague/CountDown/2.wav")
precache_sound("zombie_plague/CountDown/1.wav")
precache_sound("zombie_plague/CountDown/0.wav")
}
public event_new_round() {
CountDownCheck[0] = 15
set_task(5.0, "CountDownFifteen")
set_task(6.0, "CountDownFourteen")
set_task(7.0, "CountDownThirteen")
set_task(8.0, "CountDownTwelve")
set_task(9.0, "CountDownEleven")
set_task(10.0, "CountDownTen")
set_task(11.0, "CountDownNine")
set_task(12.0, "CountDownEight")
set_task(13.0, "CountDownSeven")
set_task(14.0, "CountDownSix")
set_task(15.0, "CountDownFive")
set_task(16.0, "CountDownFour")
set_task(17.0, "CountDownThree")
set_task(18.0, "CountDownTwo")
set_task(19.0, "CountDownOne")
set_task(20.0, "CountDownZero")
}
public Restart() {
server_cmd("sv_restartround 5")
set_cvar_string("zp_delay", "18")
}
public zp_round_started() {
CountDownCheck[0] = -1
//client_cmd(0, "spk zombie_plague/CountDown/0")
}
public CountDownFifteen() {
if(CountDownCheck[0] == 15) {
set_dhudmessage(255, 255, 255, -1.0, 0.28, 2, 0.02, 1.0, 0.1, 1.0 )
show_dhudmessage(0, "15")
client_cmd(0, "spk zombie_plague/CountDown/15")
CountDownCheck[0] = 14
}
}
public CountDownFourteen() {
if(CountDownCheck[0] == 14) {
set_dhudmessage(255, 255, 255, -1.0, 0.28, 2, 0.02, 1.0, 0.1, 1.0 )
show_dhudmessage(0, "14")
client_cmd(0, "spk zombie_plague/CountDown/14")
CountDownCheck[0] = 13
}
}
public CountDownThirteen() {
if(CountDownCheck[0] == 13) {
set_dhudmessage(255, 255, 255, -1.0, 0.28, 2, 0.02, 1.0, 0.1, 1.0 )
show_dhudmessage(0, "13")
client_cmd(0, "spk zombie_plague/CountDown/13")
CountDownCheck[0] = 12
}
}
public CountDownTwelve() {
if(CountDownCheck[0] == 12) {
set_dhudmessage(255, 255, 255, -1.0, 0.28, 2, 0.02, 1.0, 0.1, 1.0 )
show_dhudmessage(0, "12")
client_cmd(0, "spk zombie_plague/CountDown/12")
CountDownCheck[0] = 11
}
}
public CountDownEleven() {
if(CountDownCheck[0] == 11) {
set_dhudmessage(255, 255, 255, -1.0, 0.28, 2, 0.02, 1.0, 0.1, 1.0 )
show_dhudmessage(0, "11")
client_cmd(0, "spk zombie_plague/CountDown/11")
CountDownCheck[0] = 10
}
}
public CountDownTen() {
if(CountDownCheck[0] == 10) {
set_dhudmessage(255, 255, 255, -1.0, 0.28, 2, 0.02, 1.0, 0.1, 1.0 )
show_dhudmessage(0, "10")
client_cmd(0, "spk zombie_plague/CountDown/10")
CountDownCheck[0] = 9
}
}
public CountDownNine() {
if(CountDownCheck[0] == 9) {
set_dhudmessage(255, 255, 255, -1.0, 0.28, 2, 0.02, 1.0, 0.1, 1.0 )
show_dhudmessage(0, "9")
client_cmd(0, "spk zombie_plague/CountDown/9")
CountDownCheck[0] = 8
}
}
public CountDownEight() {
if(CountDownCheck[0] == 8) {
set_dhudmessage(255, 255, 255, -1.0, 0.28, 2, 0.02, 1.0, 0.1, 1.0 )
show_dhudmessage(0, "8")
client_cmd(0, "spk zombie_plague/CountDown/8")
CountDownCheck[0] = 7
}
}
public CountDownSeven() {
if(CountDownCheck[0] == 7) {
set_dhudmessage(255, 255, 255, -1.0, 0.28, 2, 0.02, 1.0, 0.1, 1.0 )
show_dhudmessage(0, "7")
client_cmd(0, "spk zombie_plague/CountDown/7")
CountDownCheck[0] = 6
}
}
public CountDownSix() {
if(CountDownCheck[0] == 6) {
set_dhudmessage(255, 255, 255, -1.0, 0.28, 2, 0.02, 1.0, 0.1, 1.0 )
show_dhudmessage(0, "6")
client_cmd(0, "spk zombie_plague/CountDown/6")
CountDownCheck[0] = 5
}
}
public CountDownFive() {
if(CountDownCheck[0] == 5) {
set_dhudmessage(255, 255, 255, -1.0, 0.28, 2, 0.02, 1.0, 0.1, 1.0 )
show_dhudmessage(0, "5")
client_cmd(0, "spk zombie_plague/CountDown/5")
CountDownCheck[0] = 4
}
}
public CountDownFour() {
if(CountDownCheck[0] == 4) {
set_dhudmessage(255, 255, 255, -1.0, 0.28, 2, 0.02, 1.0, 0.1, 1.0 )
show_dhudmessage(0, "4")
client_cmd(0, "spk zombie_plague/CountDown/4")
CountDownCheck[0] = 3
}
}
public CountDownThree() {
if(CountDownCheck[0] == 3) {
set_dhudmessage(255, 255, 255, -1.0, 0.28, 2, 0.02, 1.0, 0.1, 1.0 )
show_dhudmessage(0, "3")
client_cmd(0, "spk zombie_plague/CountDown/3")
CountDownCheck[0] = 2
}
}
public CountDownTwo() {
if(CountDownCheck[0] == 2) {
set_dhudmessage(255, 255, 255, -1.0, 0.28, 2, 0.02, 1.0, 0.1, 1.0 )
show_dhudmessage(0, "2")
client_cmd(0, "spk zombie_plague/CountDown/2")
CountDownCheck[0] = 1
}
}
public CountDownOne() {
if(CountDownCheck[0] == 1) {
set_dhudmessage(255, 255, 255, -1.0, 0.28, 2, 0.02, 1.0, 0.1, 1.0 )
show_dhudmessage(0, "1")
client_cmd(0, "spk zombie_plague/CountDown/1")
CountDownCheck[0] = 0
}
}
public CountDownZero() {
if(CountDownCheck[0] == 0) {
client_cmd(0, "spk zombie_plague/CountDown/0")
CountDownCheck[0] = -1
}
}
Última edição por Biel-oGrande em 30/11/2013, 1:54 pm, editado 1 vez(es)