求一个手雷爆炸效果插件
在网上找到好多手雷效果的spr文件,但找了论坛没有类似这样的插件,麻烦那位能提供下? 本帖最后由 点通粉丝 于 2009-5-18 22:26 编辑手雷烟花爆炸效果插件/*
New HeNades Effects
Version 0.1 by SAMURAI
* Plugin details:
- The basic sprite from hegrenade explode was replaced with new 13 sprites
New effects, colors, etc
* Required Modules:
- Csx
- Fakemeta
* Cvars:
- None
* Admin Commands:
- None
Have a nice day now
*/
#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
#include <csx>
#define PLUGIN_NAME "New HeNades Effects"
#define PLUGIN_VERSION "0.1"
#define PLUGIN_AUTHOR "SAMURAI"
// required sprites for plugin
new const g_sprites[][] =
{
"sprites/fexplo1.spr",
"sprites/fexplo1.spr"
}
new gSpriteIndex;
/******************************************************************
********************** AMXMODX PLUGIN *****************************
******************************************************************/
public plugin_init()
{
// Register the plugin
register_plugin(PLUGIN_NAME,PLUGIN_VERSION,PLUGIN_AUTHOR);
// Forward Fakemeta Think
register_forward(FM_Think,"fw_think");
}
// plugin_precache forward
public plugin_precache()
{
for(new i = 0; i < sizeof g_sprites; i++)
gSpriteIndex = engfunc(EngFunc_PrecacheModel,g_sprites);
}
/**************************************
grenade_throw CSX Forward //
It's called when an user throw //
a grenade //
**************************************/
public grenade_throw(id,iGren,wid)
{
// check if grenade isn't a HeGrenade
if(wid != CSW_HEGRENADE)
return PLUGIN_CONTINUE;
// check if Grenade entity isn't a valid entity
if(!pev_valid(iGren))
return PLUGIN_CONTINUE;
// set a new classname to HeGrenade
set_pev(iGren,pev_classname,"fake_hegren");
// Make it to explode after 1.6 seconds
set_task(1.6,"gre_explode",iGren);
return PLUGIN_CONTINUE;
}
/*****************************************
FM Think Fakemeta Forward //
On this case, help to stop hegrenade //
from original explosion //
***************************************/
public fw_think(ent)
{
if(!pev_valid(ent))
return FMRES_IGNORED;
if(!pev(ent,pev_bInDuck))
return FMRES_IGNORED;
new class;
pev(ent,pev_classname,class,31);
if(equali(class,"fake_hegren"))
return FMRES_SUPERCEDE;
return FMRES_IGNORED;
}
/*****************************************
This is called when hegrenade is //
explode with new sprites //
***************************************/
public gre_explode(ent)
{
// check if entity isn't valid
if(!pev_valid(ent))
return;
// new variable for origin and get origin of entity
static Float:origin;
pev(ent,pev_origin,origin);
message_begin(MSG_BROADCAST,SVC_TEMPENTITY);
write_byte(TE_EXPLOSION); // TE_EXPLOSION
write_coord(floatround(origin)); // origin x
write_coord(floatround(origin)); // origin y
write_coord(floatround(origin)); // origin z
write_short(gSpriteIndex); // sprites
write_byte(40); // scale in 0.1's
write_byte(30); // framerate
write_byte(TE_EXPLFLAG_NONE); // flags
message_end(); // message end
}
1# eason39 谢谢!! 点通粉丝 真地道!!
发就来原码!!
支持!!! 顶上去 好东西 编译不了啊??
这个爆炸效果怎么样? 9527的更经典,附件呢? 找这东西很久了,想不到是很久以前的
页:
[1]
2