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

Anti Flashbang Bug


Post New Thread Closed Thread   
 
Thread Tools Display Modes
BOYSplayCS
BANNED
Join Date: Apr 2008
Location: Gainesville, FL
Old 05-01-2008 , 06:37   Re: Anti Flashbang Bug
#11

Nice plugin, good job.
BOYSplayCS is offline
spiderbites
Senior Member
Join Date: Nov 2007
Old 05-01-2008 , 06:57   Re: Anti Flashbang Bug
#12

Quote:
Originally Posted by MPNumB View Post
Just enable friendlyfire.
if other than that, what lines i can comment out in script to disable that feature? sorry if im asking too much
__________________
Leave your name when you give +/- karma for me.
spiderbites is offline
MPNumB
Veteran Member
Join Date: Feb 2007
Location: Lithuania
Old 05-01-2008 , 07:22   Re: Anti Flashbang Bug
#13

Lines:
11
30-31
37
47 (here comment "ff" and "owner_team" variables)
49-53
81-82
85
__________________
Skill and no annoying bugs with fixed balance issues is my goal!
My approved plugins what don't show up in Approved List:
* Bomb/Death/CSS Radar
* HotVision
___
Need help? Please check this documentation first.
MPNumB is offline
Send a message via Skype™ to MPNumB
Vm|Mayhem
Senior Member
Join Date: Feb 2005
Location: Murrieta, CA.
Old 05-02-2008 , 01:15   Re: Anti Flashbang Bug
#14

Quote:
Originally Posted by MPNumB View Post
Lines:
11
30-31
37
47 (here comment "ff" and "owner_team" variables)
49-53
81-82
85
I still have 1 warning after editing the listed lines. Will it cause problems?

Code:
//// antiflashbug.sma
// C:\Documents and Settings\john\My Documents\John's Stuff\Vm CLAN STUFF\addons
\amxmodx\scripting\antiflashbug.sma(94) : warning 204: symbol is assigned a valu
e that is never used: "mp_friendlyfire"
// Header size:            660 bytes
// Code size:             2128 bytes
// Data size:              688 bytes
// Stack/heap size:      16384 bytes; estimated max. usage=42 cells (168 bytes)
// Total requirements:   19860 bytes
//
// 1 Warning.
Vm|Mayhem is offline
Send a message via AIM to Vm|Mayhem
spiderbites
Senior Member
Join Date: Nov 2007
Old 05-02-2008 , 01:28   Re: Anti Flashbang Bug
#15

use this one:

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

#define PLUGIN_NAME "Anti Flashbang Bug"
#define PLUGIN_VERSION "1.0"
#define PLUGIN_AUTHOR "Numb"

new Float:old_gametime;

public 
plugin_init()
{
    
register_plugin(PLUGIN_NAMEPLUGIN_VERSIONPLUGIN_AUTHOR);

    
RegisterHam(Ham_Think"grenade""Ham_FEThink_grenade"0);

    
register_forward(FM_FindEntityInSphere"fm_FEFindEntityInSphere"0);

}

public 
Ham_FEThink_grenade(ent)
{
    static 
model[32];
    
pev(entpev_modelmodel31);
    if( 
equal(model"models/w_flashbang.mdl") )
    {

        
old_gametime get_gametime();
    }
    else
    {
        
old_gametime 0.0;
    }
}

public 
fm_FEFindEntityInSphere(startFloat:origin[3], Float:radius)
{
    if( 
radius!=1500.0 || old_gametime!=get_gametime() )
        return 
FMRES_IGNORED;

    static 
hittraceFloat:user_origin[3], Float:absmax[3], Float:fraction;
    
hit start;

    
// run the same check to see what its result will be
    
while( (hit=engfunc(EngFunc_FindEntityInSpherehitoriginradius))>)
    {
        
// hit a non- or dead-player
        
if( !is_user_alive(hit) )
        {
            
forward_return(FMV_CELLhit);
            return 
FMRES_SUPERCEDE;
        }

        
// aim for the body eyes
        
pev(hitpev_originuser_origin);
        
pev(hitpev_absmaxabsmax);
        
user_origin[2] = (absmax[2]-20.0);
        
engfunc(EngFunc_TraceLineoriginuser_originDONT_IGNORE_MONSTERS0trace);

        
// hit player eyes, grenade ok
        
if( get_tr2(traceTR_pHit)==hit )
        {
            
// start backup check (de_dust2 B bug - outmap bug)
            
engfunc(EngFunc_TraceLineuser_originoriginDONT_IGNORE_MONSTERShittrace);

            
// hit player eyes with backup check
            
get_tr2(traceTR_flFractionfraction);
            if( 
fraction==1.0 )
            {
                    
forward_return(FMV_CELLhit);
                    return 
FMRES_SUPERCEDE;
            }
        }
    }

    
// grenade could not hit anyones eyes, cancel the check
    
forward_return(FMV_CELL, -1);
    return 
FMRES_SUPERCEDE;

__________________
Leave your name when you give +/- karma for me.
spiderbites is offline
Vm|Mayhem
Senior Member
Join Date: Feb 2005
Location: Murrieta, CA.
Old 05-02-2008 , 03:44   Re: Anti Flashbang Bug
#16

Thanks.
Vm|Mayhem is offline
Send a message via AIM to Vm|Mayhem
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 05-05-2008 , 18:40   Re: Anti Flashbang Bug
#17

I know that it's a bad idea to regroups those bug fix plugin, but you may want to regroup this one with the HE one, as they both use the same forward...
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
MPNumB
Veteran Member
Join Date: Feb 2007
Location: Lithuania
Old 05-05-2008 , 19:12   Re: Anti Flashbang Bug
#18

Forwards are the same, scaning looks the same, but is absolutely diffrent. =P
__________________
Skill and no annoying bugs with fixed balance issues is my goal!
My approved plugins what don't show up in Approved List:
* Bomb/Death/CSS Radar
* HotVision
___
Need help? Please check this documentation first.
MPNumB is offline
Send a message via Skype™ to MPNumB
HamoOodi
Senior Member
Join Date: Dec 2005
Old 06-30-2008 , 08:32   Re: Anti Flashbang Bug
#19

There is an error .. I can't download the amxx file.. Thx
HamoOodi is offline
Mordekay
Squirrel of Fortune
Join Date: Apr 2006
Location: Germany
Old 06-30-2008 , 10:30   Re: Anti Flashbang Bug
#20

Quote:
Requires:
FakeMeta
HamSandWich
As hamsandwich comes with 1.8.0 you cannot use the online compiler as it is 1.76
Download the source and compile it localy.
__________________

Mordekay is offline
Old 06-30-2008, 13:18
HamoOodi
This message has been deleted by HamoOodi. Reason: read wrong soz
Closed Thread



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 00:28.


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