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

[REQ] Just team flash block not more !


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
AMeEeRo
BANNED
Join Date: Dec 2013
Location: Who care ?
Old 02-27-2014 , 07:19   [REQ] Just team flash block not more !
Reply With Quote #1

Hello,
please help me !
I searched in all this forum plugins and tested all anti team flash plugins
Non working fine !
Just this: https://forums.alliedmods.net/showthread.php?p=651444
FRC ..
But it's big plugin -,-
and i don't have exp to remove other adds in it
And i'm using 1.8.3
Please edit it or give me anti team flash just without chat or sound or color just block team flash not more not less, and for 1.8.3
Thanks for all.
AMeEeRo is offline
5aloOod
Senior Member
Join Date: Jun 2013
Location: hell
Old 02-27-2014 , 07:47   Re: [REQ] Just team flash block not more !
Reply With Quote #2

try this
i Just uncomment // || id == g_iCurrentFlasher
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

__________________
اَشْهَدُ اَنْ لَّآ اِلٰهَ اِلَّا اللہُ وَحْدَه لَا شَرِيْكَ لَه وَ اَشْهَدُ اَنَّ مُحَمَّدًا عَبْدُه وَرَسُوْلُه

Last edited by 5aloOod; 02-27-2014 at 07:47.
5aloOod is offline
ArabicMan
Veteran Member
Join Date: Feb 2014
Location: مصر
Old 02-27-2014 , 07:55   Re: [REQ] Just team flash block not more !
Reply With Quote #3

try .. it work for me
https://forums.alliedmods.net/showthread.php?t=16992
ArabicMan is offline
AMeEeRo
BANNED
Join Date: Dec 2013
Location: Who care ?
Old 02-27-2014 , 08:13   Re: [REQ] Just team flash block not more !
Reply With Quote #4

Quote:
Originally Posted by 5aloOod View Post
try this
i Just uncomment // || id == g_iCurrentFlasher
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

Working 3rasy 7ob thanks
AMeEeRo is offline
AMeEeRo
BANNED
Join Date: Dec 2013
Location: Who care ?
Old 02-27-2014 , 08:14   Re: [REQ] Just team flash block not more !
Reply With Quote #5

Quote:
Originally Posted by ArabicMan View Post
hay ma btzb6 3ndy bad one xD
Bs shokran 7ob
AMeEeRo is offline
ArabicMan
Veteran Member
Join Date: Feb 2014
Location: مصر
Old 02-27-2014 , 08:32   Re: [REQ] Just team flash block not more !
Reply With Quote #6

haha mase ya 3'ale
ArabicMan is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 02-27-2014 , 09:20   Re: [REQ] Just team flash block not more !
Reply With Quote #7

English Only
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
ArabicMan
Veteran Member
Join Date: Feb 2014
Location: مصر
Old 02-27-2014 , 17:53   Re: [REQ] Just team flash block not more !
Reply With Quote #8

OK YamiKaitou .but i think it's English
ArabicMan is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 02-27-2014 , 17:56   Re: [REQ] Just team flash block not more !
Reply With Quote #9

Quote:
Originally Posted by ArabicMan View Post
OK YamiKaitou .but i think it's English
The 2 posts above mine are not English
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
AMeEeRo
BANNED
Join Date: Dec 2013
Location: Who care ?
Old 02-27-2014 , 19:04   Re: [REQ] Just team flash block not more !
Reply With Quote #10

I told him thanks just you can see that it's cool from (♥) hahaha ;)
AMeEeRo 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 14:24.


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