Thread: CS Flashbang (help in the flash affect)

Results 1 to 4 of 4
  1. #1
    Registered User yemez123's Avatar
    Join Date
    May 2017
    Posts
    10

    CS Flashbang (help in the flash affect)

    Hello, I want make flash affect but in not wall back

    Code:
    		CBaseEntity@ pEnt = null;
    		while( ( @pEnt = g_EntityFuncs.FindEntityInSphere( pEnt, self.pev.origin, FLASHNADE::EXPLOSION_RADIUS, "*", "classname" ) ) !is null )
    		{
    			CBasePlayer@   pOwner  = cast<CBasePlayer@>(  g_EntityFuncs.Instance( pevOwner ) );
    			CBaseMonster@  pVictim = cast<CBaseMonster@>( pEnt );
    
    
    			if( pVictim !is null && pVictim.IsAlive() )
    			{
    				//g_Game.AlertMessage( at_console, "pVictim.classname = " +pVictim.pev.classname+ "\n" );
    				//g_Game.AlertMessage( at_console, "pVictim.netname   = " +pVictim.pev.netname+ "\n" );
    
    
    				// set global effects
    				// store freeze duration
    
    
    
    
    				if ( pTrace.flFraction != 0.0f )
    				{
    					if( pVictim.IsPlayer() )
    					{
    						//.AlertMessage( at_console, "pVictim is a player\n" );
    
    
    						// Player using more "natural" way
    
    
    						// Add a blue tint to their screen
    						g_PlayerFuncs.ScreenFade( pVictim, Vector( 255,255,255 ), 5, 5, 255, FFADE_IN);
    
    
    					}
    				}
    
    
    				// Set the timer here
    			}
    		}

    can anybody help me?

  2. #2
    func_vehicle enthusiaist w00tguy123's Avatar
    Join Date
    Dec 2006
    Location
    U.S. West
    Posts
    1,599

    Re: CS Flashbang (help in the flash affect)

    Quote Originally Posted by yemez123 View Post
    Hello, I want make flash affect but in not wall back
    idk what that means but you probably want one of these:

    https://github.com/baso88/SC_AngelScript/wiki/TE_DLIGHT
    https://github.com/baso88/SC_AngelScript/wiki/TE_ELIGHT
    Love,
    w00tguy

  3. #3
    Registered User yemez123's Avatar
    Join Date
    May 2017
    Posts
    10

    Re: CS Flashbang (help in the flash affect)

    I mean effect working but I don't want working on wall

  4. #4
    begadang jangan begadang =_= anggara_nothing's Avatar
    Join Date
    Jan 2016
    Location
    Indonesia
    Posts
    155

    Re: CS Flashbang (help in the flash affect)

    Simple way:
    Code:
    if( pVictim.FVisibleFromPos(self.pev.origin, pVictim.pev.origin) )
    {
        // Aww, my eyes!
    }
    Traceline way:
    Code:
    TraceResult trcr;
    g_Utility.TraceLine( self.pev.origin, pVictim.pev.origin, dont_ignore_monsters, self.edict(), trcr );
    if( trcr.pHit is pVictim.edict() )
    {
        // Aww, my eyes!
    }

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •