731 发表于 2008-4-14 12:39:09

回复: 求点通高手修改天黑模式的插件!

很喜欢和你这种有水平的人学习!今天进步不少~~,以后多多指点~!

lhtkick 发表于 2008-4-14 13:31:11

回复: 求点通高手修改天黑模式的插件!

dt真好   :sweet_kis

wangyang5008 发表于 2008-4-14 13:43:15

回复: 求点通高手修改天黑模式的插件!

这个天黑插件有什么用啊.是不是现在玩黑的人多啊.请教下!

心静如水 发表于 2008-4-14 16:16:41

回复: 求点通高手修改天黑模式的插件!

我现在已改成指定某些救人质地图专用夜晚模式了(每个图10分钟就不怕没人玩).............

731 发表于 2008-4-14 17:38:33

回复: 求点通高手修改天黑模式的插件!

各人需求不一样!共同点也不一样!

731 发表于 2008-4-14 21:39:23

回复: 求点通高手修改天黑模式的插件!

jim_yang 大哥有新问题了!我发现语音提示《危险应变课程开始》后马上就天黑了,玩家来不急反应!能否加入 数秒倒数或者把语音提前点播放! 再次麻烦您了!

xdbgcs 发表于 2008-4-15 11:48:08

回复: 求点通高手修改天黑模式的插件!(jim_yang 大哥进来下)

相互学习学习,    有一天希望我也能帮助别人

a188 发表于 2008-4-15 11:50:30

回复: 求点通高手修改天黑模式的插件!(jim_yang 大哥进来下)

期待楼主能将修改完美的插件发上来!

jim_yang 发表于 2008-4-15 12:45:51

回复: 求点通高手修改天黑模式的插件!(jim_yang 大哥进来下)


#include <amxmodx>
#include <engine>
#define WARN_TIME 10
#define TASK_NIGHT 363636
public updatelights()
{
new msg
format(msg, 511,"^x04【注意危险应变课程%d秒后开始】^x01", WARN_TIME)
client_color(0, msg)
client_cmd(0,"spk misc/cvt_night0")
set_task(1.0, "night", _,_,_, "a", WARN_TIME)
}
public night()
{
static count
count++
new word
num_to_word(WARN_TIME - count, word, 5)
client_cmd(0, "spk vox/%s", word)
if(count == WARN_TIME)
set_lights("b")
}
public client_color(id,msg[])
{
new playerslist,playerscount//,i
get_players(playerslist,playerscount,"c")
while(replace(msg,127,"0x01","^x01")){}
while(replace(msg,127,"0x02","^x02")){}
while(replace(msg,127,"0x03","^x03")){}
while(replace(msg,127,"0x04","^x04")){}
if(id==0){
message_begin(MSG_ALL, get_user_msgid("SayText"), {0,0,0},1)
write_byte(1)
write_string(msg)
message_end()

}
else{
message_begin(MSG_ONE, get_user_msgid("SayText"), {0,0,0}, id)
write_byte(id)
write_string(msg)
message_end()
}
}
public round_restart()
{
if(task_exists(TASK_NIGHT))
remove_task(TASK_NIGHT)
set_lights("#OFF")
}
public plugin_precache()
{
precache_sound( "misc/cvt_night0.wav")
}
public plugin_init()
{
register_plugin("Daylight Changer","0.15x","(Downtown1)")
register_event("TextMsg", "round_restart", "a", "2=#Game_Commencing", "2=#Game_will_restart_in")
set_task(180.0, "updatelights", 393939,_,_,"d")
}

修改WARN_TIME 可以自定义警告多少秒,最好不要超过十,因为word[]数组能放的最大单词就是五个字母,多了有些语音就听不到了。
你试试吧

jim_yang 发表于 2008-4-15 12:47:37

回复: 求点通高手修改天黑模式的插件!(jim_yang 大哥进来下)


#include <amxmodx>
#include <engine>
#define WARN_TIME 10
#define TASK_NIGHT 363636
new count
public updatelights()
{
    new msg
    format(msg, 511,"^x04【注意危险应变课程%d秒后开始】^x01", WARN_TIME)
    client_color(0, msg)
    client_cmd(0,"spk misc/cvt_night0")
    set_task(1.0, "night", TASK_NIGHT,_,_, "a", WARN_TIME)
}
public night()
{
    count++
    new word
    num_to_word(WARN_TIME - count, word, 5)
    client_cmd(0, "spk vox/%s", word)
    if(count == WARN_TIME)
    {
      set_lights("b")
      count = 0
    }
}
public client_color(id,msg[])
{
    new playerslist,playerscount//,i
    get_players(playerslist,playerscount,"c")
    while(replace(msg,127,"0x01","^x01")){}
    while(replace(msg,127,"0x02","^x02")){}
    while(replace(msg,127,"0x03","^x03")){}
    while(replace(msg,127,"0x04","^x04")){}
    if(id==0){
      message_begin(MSG_ALL, get_user_msgid("SayText"), {0,0,0},1)
      write_byte(1)
      write_string(msg)
      message_end()
      
    }
    else{
      message_begin(MSG_ONE, get_user_msgid("SayText"), {0,0,0}, id)
      write_byte(id)
      write_string(msg)
      message_end()
    }
}
public round_restart()
{
    if(task_exists(TASK_NIGHT))
    {
      remove_task(TASK_NIGHT)
      count = 0
    }
    set_lights("#OFF")
}
public plugin_precache()
{
    precache_sound( "misc/cvt_night0.wav")
}
public plugin_init()
{
    register_plugin("Daylight Changer","0.15x","(Downtown1)")
    register_event("TextMsg", "round_restart", "a", "2=#Game_Commencing", "2=#Game_will_restart_in")
    set_task(180.0, "updatelights", 393939,_,_,"d")
}



又发现了点问题,一块儿改了
页: 1 [2] 3 4
查看完整版本: 求点通高手修改天黑模式的插件!(jim_yang 点通的大哥们新问题一起帮小弟看看)