Raised This Month: $ Target: $400
 0% 

Set C4 Glow (when is dropped)


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 05-10-2010 , 09:43   Re: Set C4 Glow (when is dropped)
Reply With Quote #10

Try this

Code:
#include < amxmodx > #include < engine > enum _:GlowTypes {     Glow_Dropped,     Glow_Planted }; new g_pCvar; public plugin_init( ) {     register_plugin( "Bomb Glow", "1.0", "xPaw" );         g_pCvar = register_cvar( "bomb_glow", "3" ); // 0 - Dropped | 1 - Planted | 2 - Both         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 BombDropped( )     if( IsEnabled( Glow_Dropped ) )         SetBombRender( find_ent_by_model( FM_NULLENT, "weaponbox", "models/w_backpack.mdl" ) ); public BombPlanted( )     if( IsEnabled( Glow_Planted ) )         SetBombRender( find_ent_by_model( FM_NULLENT, "grenade", "models/w_c4.mdl" ); SetBombRender( const iEntity ) {     if( !is_valid_ent( iEntity ) )         return;         // Your render code } bool:IsEnabled( const iType ) {     new iCvar = get_pcvar_num( g_pCvar );         return bool:( iCvar & iType ); }
__________________
xPaw is offline
 



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 03:44.


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