搜索
查看: 2875|回复: 6

[AMXX 带源码] 求人改下插件 40QB报酬

[复制链接]
发表于 2009-6-4 17:23:26 | 显示全部楼层 |阅读模式 来自 中国–辽宁–沈阳
把以下的倒数10秒插件改成 每秒显示的字都不一样 例如:

[距离生化模式还有10秒]
【[距离生化模式还有9秒]】
【【[距离生化模式还有8秒]】】

这种的 就是每秒显示的字都不一样···


#include <amxmodx>
#include <amxmisc>
#include <zombieplague>

#define PLUGIN "倒数10秒插件"
#define VERSION "1.0"
#define AUTHOR "Martin"

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 ( "vox/ten.wav" )
precache_sound ( "vox/nine.wav" )
precache_sound ( "vox/eight.wav" )
precache_sound ( "vox/seven.wav" )
precache_sound ( "vox/six.wav" )
precache_sound ( "vox/five.wav" )
precache_sound ( "vox/four.wav" )
precache_sound ( "vox/three.wav" )
precache_sound ( "vox/two.wav" )
precache_sound ( "vox/one.wav" )
}

public event_round_start ()
{
set_task ( 4.0 , "zombie_countdown" )
time_s = 10
countdown = 9
}

public zombie_countdown ()
{
new speak [ 10 ][] = { "vox/one.wav" , "vox/two.wav" , "vox/three.wav" , "vox/four.wav" , "vox/five.wav" , "vox/six.wav" , "vox/seven.wav" , "vox/eight.wav" , "vox/nine.wav" , "vox/ten.wav" }

emit_sound ( 0 , CHAN_VOICE , speak [ countdown ], 1.0 , ATTN_NORM , 0 , PITCH_NORM )
countdown --

client_print( 0 , print_center, "T型病毒在正在寻找宿主,%i秒后出现僵尸.", time_s);
-- time_s ;

if( time_s >= 1 )
{
set_task ( 1.0 , "zombie_countdown" )
}
}
发表于 2009-6-4 20:37:34 | 显示全部楼层 来自 中国–广东–广州–天河区
用HUD显示就可以了。。
回复

使用道具 举报

发表于 2009-6-4 20:41:05 | 显示全部楼层 来自 中国–广东–广州–天河区
#include <amxmodx>
#include <amxmisc>
#include <zombieplague>

#define PLUGIN "倒数10秒插件"
#define VERSION "1.0"
#define AUTHOR "Martin"

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 ( "vox/ten.wav" )
precache_sound ( "vox/nine.wav" )
precache_sound ( "vox/eight.wav" )
precache_sound ( "vox/seven.wav" )
precache_sound ( "vox/six.wav" )
precache_sound ( "vox/five.wav" )
precache_sound ( "vox/four.wav" )
precache_sound ( "vox/three.wav" )
precache_sound ( "vox/two.wav" )
precache_sound ( "vox/one.wav" )
}

public event_round_start ()
{
set_task ( 4.0 , "zombie_countdown" )
time_s = 10
countdown = 9
}

public zombie_countdown ()
{
new speak [ 10 ][] = { "vox/one.wav" , "vox/two.wav" , "vox/three.wav" , "vox/four.wav" , "vox/five.wav" , "vox/six.wav" , "vox/seven.wav" , "vox/eight.wav" , "vox/nine.wav" , "vox/ten.wav" }

emit_sound ( 0 , CHAN_VOICE , speak [ countdown ], 1.0 , ATTN_NORM , 0 , PITCH_NORM )
countdown --

if(time_s = 10) set_hudmessage(0, 255, 0, -1.0, 0.72, 0, 1.0, 6.0, 0.6, 0.6, 6)
else if(time_s = 9 ) set_hudmessage(255, 250, 0, -1.0, 0.72, 0, 1.0, 6.0, 0.6, 0.6, 6)
else if(time_s = 8 ) set_hudmessage(255, 250, 0, -1.0, 0.72, 0, 1.0, 6.0, 0.6, 0.6, 6)
else if(time_s = 7 ) set_hudmessage(255, 250, 0, -1.0, 0.72, 0, 1.0, 6.0, 0.6, 0.6, 6)
else if(time_s = 6 ) set_hudmessage(255, 250, 0, -1.0, 0.72, 0, 1.0, 6.0, 0.6, 0.6, 6)
else if(time_s = 5 ) set_hudmessage(255, 250, 0, -1.0, 0.72, 0, 1.0, 6.0, 0.6, 0.6, 6)
else if(time_s = 4 ) set_hudmessage(255, 250, 0, -1.0, 0.72, 0, 1.0, 6.0, 0.6, 0.6, 6)
else if(time_s = 3 ) set_hudmessage(255, 250, 0, -1.0, 0.72, 0, 1.0, 6.0, 0.6, 0.6, 6)
else if(time_s = 2 ) set_hudmessage(255, 250, 0, -1.0, 0.72, 0, 1.0, 6.0, 0.6, 0.6, 6)
else if(time_s = 1 ) set_hudmessage(255, 250, 0, -1.0, 0.72, 0, 1.0, 6.0, 0.6, 0.6, 6)
else set_hudmessage(255, 0, 0, -1.0, 0.72, 1, 1.0, 0.8, 0.6, 0.6, 6)
show_hudmessage(0,"T型病毒在正在寻找宿主,%i秒后出现僵尸",time_s)
//client_print( 0 , print_center, "T型病毒在正在寻找宿主,%i秒后出现僵尸.", time_s);
-- time_s ;

if( time_s >= 1 )
{
set_task ( 1.0 , "zombie_countdown" )
}
}
回复

使用道具 举报

发表于 2009-6-4 21:25:15 | 显示全部楼层 来自 中国–安徽–芜湖
if(time_s == 10) set_hudmessage(0, 255, 0, -1.0, 0.72, 0, 1.0, 6.0, 0.6, 0.6, 6)
else if(time_s == 9 ) set_hudmessage(255, 250, 0, -1.0, 0.72, 0, 1.0, 6.0, 0.6, 0.6, 6)
else if(time_s == 8 ) set_hudmessage(255, 250, 0, -1.0, 0.72, 0, 1.0, 6.0, 0.6, 0.6, 6)
else if(time_s == 7 ) set_hudmessage(255, 250, 0, -1.0, 0.72, 0, 1.0, 6.0, 0.6, 0.6, 6)
else if(time_s == 6 ) set_hudmessage(255, 250, 0, -1.0, 0.72, 0, 1.0, 6.0, 0.6, 0.6, 6)
else if(time_s == 5 ) set_hudmessage(255, 250, 0, -1.0, 0.72, 0, 1.0, 6.0, 0.6, 0.6, 6)
else if(time_s == 4 ) set_hudmessage(255, 250, 0, -1.0, 0.72, 0, 1.0, 6.0, 0.6, 0.6, 6)
else if(time_s == 3 ) set_hudmessage(255, 250, 0, -1.0, 0.72, 0, 1.0, 6.0, 0.6, 0.6, 6)
else if(time_s == 2 ) set_hudmessage(255, 250, 0, -1.0, 0.72, 0, 1.0, 6.0, 0.6, 0.6, 6)
else if(time_s == 1 ) set_hudmessage(255, 250, 0, -1.0, 0.72, 0, 1.0, 6.0, 0.6, 0.6, 6)
else set_hudmessage(255, 0, 0, -1.0, 0.72, 1, 1.0, 0.8, 0.6, 0.6, 6)
回复

使用道具 举报

发表于 2009-6-4 21:25:48 | 显示全部楼层 来自 中国–安徽–芜湖
但是这是颜色不一样而已
回复

使用道具 举报

发表于 2009-6-4 21:45:39 | 显示全部楼层 来自 中国–安徽–芜湖
本帖最后由 w5014560 于 2009-6-5 09:56 编辑

代码如下:
改变显示字
本人QQ453201973 如过觉得满意就给QB,不满意请付上留言
#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/timer01.wav" )
    precache_sound( "zpsound/timer00.wav" )
}

public event_round_start()
{
    set_task(4.0, "zombie_countdown")   
    time_s = 10
    countdown = 9
}

public zombie_countdown()
{   
    new speak[ 10 ][] = { "zpsound/timer01.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--        
    //client_print(0, print_center,"生化病毒正在寻找宿主 %i 秒后将出现母体僵尸", time_s)
    --time_s
        
    if(time_s == 10)
    {
        client_print(0, print_center," [%i秒] ", time_s)
           
    }
    if(time_s == 9)
    {
        client_print(0, print_center,"[[ %i 秒]]", time_s)
                 
    }
    if(time_s == 8)
    {
       client_print(0, print_center,"[[[ %i 秒]]]", time_s)        
    }

    if(time_s == 7)
    {
       client_print(0, print_center,"[[[[ %i 秒]]]]", time_s)
        
    }

    if(time_s == 6)
    {
       client_print(0, print_center,"[[[[[ %i ]]]]", time_s)
        
    }

    if(time_s == 5)
    {
       client_print(0, print_center,"[[[[[[ %i 秒]]]]]]", time_s)
        
    }

    if(time_s == 4)
    {
       client_print(0, print_center,"生化病毒正在寻找宿主 %i 秒[]][][", time_s)
        
    }

    if(time_s == 3)
    {
       client_print(0, print_center,"[][][] %i 秒后将出现母体僵尸8", time_s)
        
    }

    if(time_s == 2)
    {
       client_print(0, print_center,"生化病毒正在寻找宿主 %i 秒后将出现母体僵尸9", time_s)
        
    }
  
    if(time_s == 1)
    {
       client_print(0, print_center,"生化病毒正在寻找宿主 %i 秒后将出现母体僵尸10", time_s)
      
    }
    if(time_s >= 1)
    {
        set_task(1.0, "zombie_countdown")
    }
   
}
回复

使用道具 举报

发表于 2009-6-4 21:46:51 | 显示全部楼层 来自 中国–安徽–芜湖
本帖最后由 w5014560 于 2009-6-4 21:48 编辑

具体意想楼主自改
如有不懂请加QQ
回复

使用道具 举报

游客
回复
您需要登录后才可以回帖 登录 | 注个册吧

快速回复 返回顶部 返回列表