|
手雷爆炸光环.sma
[mw_shl_code=pawn,true]#include <amxmodx>
#include <fakemeta>
#include <csx>
#define TE_BEAMFOLLOW 22
new g_trail
new ExSpr
public plugin_init()
{
register_plugin("Grenade Trail","1.0","X-man")
register_cvar("amx_grentrail","1")
}
public plugin_precache() {
g_trail = precache_model("sprites/smoke.spr")
ExSpr = precache_model("sprites/shockwave.spr")
}
public grenade_throw(id,greindex,wpn)
{
if(!get_cvar_num("amx_grentrail"))
return PLUGIN_HANDLED
if(wpn == CSW_HEGRENADE)
Create_TE_BEAMFOLLOW(greindex, g_trail, 10, 10, 255, 0, 0, 200)
return PLUGIN_CONTINUE
}
stock Create_TE_BEAMFOLLOW(id, g_trail, life, width, r, g, b, brightness)
{
message_begin(MSG_BROADCAST, SVC_TEMPENTITY)
write_byte(TE_BEAMFOLLOW)
write_short(id)
write_short(g_trail)
write_byte(life)
write_byte(width)
write_byte(r)
write_byte(g)
write_byte(b)
write_byte(brightness)
message_end()
}
public HE_explode(ent)
{
if(!pev_valid(ent))
return;
new origin[3], Float:originG[3]
pev(ent, pev_origin, originG)
FVecIVec(originG,origin)
HE_Explosion(origin)
}
public HE_Explosion(origin[3])
{
message_begin(MSG_BROADCAST,SVC_TEMPENTITY);
write_byte(21)
write_coord(origin[0])
write_coord(origin[1])
write_coord(origin[2])
write_coord(origin[0])
write_coord(origin[1])
write_coord(origin[2] + 385)
write_short(ExSpr)
write_byte(0)
write_byte(0)
write_byte(5)
write_byte(80)
write_byte(0)
write_byte(225)
write_byte(0)
write_byte(0)
write_byte(192)
write_byte(0)
message_end()
message_begin(MSG_BROADCAST,SVC_TEMPENTITY);
write_byte(21)
write_coord(origin[0])
write_coord(origin[1])
write_coord(origin[2])
write_coord(origin[0])
write_coord(origin[1])
write_coord(origin[2] + 470)
write_short(ExSpr)
write_byte(0)
write_byte(0)
write_byte(5)
write_byte(80)
write_byte(0)
write_byte(225)
write_byte(0)
write_byte(0)
write_byte(192)
write_byte(0)
message_end()
message_begin(MSG_BROADCAST,SVC_TEMPENTITY);
write_byte(21)
write_coord(origin[0])
write_coord(origin[1])
write_coord(origin[2])
write_coord(origin[0])
write_coord(origin[1])
write_coord(origin[2] + 555)
write_short(ExSpr)
write_byte(0)
write_byte(0)
write_byte(5)
write_byte(80)
write_byte(0)
write_byte(225)
write_byte(0)
write_byte(0)
write_byte(192)
write_byte(0)
message_end()
message_begin(MSG_BROADCAST,SVC_TEMPENTITY);
write_byte(27);
write_coord(origin[0])
write_coord(origin[1])
write_coord(origin[2])
write_byte(60)
write_byte(225)
write_byte(0)
write_byte(0)
write_byte(8)
write_byte(60)
message_end()
}[/mw_shl_code]
夜枫丶后悔有妻 13:13:03
其实也不是什么新鲜玩意,就是想在手雷拖尾插件的基础上再增加点东西,即手雷爆炸的时候,
附带产生一个红色的光坏(如图示)。插件的代码写完了,
但是没能编译成功,希望能有高人帮忙修改一下 |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?注个册吧
×
|