|
本帖最后由 kk阿朗 于 2010-6-24 18:29 编辑
插件介绍:
当恐怖分子安装C4后,会在以C4为中心的点向外散发类似于光环的东西,详情请看图片吧!
Edited:修正了一个BUG !!!!
所需模块:
-
- #include <engine>
- #include <csx>
复制代码 /* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <fakemeta>
#include <csx>
#define PLUGIN "c4 Blast"
#define VERSION "0.2"
#define AUTHOR "K.K.Lv"
new gSpriteCircle;
new gC4Timer;
new Float:fOrigin[ 3 ];
new iOrigin[ 3 ];
public plugin_init() {
register_plugin( PLUGIN, VERSION, AUTHOR );
register_logevent( "RoundEnd", 2, "1=Round_End" );
}
public plugin_precache() {
gSpriteCircle = precache_model( "sprites/shockwave.spr" );
}
public bomb_planted( planter ) {
gC4Timer = get_cvar_num( "mp_c4timer" );
set_task( 1.0, "bomb_blast", 1987);
set_task( 1.0, "dist_time", 1990, "", 0, "b" );
}
public bomb_blast() {
new c4 = -1;
while ( ( c4 = engfunc( EngFunc_FindEntityByString, c4, "classname", "grenade" ) ) ) {
if ( get_pdata_int( c4, 96 ) & ( 1<<8 ) ) {
create_blast_circle( c4 );
}
}
static Float:task_time
if ( gC4Timer > 13 ) task_time = 1.0;
else if ( gC4Timer > 7 ) task_time = 0.5;
else task_time = 0.3;
set_task( task_time, "bomb_blast", 1987 );
}
public dist_time() {
--gC4Timer;
}
public RoundEnd() {
remove_task( 1987 );
remove_task( 1990 );
/*new c4 = -1;
while ( ( c4 = find_ent_by_model( c4, "grenade", "models/w_c4.mdl" ) ) ) {
remove_entity( c4 );
}*/
}
stock create_blast_circle( ent ) {
pev( ent, pev_origin, fOrigin );
FVecIVec( fOrigin, iOrigin );
static r, g, b;
if ( gC4Timer > 13 ) {r = 255; g = 255; b = 255;}
else if ( gC4Timer > 7 ) {r = 125; g = 125; b = 0;}
else {r = 250; g = 10; b = 0;}
message_begin( MSG_BROADCAST, SVC_TEMPENTITY, iOrigin );
write_byte( TE_BEAMCYLINDER );
write_coord( iOrigin[ 0 ] );
write_coord( iOrigin[ 1 ] );
write_coord( iOrigin[ 2 ] );
write_coord( iOrigin[ 0 ] );
write_coord( iOrigin[ 1 ] );
write_coord( iOrigin[ 2 ] + 125 ) ;
write_short( gSpriteCircle );
write_byte( 0 );
write_byte( 1 );
write_byte( 6 );
write_byte( 8 );
write_byte( 1 );
write_byte( r );
write_byte( g );
write_byte( b );
write_byte( 128 );
write_byte( 5 );
message_end();
if ( gC4Timer > 7 ) {
message_begin( MSG_BROADCAST, SVC_TEMPENTITY, iOrigin );
write_byte( TE_BEAMCYLINDER );
write_coord( iOrigin[ 0 ] );
write_coord( iOrigin[ 1 ] );
write_coord( iOrigin[ 2 ] );
write_coord( iOrigin[ 0 ] );
write_coord( iOrigin[ 1 ] );
write_coord( iOrigin[ 2 ] + 270 ) ;
write_short( gSpriteCircle );
write_byte( 0 );
write_byte( 1 );
write_byte( 6 );
write_byte( 8 );
write_byte( 1 );
write_byte( r );
write_byte( g );
write_byte( b );
write_byte( 128 );
write_byte( 5 );
message_end();
}
}此插件不需任何命令与参数!在单机CS1.6,AMXX1.8.1 测试过! |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?注个册吧
×
|