搜索
查看: 2421|回复: 0

离子炮插件

[复制链接]
发表于 2007-6-5 17:00:32 | 显示全部楼层 |阅读模式 来自 中国–台湾
有谁可以做出离子炮插件?
我找到一个Freecode做的插件
但是我测试後服务器当机:cry:
有谁可以帮忙修正?
  1. #include <amxmod>
  2. #define TE_BEAMPOINTS 0
  3. #define TE_EXPLOSION 3
  4. new Beam,Fire
  5. public beam()
  6. {
  7.     new players[32],origin[3],inum
  8.     get_players(players,inum)
  9.     new victim = random_num(1,inum)
  10.     get_user_origin(victim,origin)
  11.     /*  TE_BEAMPOINTS  */
  12.     message_begin( MSG_BROADCAST, SVC_TEMPENTITY )
  13.     write_byte(TE_BEAMPOINTS)
  14.     write_coord(origin[0]+random_num(1,1000))
  15.     write_coord(origin[1]+random_num(1,500))
  16.     write_coord(origin[2]+1000000)
  17.     write_coord(origin[0]+random_num(1,1000))
  18.     write_coord(origin[1]+random_num(1,500))
  19.     write_coord(origin[2]-160)
  20.     write_short(Beam)   // model
  21.     write_byte(0) // start frame
  22.     write_byte(0) // framerate
  23.     write_byte(50) // life
  24.     write_byte(200)  // width
  25.     write_byte(0)   // noise
  26.     write_byte(0)   // r, g, b
  27.     write_byte(0)   // r, g, b
  28.     write_byte(250)   // r, g, b
  29.     write_byte(250)   // brightness
  30.     write_byte(20)      // speed
  31.     message_end()
  32.     /*  END TE_BEAMPOINTS  */
  33.     /*  TE_EXPLOSION  */
  34.     message_begin( MSG_BROADCAST, SVC_TEMPENTITY )
  35.     write_byte(TE_EXPLOSION)
  36.     write_coord(origin[0]+random_num(1,120))
  37.     write_coord(origin[1]+random_num(1,70))
  38.     write_coord(origin[2])
  39.     write_short(Fire)
  40.     write_byte(100)
  41.     write_byte(50)
  42.     write_byte(0)
  43.     /* END TE_EXPLOSION  */
  44. }
  45. public plugin_precache()
  46. {
  47.     Beam = precache_model("sprites/zbeam6.spr")
  48.     Fire = precache_model("sprites/zerogxplode.spr")
  49. }
  50. public plugin_init()
  51. {
  52.     register_plugin("Beam Cannon","1.0","Freecode")
  53.     register_clcmd("amx_beam","beam",ADMIN_KICK,"beam")
  54. }
复制代码
游客
回复
您需要登录后才可以回帖 登录 | 注个册吧

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