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

no team flash & black flash


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   General Purpose       
SEMO.Pa3x
Junior Member
Join Date: Oct 2016
Location: Iraq/Najaf
Old 10-12-2016 , 03:47   no team flash & black flash
Reply With Quote #1

Black Flash
&
No Team Flash

| Description:
this plugin change color of weapon_flashbang
from white to black
and make the flash not work to your friends just for you and your enemy .


| Credits:
EFFx^
Numb
ConnorMcLeod

PHP Code:
/*
-------------------------------------
Special thanks to those who helped me
-------------------------------------

EFFx^
Numb
ConnorMcLeod

*/

#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>


const MAX_ENTSARRAYS_SIZE 64
new g_bitGonnaExplode[MAX_ENTSARRAYS_SIZE]
#define SetGrenadeExplode(%1)        g_bitGonnaExplode[%1>>5] |=  1<<(%1 & 31)
#define ClearGrenadeExplode(%1)    g_bitGonnaExplode[%1>>5] &= ~( 1 << (%1 & 31) )
#define WillGrenadeExplode(%1)    g_bitGonnaExplode[%1>>5] &   1<<(%1 & 31)
const XTRA_OFS_PLAYER 5
const m_iTeam 114
#define cs_get_user_team_index(%1)    get_pdata_int(%1, m_iTeam, XTRA_OFS_PLAYER)
new Float:g_flCurrentGameTimeg_iCurrentFlasherg_iCurrentFlashBang
new mp_friendlyfire
new g_iMaxPlayers
#define IsPlayer(%1)    ( 1 <= %1 <= g_iMaxPlayers )

public plugin_init()
{
    
register_plugin("No team flash""3.2""EFFx / Numb / ConnorMcLeod / SEMO.Pa3x")    
    
RegisterHam(Ham_Think"grenade""Ham__CGrenade_Think__Pre")
    
register_forward(FM_FindEntityInSphere"Fm__FindEntityInSphere__Pre")
    
mp_friendlyfire get_cvar_pointer("mp_friendlyfire")    
    
g_iMaxPlayers get_maxplayers()
    
register_event("ScreenFade","FlashedEvent","be","4=255","5=255","6=255","7>199")
}

public 
FlashedEventid )
{
    new 
iBlack
    
if (!(iBlack))
    {
        
iBlack =   100
    
}
    
message_beginMSG_ONE,get_user_msgid("ScreenFade"),{0,0,0},id )
    
write_shortread_data) )    // Duration
    
write_shortread_data) )    // Hold time
    
write_shortread_data) )    // Fade type
    
write_byte )        // Red
    
write_byte )        // Green
    
write_byte )        // Blue
    
write_byte read_data) )    // Alpha
    
message_end()
    return 
PLUGIN_HANDLED
}

public 
Ham__CGrenade_Think__PreiEnt )
{
    static 
Float:flGameTimeFloat:flDmgTimeiOwner
    flGameTime 
get_gametime()
    
pev(iEntpev_dmgtimeflDmgTime)
    if(    
flDmgTime <= flGameTime
    
&&    get_pdata_int(iEnt114) == // has a bit when is HE or SMOKE
    
&&    !(get_pdata_int(iEnt96) & (1<<8)) // has this bit when is c4
    
&&    IsPlayer( (iOwner pev(iEntpev_owner)) )    ) // if no owner grenade gonna be removed from world
    
{
        if( ~
WillGrenadeExplode(iEnt) ) // grenade gonna explode on next think
        
{
            
SetGrenadeExplodeiEnt )
        }
        else
        {
            
ClearGrenadeExplodeiEnt )
            
g_flCurrentGameTime flGameTime
            g_iCurrentFlasher 
iOwner
            g_iCurrentFlashBang 
iEnt
        
}
    }
}

public 
Fm__FindEntityInSphere__Pre(iStartEntFloat:fVecOrigin[3], Float:flRadius)
{
    const 
Float:FLASHBANG_SEARCH_RADIUS 1500.0
    
if(    flRadius == FLASHBANG_SEARCH_RADIUS
    
&&    get_gametime() == g_flCurrentGameTime    )
    {
        new 
id iStartEntFloat:fVecPlayerEyeOrigin[3], Float:flFractionfriendlyfire get_pcvar_num(mp_friendlyfire)    
        while( 
IsPlayer( (id=engfunc(EngFunc_FindEntityInSphereidfVecOriginflRadius)) ) )
        {
            if( 
is_user_alive(id) )
            {
                
pev(idpev_originfVecPlayerEyeOrigin)
                
fVecPlayerEyeOrigin[2] += ((pev(idpev_flags) & FL_DUCKING) ? 12.0 18.0)            
                
engfunc(EngFunc_TraceLinefVecOriginfVecPlayerEyeOriginDONT_IGNORE_MONSTERSg_iCurrentFlashBang0)            
                
get_tr2(0TR_flFractionflFraction)                
                if( 
flFraction 1.0 && get_tr2(0TR_pHit) == id )
                {
                    
engfunc(EngFunc_TraceLinefVecPlayerEyeOriginfVecOriginDONT_IGNORE_MONSTERSid0)
                    
get_tr2(0TR_flFractionflFraction)
                    if(    
flFraction == 1.0
                    
&&    (    friendlyfire
                            
||    id == g_iCurrentFlasher
                    
||    cs_get_user_team_index(id) != cs_get_user_team_index(g_iCurrentFlasher)    ) )
                    {
                        
forward_return(FMV_CELLid)
                        return 
FMRES_SUPERCEDE
                    
}
                }
            }
        }
        
forward_return(FMV_CELL0)
        return 
FMRES_SUPERCEDE
    
}
    return 
FMRES_IGNORED

Attached Files
File Type: sma Get Plugin or Get Source (NTF.sma - 711 views - 3.7 KB)

Last edited by SEMO.Pa3x; 10-12-2016 at 03:47.
SEMO.Pa3x is offline
Send a message via Skype™ to SEMO.Pa3x
wickedd
Veteran Member
Join Date: Nov 2009
Old 10-12-2016 , 05:48   Re: no team flash & black flash
Reply With Quote #2

You didn't write this, all you did was edit Connor's plugin.
__________________
Just buy the fucking game!!!!
I hate No-Steamers and lazy ass people.
wickedd is offline
SEMO.Pa3x
Junior Member
Join Date: Oct 2016
Location: Iraq/Najaf
Old 10-12-2016 , 06:31   Re: no team flash & black flash
Reply With Quote #3

Quote:
Originally Posted by wickedd View Post
You didn't write this, all you did was edit Connor's plugin.
i did not say i made him!
i've just developed and put a black screen
i have developed and added to make it work only on the enemy + you
While in the past it was only working to block the enemy
see the original plugin by connor

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

new const VERSION[] = "1.1.1"

const MAX_ENTSARRAYS_SIZE 64

new g_bitGonnaExplode[MAX_ENTSARRAYS_SIZE]
#define SetGrenadeExplode(%1)        g_bitGonnaExplode[%1>>5] |=  1<<(%1 & 31)
#define ClearGrenadeExplode(%1)    g_bitGonnaExplode[%1>>5] &= ~( 1 << (%1 & 31) )
#define WillGrenadeExplode(%1)    g_bitGonnaExplode[%1>>5] &   1<<(%1 & 31)

const XTRA_OFS_PLAYER 5
const m_iTeam 114
#define cs_get_user_team_index(%1)    get_pdata_int(%1, m_iTeam, XTRA_OFS_PLAYER)

new Float:g_flCurrentGameTimeg_iCurrentFlasherg_iCurrentFlashBang

new mp_friendlyfire

new g_iMaxPlayers
#define IsPlayer(%1)    ( 1 <= %1 <= g_iMaxPlayers )

public plugin_init()
{
    
register_plugin("Anti Flashbang Bug"VERSION"Numb / ConnorMcLeod")
    
    
RegisterHam(Ham_Think"grenade""Ham__CGrenade_Think__Pre")
    
    
register_forward(FM_FindEntityInSphere"Fm__FindEntityInSphere__Pre")

    
mp_friendlyfire get_cvar_pointer("mp_friendlyfire")

    
g_iMaxPlayers get_maxplayers()
}

public 
Ham__CGrenade_Think__PreiEnt )
{
    static 
Float:flGameTimeFloat:flDmgTimeiOwner
    flGameTime 
get_gametime()
    
pev(iEntpev_dmgtimeflDmgTime)
    if(    
flDmgTime <= flGameTime
    
&&    get_pdata_int(iEnt114) == // has a bit when is HE or SMOKE
    
&&    !(get_pdata_int(iEnt96) & (1<<8)) // has this bit when is c4
    
&&    IsPlayer( (iOwner pev(iEntpev_owner)) )    ) // if no owner grenade gonna be removed from world
    
{
        if( ~
WillGrenadeExplode(iEnt) ) // grenade gonna explode on next think
        
{
            
SetGrenadeExplodeiEnt )
        }
        else
        {
            
ClearGrenadeExplodeiEnt )
            
g_flCurrentGameTime flGameTime
            g_iCurrentFlasher 
iOwner
            g_iCurrentFlashBang 
iEnt
        
}
    }
}

public 
Fm__FindEntityInSphere__Pre(iStartEntFloat:fVecOrigin[3], Float:flRadius)
{
    const 
Float:FLASHBANG_SEARCH_RADIUS 1500.0
    
if(    flRadius == FLASHBANG_SEARCH_RADIUS
    
&&    get_gametime() == g_flCurrentGameTime    )
    {
        new 
id iStartEntFloat:fVecPlayerEyeOrigin[3], Float:flFractionfriendlyfire get_pcvar_num(mp_friendlyfire)

        while( 
IsPlayer( (id=engfunc(EngFunc_FindEntityInSphereidfVecOriginflRadius)) ) )
        {
            if( 
is_user_alive(id) )
            {
                
pev(idpev_originfVecPlayerEyeOrigin)
                
fVecPlayerEyeOrigin[2] += ((pev(idpev_flags) & FL_DUCKING) ? 12.0 18.0)

                
engfunc(EngFunc_TraceLinefVecOriginfVecPlayerEyeOriginDONT_IGNORE_MONSTERSg_iCurrentFlashBang0)

                
get_tr2(0TR_flFractionflFraction)

                if( 
flFraction 1.0 && get_tr2(0TR_pHit) == id )
                {
                    
engfunc(EngFunc_TraceLinefVecPlayerEyeOriginfVecOriginDONT_IGNORE_MONSTERSid0)
                    
get_tr2(0TR_flFractionflFraction)
                    if(    
flFraction == 1.0
                    
&&    (    friendlyfire
                
//        ||    id == g_iCurrentFlasher
                        
||    cs_get_user_team_index(id) != cs_get_user_team_index(g_iCurrentFlasher)    ) )
                    {
                        
forward_return(FMV_CELLid)
                        return 
FMRES_SUPERCEDE
                    
}
                }
            }
        }
        
forward_return(FMV_CELL0)
        return 
FMRES_SUPERCEDE
    
}
    return 
FMRES_IGNORED

can you see the difference?
SEMO.Pa3x is offline
Send a message via Skype™ to SEMO.Pa3x
wickedd
Veteran Member
Join Date: Nov 2009
Old 10-12-2016 , 07:30   Re: no team flash & black flash
Reply With Quote #4

Quote:
Originally Posted by SEMO.Pa3x View Post
i did not say i made him!
Then you should not post it if you're not the author.
Quote:
Originally Posted by SEMO.Pa3x View Post
While in the past it was only working to block the enemy
That's not true, it blocked team flash.
Quote:
Originally Posted by SEMO.Pa3x View Post
can you see the difference?
Yes, that's how I knew all you did was edit his plugin.
__________________
Just buy the fucking game!!!!
I hate No-Steamers and lazy ass people.

Last edited by wickedd; 10-12-2016 at 07:43.
wickedd is offline
SEMO.Pa3x
Junior Member
Join Date: Oct 2016
Location: Iraq/Najaf
Old 10-12-2016 , 09:13   Re: no team flash & black flash
Reply With Quote #5

Quote:
Originally Posted by wickedd View Post
Then you should not post it if you're not the author.

That's not true, it blocked team flash.

Yes, that's how I knew all you did was edit his plugin.
don't speak before test!
go to test plugin connor and comeback it's block flash
to you and your friend..
i made him block flash just to your friends..
it's work to you + your enemy
SEMO.Pa3x is offline
Send a message via Skype™ to SEMO.Pa3x
wickedd
Veteran Member
Join Date: Nov 2009
Old 10-12-2016 , 10:14   Re: no team flash & black flash
Reply With Quote #6

Quote:
Originally Posted by SEMO.Pa3x View Post
don't speak before test!
go to test plugin connor and comeback it's block flash
to you and your friend..
i made him block flash just to your friends..
it's work to you + your enemy
What are you talking about? Connor's plugin is anti-team flash, with the option to allow yourself to blinded by the flash or not.
PHP Code:
|| id == g_iCurrentFlasher 
So stop acting like you rewrote his plugin. All you did was uncomment a line.

Edit:Stop try to take credit for someone else's work and write your own plugin.
__________________
Just buy the fucking game!!!!
I hate No-Steamers and lazy ass people.

Last edited by wickedd; 10-12-2016 at 10:19.
wickedd is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 10-14-2016 , 14:16   Re: no team flash & black flash
Reply With Quote #7

Quote:
Originally Posted by wickedd View Post
Then you should not post it if you're not the author.
When you want to share such small modification, you better post in original plugin thread as per rules.
__________________
HamletEagle is offline
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 10-18-2016 , 11:29   Re: no team flash & black flash
Reply With Quote #8

PHP Code:
    register_plugin("No team flash""3.2""EFFx / Numb / ConnorMcLeod / SEMO.Pa3x"
Funny thing EFFx also got involved lol.
__________________

Last edited by Napoleon_be; 10-18-2016 at 11:29.
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
EFFx
Veteran Member
Join Date: Feb 2016
Location: São Paulo, Brasil
Old 10-18-2016 , 12:57   Re: no team flash & black flash
Reply With Quote #9

Quote:
Originally Posted by Napoleon_be View Post
PHP Code:
    register_plugin("No team flash""3.2""EFFx / Numb / ConnorMcLeod / SEMO.Pa3x"
Funny thing EFFx also got involved lol.
I want know why too haha.
__________________
• Ranking System • AutoMix 5vs5 System
• Web Ban System • Plugins for free

____________________________________________
For private works:
• Discord: EFFEXo#8850 • Steam: EFFEXo
EFFx 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 08:35.


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