搜索
楼主: 731

求点通高手修改天黑模式的插件!(jim_yang 点通的大哥们新问题一起帮小弟看看)

[复制链接]
 楼主| 发表于 2008-4-14 12:39:09 | 显示全部楼层 来自 福建三明

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

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

使用道具 举报

发表于 2008-4-14 13:31:11 | 显示全部楼层 来自 黑龙江哈尔滨

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

dt真好   :sweet_kis
回复

使用道具 举报

发表于 2008-4-14 13:43:15 | 显示全部楼层 来自 浙江衢州

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

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

使用道具 举报

发表于 2008-4-14 16:16:41 | 显示全部楼层 来自 广西百色

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

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

使用道具 举报

 楼主| 发表于 2008-4-14 17:38:33 | 显示全部楼层 来自 福建三明

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

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

使用道具 举报

 楼主| 发表于 2008-4-14 21:39:23 | 显示全部楼层 来自 福建三明

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

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

使用道具 举报

发表于 2008-4-15 11:48:08 | 显示全部楼层 来自 四川攀枝花

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

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

使用道具 举报

发表于 2008-4-15 11:50:30 | 显示全部楼层 来自 福建莆田

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

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

使用道具 举报

发表于 2008-4-15 12:45:51 | 显示全部楼层 来自 北京海淀

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

  1. #include <amxmodx>
  2. #include <engine>
  3. #define WARN_TIME 10
  4. #define TASK_NIGHT 363636
  5. public updatelights()
  6. {
  7. new msg[512]
  8. format(msg, 511,"^x04【注意危险应变课程%d秒后开始】^x01", WARN_TIME)
  9. client_color(0, msg)
  10. client_cmd(0,"spk misc/cvt_night0")
  11. set_task(1.0, "night", _,_,_, "a", WARN_TIME)
  12. }
  13. public night()
  14. {
  15. static count
  16. count++
  17. new word[6]
  18. num_to_word(WARN_TIME - count, word, 5)
  19. client_cmd(0, "spk vox/%s", word)
  20. if(count == WARN_TIME)
  21.   set_lights("b")
  22. }
  23. public client_color(id,msg[])
  24. {
  25. new playerslist[32],playerscount//,i
  26. get_players(playerslist,playerscount,"c")
  27. while(replace(msg,127,"0x01","^x01")){}
  28. while(replace(msg,127,"0x02","^x02")){}
  29. while(replace(msg,127,"0x03","^x03")){}
  30. while(replace(msg,127,"0x04","^x04")){}
  31. if(id==0){
  32.   message_begin(MSG_ALL, get_user_msgid("SayText"), {0,0,0},1)
  33.   write_byte(1)
  34.   write_string(msg)
  35.   message_end()
  36.   
  37. }
  38. else{
  39.   message_begin(MSG_ONE, get_user_msgid("SayText"), {0,0,0}, id)
  40.   write_byte(id)
  41.   write_string(msg)
  42.   message_end()
  43. }
  44. }
  45. public round_restart()
  46. {
  47. if(task_exists(TASK_NIGHT))
  48.   remove_task(TASK_NIGHT)
  49. set_lights("#OFF")
  50. }
  51. public plugin_precache()
  52. {
  53. precache_sound( "misc/cvt_night0.wav")
  54. }
  55. public plugin_init()
  56. {
  57. register_plugin("Daylight Changer","0.15x","[RED-Designs](Downtown1)")
  58. register_event("TextMsg", "round_restart", "a", "2=#Game_Commencing", "2=#Game_will_restart_in")
  59. set_task(180.0, "updatelights", 393939,_,_,"d")
  60. }
复制代码
修改WARN_TIME 可以自定义警告多少秒,最好不要超过十,因为word[]数组能放的最大单词就是五个字母,多了有些语音就听不到了。
你试试吧
回复

使用道具 举报

发表于 2008-4-15 12:47:37 | 显示全部楼层 来自 北京海淀

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

  1. #include <amxmodx>
  2. #include <engine>
  3. #define WARN_TIME 10
  4. #define TASK_NIGHT 363636
  5. new count
  6. public updatelights()
  7. {
  8.     new msg[512]
  9.     format(msg, 511,"^x04【注意危险应变课程%d秒后开始】^x01", WARN_TIME)
  10.     client_color(0, msg)
  11.     client_cmd(0,"spk misc/cvt_night0")
  12.     set_task(1.0, "night", TASK_NIGHT,_,_, "a", WARN_TIME)
  13. }
  14. public night()
  15. {
  16.     count++
  17.     new word[6]
  18.     num_to_word(WARN_TIME - count, word, 5)
  19.     client_cmd(0, "spk vox/%s", word)
  20.     if(count == WARN_TIME)
  21.     {
  22.         set_lights("b")
  23.         count = 0
  24.     }
  25. }
  26. public client_color(id,msg[])
  27. {
  28.     new playerslist[32],playerscount//,i
  29.     get_players(playerslist,playerscount,"c")
  30.     while(replace(msg,127,"0x01","^x01")){}
  31.     while(replace(msg,127,"0x02","^x02")){}
  32.     while(replace(msg,127,"0x03","^x03")){}
  33.     while(replace(msg,127,"0x04","^x04")){}
  34.     if(id==0){
  35.         message_begin(MSG_ALL, get_user_msgid("SayText"), {0,0,0},1)
  36.         write_byte(1)
  37.         write_string(msg)
  38.         message_end()
  39.         
  40.     }
  41.     else{
  42.         message_begin(MSG_ONE, get_user_msgid("SayText"), {0,0,0}, id)
  43.         write_byte(id)
  44.         write_string(msg)
  45.         message_end()
  46.     }
  47. }
  48. public round_restart()
  49. {
  50.     if(task_exists(TASK_NIGHT))
  51.     {
  52.         remove_task(TASK_NIGHT)
  53.         count = 0
  54.     }
  55.     set_lights("#OFF")
  56. }
  57. public plugin_precache()
  58. {
  59.     precache_sound( "misc/cvt_night0.wav")
  60. }
  61. public plugin_init()
  62. {
  63.     register_plugin("Daylight Changer","0.15x","[RED-Designs](Downtown1)")
  64.     register_event("TextMsg", "round_restart", "a", "2=#Game_Commencing", "2=#Game_will_restart_in")
  65.     set_task(180.0, "updatelights", 393939,_,_,"d")
  66. }
复制代码
又发现了点问题,一块儿改了
回复

使用道具 举报

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

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