|
发表于 2011-4-26 14:02:01
|
显示全部楼层
来自 中国–广东–云浮
我發源碼大家不要買
#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
//#include <engine>
#define TE_SPRITE 17
new exp, g_sModelIndexSmoke, g_lightning;
new cvar_radius,icvar_num,icvar_time;
new white;
public plugin_init()
{
register_plugin("glittering appearance","0.1","DaBears")
register_clcmd("ri","explode",ADMIN_IMMUNITY)
register_clcmd("f","blastcircles",ADMIN_IMMUNITY)
cvar_radius = register_cvar("explosion_radius", "150")
icvar_num = register_cvar("explosion_num", "20");
icvar_time = register_cvar("explosion_time", "0.5");
register_event("ResetHUD","expme","be")
return PLUGIN_CONTINUE
}
public plugin_precache()
{
exp = precache_model("sprites/shockwave.spr")
g_lightning = precache_model( "sprites/xenobeam.spr" );
g_sModelIndexSmoke = precache_model("sprites/wdrip2.spr")
white = precache_model("sprites/white.spr");
precache_sound("misc/op.wav")
}
public blastcircles(id)
{
new origin[3]
get_user_origin(id, origin)
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(6)
write_byte(2)
write_byte(6)
write_byte(90)
write_byte(4)
write_byte(255)
write_byte(105)
write_byte(180)
write_byte(60)
write_byte(5)
message_end()
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 /2)
write_short(exp)
write_byte(6)
write_byte(2)
write_byte(6)
write_byte(100)
write_byte(4)
write_byte(30)
write_byte(144)
write_byte(255)
write_byte(80)
write_byte(5)
message_end()
}
public Shake(id)
{
message_begin(MSG_ONE_UNRELIABLE,get_user_msgid("ScreenShake"),_,id);
write_short(1<<13);
write_short(1<<13);
write_short(1<<13);
message_end();
}
public expme(id)
{
if(is_user_alive(id) && (get_user_flags(id) & ADMIN_IMMUNITY))
{
client_cmd(0,"spk misc/op")
client_cmd(0,"g;clear")
explode_blastcircles(id);
set_task(get_pcvar_float(icvar_time), "explode_blastcircles", id,_,_,"a",get_pcvar_num(icvar_num));
}
return PLUGIN_CONTINUE
}
public explode_blastcircles(id)
{
new vorigin[ 3 ], pos[ 3 ];
get_user_origin( id, vorigin );
vorigin[ 2 ] -= 26;
pos[ 0 ] = vorigin[ 0 ] + 30;
pos[ 1 ] = vorigin[ 1 ] + 30;
pos[ 2 ] = vorigin[ 2 ] + 170;
Thunder( pos, vorigin );
blastcircles(id);
explode(id);
deagle_explode(vorigin)
}
public explode(id)
{
new origin[3]
get_user_origin(id, origin)
message_begin( MSG_BROADCAST,SVC_TEMPENTITY)
write_byte( 17 )
write_coord(origin[0])
write_coord(origin[1])
write_coord(origin[2])
write_short( g_sModelIndexSmoke )
write_byte( 12 )
write_byte( 250 )
message_end()
}
public Thunder( start[ 3 ], end[ 3 ] )
{
message_begin( MSG_BROADCAST, SVC_TEMPENTITY );
write_byte( TE_BEAMPOINTS );
write_coord( start[ 0 ] );
write_coord( start[ 1 ] );
write_coord( start[ 2 ] );
write_coord( end[ 0 ] );
write_coord( end[ 1 ] );
write_coord( end[ 2 ] );
write_short( g_lightning );
write_byte( 1 );
write_byte( 2 );
write_byte( 3 );
write_byte( 6 );
write_byte( 40 );
write_byte( 150 );
write_byte( 150 );
write_byte( 80 );
write_byte( 130 );
write_byte( 150 );
message_end();
message_begin( MSG_PVS, SVC_TEMPENTITY, end );
write_byte( TE_SPARKS );
write_coord( end[ 0 ] );
write_coord( end[ 1 ]);
write_coord( end[ 2 ] );
message_end();
}
deagle_explode(vec1[3])
{
message_begin(MSG_BROADCAST,SVC_TEMPENTITY,vec1);
write_byte(21);
write_coord(vec1[0]);
write_coord(vec1[1]);
write_coord(vec1[2] + 16);
write_coord(vec1[0]);
write_coord(vec1[1]);
write_coord(vec1[2] + 114);
write_short(white);
write_byte(6);
write_byte(2);
write_byte(6);
write_byte(120);
write_byte(0);
write_byte(50);
write_byte(205);
write_byte(50);
write_byte(40);
write_byte(0);
message_end();
message_begin(MSG_BROADCAST,SVC_TEMPENTITY );
write_byte(17);
write_coord(vec1[0]);
write_coord(vec1[1]);
write_coord(vec1[2]);
write_short( g_sModelIndexSmoke )
write_byte(15);
write_byte(250);
message_end();
message_begin(MSG_BROADCAST,SVC_TEMPENTITY);
write_byte(TE_EXPLOSION)
write_coord(vec1[0])
write_coord(vec1[1])
write_coord(vec1[2])
write_short(g_lightning)
write_byte(250)
write_byte(180)
write_byte(TE_EXPLFLAG_NOSOUND)
message_end()
message_begin(MSG_BROADCAST, SVC_TEMPENTITY);
write_byte(TE_LAVASPLASH);
write_coord(vec1[0]);
write_coord(vec1[1]);
write_coord(vec1[2]);
message_end();
} |
|