Raised This Month: $51 Target: $400
 12% 

Bomb beacon?


Post New Thread Reply   
 
Thread Tools Display Modes
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 01-17-2010 , 05:12   Re: Bomb beacon?
Reply With Quote #11

Next time post in requests section.
Code:
#include < amxmodx > #include < engine > #include < fakemeta > new const SOUND[ ] = "buttons/blip1.wav"; enum _:BeaconTypes {     Beacon_Dropped,     Beacon_Planted }; new g_pCvar, g_pSound; new g_iSprite; public plugin_init( ) {     register_plugin( "Bomb Beacon", "1.0", "xPaw" );         g_pCvar  = register_cvar( "bb_enabled", "3" ); // 0 - Dropped | 1 - Planted | 2 - Both     g_pSound = register_cvar( "bb_sound",   "0" );         if( !find_ent_by_class( FM_NULLENT, "func_bomb_target" )     &&  !find_ent_by_class( FM_NULLENT, "info_bomb_target" ) )         pause( "a" );         register_logevent( "BombDropped", 3, "2=Dropped_The_Bomb" );     register_logevent( "BombPlanted", 3, "2=Planted_The_Bomb" ); } public plugin_precache( ) {     g_iSprite = precache_model( "sprites/laserbeam.spr" );         precache_sound( SOUND ); } public BombDropped( )     if( IsEnabled( Beacon_Dropped ) )         set_task( 1.0, "FindBomb" ); public FindBomb( )     ShowBeacon( find_ent_by_model( FM_NULLENT, "weaponbox", "models/w_backpack.mdl" ) ); public BombPlanted( ) {     if( IsEnabled( Beacon_Planted ) ) {         new iBomb = find_ent_by_model( FM_NULLENT, "grenade", "models/w_c4.mdl" );                 if( iBomb )             set_task( 1.0, "ShowBeacon", iBomb );     } } public ShowBeacon( const iEntity ) {     if( !is_valid_ent( iEntity ) )         return;         set_task( 2.0, "ShowBeacon", iEntity );         if( get_pcvar_num( g_pSound ) )         emit_sound( iEntity, CHAN_ITEM, SOUND, 1.0, ATTN_NORM, 0, PITCH_NORM );         new Float:vOrigin[ 3 ];     entity_get_vector( iEntity, EV_VEC_origin, vOrigin );         message_begin( MSG_BROADCAST, SVC_TEMPENTITY );     write_byte( TE_BEAMCYLINDER );     engfunc( EngFunc_WriteCoord, vOrigin[ 0 ] );     engfunc( EngFunc_WriteCoord, vOrigin[ 1 ] );     engfunc( EngFunc_WriteCoord, vOrigin[ 2 ] );     engfunc( EngFunc_WriteCoord, vOrigin[ 0 ] );     engfunc( EngFunc_WriteCoord, vOrigin[ 1 ] );     engfunc( EngFunc_WriteCoord, vOrigin[ 2 ] + 100 );     write_short( g_iSprite );     write_byte( 0 );     write_byte( 1 );     write_byte( 6 );     write_byte( 2 );     write_byte( 1 );     write_byte( 255 );     write_byte( 0 );     write_byte( 0 );     write_byte( 200 );     write_byte( 6 );     message_end( ); } bool:IsEnabled( const iType ) {     new iCvar = get_pcvar_num( g_pCvar );         return bool:( iCvar & iType ); }
__________________
xPaw is offline
Seta00
The Seta00 user has crashed.
Join Date: Jan 2010
Location: Berlin
Old 01-17-2010 , 10:22   Re: Bomb beacon?
Reply With Quote #12

Cool. Too bad I run a surf server, so no bomb =(

oO Visual stuff is hardcore:
Code:
    message_begin( MSG_BROADCAST, SVC_TEMPENTITY );
    write_byte( TE_BEAMCYLINDER );
    engfunc( EngFunc_WriteCoord, vOrigin[ 0 ] );
    engfunc( EngFunc_WriteCoord, vOrigin[ 1 ] );
    engfunc( EngFunc_WriteCoord, vOrigin[ 2 ] );
    engfunc( EngFunc_WriteCoord, vOrigin[ 0 ] );
    engfunc( EngFunc_WriteCoord, vOrigin[ 1 ] );
    engfunc( EngFunc_WriteCoord, vOrigin[ 2 ] + 100 );
    write_short( g_iSprite );
    write_byte( 0 );
    write_byte( 1 );
    write_byte( 6 );
    write_byte( 2 );
    write_byte( 1 );
    write_byte( 255 );
    write_byte( 0 );
    write_byte( 0 );
    write_byte( 200 );
    write_byte( 6 );
    message_end( );
EDIT: Didn't work for me

Last edited by Seta00; 01-17-2010 at 10:38.
Seta00 is offline
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 01-17-2010 , 10:42   Re: Bomb beacon?
Reply With Quote #13

cuz ur bad.
__________________
xPaw is offline
stevenisecko138
Senior Member
Join Date: Dec 2008
Location: CA
Old 01-17-2010 , 13:24   Re: Bomb beacon?
Reply With Quote #14

thanks xpaw
stevenisecko138 is offline
Send a message via AIM to stevenisecko138
TCB_WyattEarp
Member
Join Date: Sep 2013
Old 04-18-2019 , 09:41   Re: Bomb beacon?
Reply With Quote #15

I compiled this, the plugin is running - but it is not working ?

Can anyone help out ? I would like to have this on my server.
TCB_WyattEarp is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 04:48.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode