h266579110 发表于 2007-6-6 22:13:34

离子炮插件

有谁可以做出离子炮插件?
我找到一个Freecode做的插件
但是我测试後服务器当机:cry:
有谁可以帮忙修正,拜託了


#include <amxmod>

#define TE_BEAMPOINTS 0
#define TE_EXPLOSION 3

new Beam,Fire

public beam()
{
    new players,origin,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+random_num(1,1000))
    write_coord(origin+random_num(1,500))
    write_coord(origin+1000000)
    write_coord(origin+random_num(1,1000))
    write_coord(origin+random_num(1,500))
    write_coord(origin-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+random_num(1,120))
    write_coord(origin+random_num(1,70))
    write_coord(origin)
    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")
}
页: [1]
查看完整版本: 离子炮插件