[ZP插件]回合開始倒數問題

Home Home
引用 | 編輯 C.G.N
2010-08-01 11:18
樓主
推文 x0
可以把hud改成普通的字顯示出來嗎?(像玩家打字的模樣)
因為hud好像佔伺服器>v<

#include <amxmodx>
#include <amxmisc>
#include <zombieplague>
#define PLUGIN "[ZP] Countdown"
#define VERSION "1.0"
#define AUTHOR "Mr.Apple"
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( "zpsound/timer10.wav" )
    precache_sound( "zpsound/timer09.wav" )
    precache_sound( "zpsound/timer08.wav" )
    precache_sound( "zpsound/timer07.wav" )
    precache_sound( "zpsound/timer06.wav" )
    precache_sound( "zpsound/timer05.wav" )
    precache_sound( "zpsound/timer04.wav" )
    precache_sound( "zpsound/timer03.wav" )
    precache_sound( "zpsound/timer02.wav" )
    precache_sound( "zpsound/timestart.wav" )
}
public event_round_start()
{
    set_task(4.0, "zombie_countdown")
    time_s = 10
    countdown = 9
}
public zombie_countdown()
{   
    new speak[ 10 ][] = { "zpsound/timestart.wav", "zpsound/timer02.wav", "zpsound/timer03.wav", "zpsound/timer04.wav", "zpsound/timer05.wav", "zpsound/timer06.wav", "zpsound/timer07.wav", "zpsound/timer08.wav", "zpsound/timer09.wav", "zpsound/timer10.wav" }
    emit_sound( 0, CHAN_VOICE, speak[ countdown ], 1.0, ATTN_NORM, 0, PITCH_NORM )
    countdown--
       
    set_hudmessage(255, 0, 0, -1.0, 0.28, 2, 0.02, 1.0, 0.01, 0.1, 10);
    show_hudmessage(0, "T病毒正在尋找宿主 %i 將出現母體僵屍", time_s);
    --time_s;
       
    if(time_s >= 1)
    {
        set_task(1.0, "zombie_countdown")
    }


獻花 x0
引用 | 編輯 Abcdzxc555
2010-08-01 17:56
1樓
  

set_hudmessage(255, 0, 0, -1.0, 0.28, 2, 0.02, 1.0, 0.01, 0.1, 10)show_hudmessage(0, "T病毒正在尋找宿主 %i 將出現母體僵屍", time_s)
改成
client_print(0, "T病毒正在尋找宿主 %i 將出現母體僵屍", time_s)
就行 表情

獻花 x1
引用 | 編輯 C.G.N
2010-08-02 11:59
2樓
  
下面是引用 Abcdzxc555 於 2010-08-01 17:56 發表的 : 到引言文

set_hudmessage(255, 0, 0, -1.0, 0.28, 2, 0.02, 1.0, 0.01, 0.1, 10)show_hudmessage(0, "T病毒正在尋找宿主 %i 將出現母體僵屍", time_s)
改成
client_print(0, "T病毒正在尋找宿主 %i 將出現母體僵屍", time_s)
就行 表情


感謝阿><終於有人解答我的問題

獻花 x0