離之彥
|
分享:
▲
▼
#include <amxmodx> #include <amxmisc> #include <zombieplague>
#define PLUGIN "[ZP] Countdown" #define VERSION "1.0" #define AUTHOR "Aeiou-cow"
new countdown new time_s
public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) register_event("HLTV", "event_round_start", "a", "1=0", "2=0") }
public plugin_precache() { precache_sound( "zpfb/one.wav" ) precache_sound( "zpfb/two.wav" ) precache_sound( "zpfb/three.wav" ) precache_sound( "zpfb/four.wav" ) precache_sound( "zpfb/five.wav" ) precache_sound( "zpfb/six.wav" ) precache_sound( "zpfb/seven.wav" ) precache_sound( "zpfb/eight.wav" ) precache_sound( "zpfb/nine.wav" ) precache_sound( "zpfb/ten.wav" ) precache_sound( "misc/CSOzombi_start.wav" ) }
public event_round_start() { set_task(0.0, "zombie_countdown") time_s = 20 countdown = 19 }
public zombie_countdown() { new speak[ 20 ][] = { "zpfb/one.wav","zpfb/two.wav", "zpfb/three.wav", "zpfb/four.wav", "zpfb/five.wav", "zpfb/six.wav", "zpfb/seven.wav", "zpfb/eight.wav", "zpfb/nine.wav", "zpfb/ten.wav", " ", " ", " ", " ", " ", " ", " ", " ", " ", "misc/CSOzombi_start.wav"}
emit_sound( 0, CHAN_VOICE, speak[ countdown ], 1.0, ATTN_NORM, 0, PITCH_NORM ) countdown-- client_print(0, print_center,"距離殭屍出現的時間還剩: %i秒", time_s) --time_s
if(time_s >= 1) { set_task(1.0, "zombie_countdown") } if(time_s <= 0) { set_task(1.0, "gamego") } if(time_s >=19) { } }
換這個試試吧... 不過記得把wav檔名聲和路徑改成自己的倒數聲音的名稱和路徑
|