Raised This Month: $ Target: $400
 0% 

Request Deathmsg event to include


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
eNNkds
Member
Join Date: Sep 2012
Location: Romania
Old 11-19-2022 , 12:08   Request Deathmsg event to include
Reply With Quote #1

Hello i tried to deathmsg event.
no compile error..
my question is if last line about bool is for user used blocks. will hide the victim used blocks after get i terrorist team?

PHP Code:
#include <amxmodx>
#include <fakemeta>
#include <cstrike>

#define PLUGIN    "hideNotUsed"
#define AUTHOR    "DarkGL"
#define VERSION    "1.0"

forward bb_round_started();

new 
pCvarTime ,
    
FloatfAmount    =    255.0 ,
    
FloatfOffset    =    0.0 ;

public 
plugin_init(){
    
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
pCvarTime    =    register_cvar"hideTime" "4.0" );

    
register_event"DeathMsg""DeathMsg""a" )
}
public 
DeathMsg( )
{
    new 
Victim read_data)
    new 
CsTeams:Team cs_get_user_teamVictim )
    
    if(!
is_user_connected(Victim))
    return 
PLUGIN_CONTINUE;
    {
        if( !
is_user_alive(Victim) ) return PLUGIN_HANDLED
        
if( Team == CS_TEAM_T )
           
set_task0.1 "hideAll" );
    }

public 
bb_round_started(){
    
    
fAmount    =    255.0;
    
    
fOffset    =    fAmount / ( get_pcvar_floatpCvarTime ) * 10.0 ) ;
    
    
setBlocksfAmount , .reset true );
    
    
set_task0.1 "hideAll" );
}

public 
hideAll(){
    if( 
fAmount <= 0.0 ){
        
        
setBlocksfAmount , .changeOrigin true );
        
        return ;
    }
    
    
fAmount    -=    fOffset;
    
    
setBlocksfAmount );
    
    
set_task0.1 "hideAll" );
}

setBlocksFloatfAmount boolchangeOrigin false boolreset false ){
    
    new 
szTarget16 ] ,
        
iEnt ;
    
    while( ( 
iEnt engfuncEngFunc_FindEntityByString iEnt "classname" "func_wall" ) ) != ){
        
        if( !
pev_validiEnt ) ){
            continue;
        }
        
        
peviEnt pev_targetname szTarget charsmaxszTarget ) );
        
        if( 
equalszTarget "ignore" ) || equalszTarget "barrier" ) || bb_is_used_blockiEnt ) ){
            continue;
        }
        
        if( 
reset ){
            
set_peviEnt pev_rendermode kRenderNormal );
            
set_peviEnt pev_renderamt 255.0 );
        }
        else if( !
changeOrigin ){
            
set_peviEnt pev_rendermode kRenderTransTexture );
            
set_peviEnt pev_renderamt fAmount );
        }
        
        if( 
changeOrigin ){
            
engfuncEngFunc_SetOrigin iEnt , { 9999.0 9999.0 9999.0 } );
        }
        
    }
}

boolbb_is_used_blockiEnt ){
    return 
peviEnt pev_iuser4 ) != 0;

eNNkds is offline
Send a message via Skype™ to eNNkds
 



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 07:36.


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