|
发表于 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");
}
} |
|