Skocz do zawartości

Nowy szablon forum

mygo.pl

Stworzyliśmy dla Was nowy wygląd forum. Z pewnością znajdziesz rzeczy, które wg Ciebie mogą zostać zmienione - wspomnij o tym w specjalnym wątku.

Czytaj więcej

Jak założyć własną sieć

serwerów CS

Zastanawiasz się nad prowadzeniem własnej sieci serwerów? Przeczytaj podstawowe informacje, na które należy zwrócić uwagę, przy takim projekcie.

Czytaj więcej

Tworzymy spis sieci

dodaj swoją

Dodaj sieć do której należysz, pozwoli to na promocję i budowę ogólnopolskiej bazy sieci CS.

Czytaj więcej

RSSRequest Deathmsg event to include


MYGO.pl
 Udostępnij

Rekomendowane odpowiedzi

  • RSSy
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;


Przeczytaj cały wpis

Odnośnik do komentarza
Udostępnij na innych stronach

Gość
Ten temat został zamknięty. Brak możliwości dodania odpowiedzi.
 Udostępnij

  • Ostatnio przeglądający   0 użytkowników

    • Brak zarejestrowanych użytkowników przeglądających tę stronę.
×
×
  • Dodaj nową pozycję...