|
有谁可以做出离子炮插件?
我找到一个Freecode做的插件
但是我测试後服务器当机:cry:
有谁可以帮忙修正,拜託了
- #include <amxmod>
- #define TE_BEAMPOINTS 0
- #define TE_EXPLOSION 3
- new Beam,Fire
- public beam()
- {
- new players[32],origin[3],inum
- get_players(players,inum)
- new victim = random_num(1,inum)
- get_user_origin(victim,origin)
- /* TE_BEAMPOINTS */
- message_begin( MSG_BROADCAST, SVC_TEMPENTITY )
- write_byte(TE_BEAMPOINTS)
- write_coord(origin[0]+random_num(1,1000))
- write_coord(origin[1]+random_num(1,500))
- write_coord(origin[2]+1000000)
- write_coord(origin[0]+random_num(1,1000))
- write_coord(origin[1]+random_num(1,500))
- write_coord(origin[2]-160)
- write_short(Beam) // model
- write_byte(0) // start frame
- write_byte(0) // framerate
- write_byte(50) // life
- write_byte(200) // width
- write_byte(0) // noise
- write_byte(0) // r, g, b
- write_byte(0) // r, g, b
- write_byte(250) // r, g, b
- write_byte(250) // brightness
- write_byte(20) // speed
- message_end()
- /* END TE_BEAMPOINTS */
-
- /* TE_EXPLOSION */
- message_begin( MSG_BROADCAST, SVC_TEMPENTITY )
- write_byte(TE_EXPLOSION)
- write_coord(origin[0]+random_num(1,120))
- write_coord(origin[1]+random_num(1,70))
- write_coord(origin[2])
- write_short(Fire)
- write_byte(100)
- write_byte(50)
- write_byte(0)
- /* END TE_EXPLOSION */
- }
- public plugin_precache()
- {
- Beam = precache_model("sprites/zbeam6.spr")
- Fire = precache_model("sprites/zerogxplode.spr")
- }
- public plugin_init()
- {
- register_plugin("Beam Cannon","1.0","Freecode")
- register_clcmd("amx_beam","beam",ADMIN_KICK,"beam")
- }
复制代码 |
|