搜索
楼主: Osker Lee

【求助】爆炸光坏的代码怎么写?

[复制链接]
 楼主| 发表于 2011-7-24 04:30:16 | 显示全部楼层 来自 湖北武汉
解决了,原来是插件冲突,关闭了一些其他插件后就正常了。
回复

使用道具 举报

发表于 2011-7-24 13:40:52 | 显示全部楼层 来自 广东广州
11# Osker Lee


大哥你看一下我这个手雷拖尾的效果如何
看一下有没有办法和手雷爆有光环的结合在一起
#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>

new exp;
new cvar_radius;

public plugin_init()
{
        register_plugin("GrenadeEffect", "1.0", "xxx");
        RegisterHam(Ham_Think, "grenade", "fw_ThinkGrenade");
        cvar_radius = register_cvar("explosion_radius", "200");
        register_clcmd("test","blastcircles");
       
        return PLUGIN_CONTINUE;
}

public plugin_precache()
        exp = precache_model("sprites/shockwave.spr");

public blastcircles(id)
{
        client_print(0,print_chat,"blastcircles");
        new Float:forigin[3];
        new origin[3];
        pev(id, pev_origin, forigin);
        FVecIVec(forigin, origin);
        client_print(0,print_chat,"f %f %f %f",forigin[0],origin[1],origin[2]);
        client_print(0,print_chat,"i %d %d %d",origin[0],origin[1],origin[2]);
       
        new blast = get_pcvar_num(cvar_radius);
       
        message_begin(MSG_PAS, SVC_TEMPENTITY, origin)
        write_byte(TE_BEAMCYLINDER)
        write_coord(origin[0])
        write_coord(origin[1])
        write_coord(origin[2] - 16)
        write_coord(origin[0])
        write_coord(origin[1])
        write_coord(origin[2] - 16 + blast)
        write_short(exp)
        write_byte(0)
        write_byte(0)
        write_byte(0)
        write_byte(0)  //光圈高度
        write_byte(0)   //
        write_byte(0) //紫颜色
        write_byte(0) //紫颜色
        write_byte(0) //紫颜色
        write_byte(0)  //光圈亮度
        write_byte(5)
        message_end()

        message_begin(MSG_PVS,SVC_TEMPENTITY,origin) //血珠代码
        write_byte(TE_PARTICLEBURST) // TE id
        write_coord(origin[0]) // x
        write_coord(origin[1]) // y
        write_coord(origin[2]) // z
        write_short(200) // 半径
        write_byte(100) // 颜色
        write_byte(4) // 持续时间
        message_end()
}

public fw_ThinkGrenade(ent)
{
        if (!pev_valid(ent)) return HAM_IGNORED;
       
        static Float:dmgtime, Float:current_time;
        pev(ent, pev_dmgtime, dmgtime);
        current_time = get_gametime();
       
        if (dmgtime >= current_time)
        {
                blastcircles(ent);
                client_print(0,print_chat,"Grenade");
        }
}
回复

使用道具 举报

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

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