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

Anti No-Flash


Post New Thread Reply   
 
Thread Tools Display Modes
wrecked_
Veteran Member
Join Date: Jan 2010
Location: New York (GMT-5)
Old 03-08-2010 , 21:55   Re: Anti No-Flash
Reply With Quote #31

Quote:
Originally Posted by Rul4 View Post
Dude, I didn't understand a word of what you are saying.
I think he's trying to say something about spectators being flashed as well when they spectate a player who gets flashed, not too sure though.
__________________
[ Paid Requests ]
DO NOT PM ME ABOUT BLOCKMAKER
NO PRIVATE SUPPORT
wrecked_ is offline
ditmesteam
Senior Member
Join Date: Oct 2009
Old 03-10-2010 , 20:44   Re: Anti No-Flash
Reply With Quote #32

Sorry but my server has broken two time in one day, I tried to stop your plugin and my server work fine again.
ditmesteam is offline
Rul4
Senior Member
Join Date: Sep 2008
Location: Argentina
Old 03-10-2010 , 21:37   Re: Anti No-Flash
Reply With Quote #33

Quote:
Originally Posted by ditmesteam View Post
Sorry but my server has broken two time in one day, I tried to stop your plugin and my server work fine again.
Please add "debug" after the plugin name in your plugins.ini and tell me what you get when it crashes. Logs are stored in your amxmodx/logs directory. The plugin name should look like this:

PHP Code:
antinoflash.amxx debug 
__________________
Check out my other plugins.
Rul4 is offline
Rul4
Senior Member
Join Date: Sep 2008
Location: Argentina
Old 03-10-2010 , 22:46   Re: Anti No-Flash
Reply With Quote #34

Version update (1.0.4): also strip grenade information (except your own nades).

A note on why I decided to keep seeing your own grenades, and also not stripping other entities information (like breakable boxes). The idea is that when they are flashed, cheaters don't realize they are, so they get really frustrated when they are killed by players they can't see. Making things disappear right before their eyes (like a box) would warn them so they can take cover or try to escape (they keep seeing the map, since that info is client side, so they do have the advantage of being able to move correctly).
__________________
Check out my other plugins.
Rul4 is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 03-11-2010 , 01:36   Re: Anti No-Flash
Reply With Quote #35

You could split player and non player part for optimize :

PHP Code:
public fw_addtofullpack(eseenthostflagsplayerset){
    
    if( !
g_plugin_on || !g_isAlive[host] || g_isBot[host] )
        return 
FMRES_IGNORED;

    if( !
player )
    {
        if( 
pev_valid(ent) )
        {
            static 
Classname[9]; // grenade needs 8 so use 9 to be sure
            
static const grenade[] = "grenade";
            
pev(entpev_classnameClassnamecharsmax(Classname));
            if( 
equal(Classnamegrenade) && pev(entpev_owner)==host )
            {
                return 
FMRES_IGNORED;
            }
        }
    }
    else if(!
g_isAlive[ent] || ent == host)
    {
        return 
FMRES_IGNORED;
    }
    
    
//If the player is flashed, strip other player's information
    
if( get_gametime() < g_flashed_until[host] )
    {

        
//client_print(host, print_chat, "Gametime: %0.2f - Flashed until: %0.2f",get_gametime(),g_flashed_until[host]);
        
forward_return(FMV_CELL0);
        return 
FMRES_SUPERCEDE;
    }
    
    return 
FMRES_IGNORED;


__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Rul4
Senior Member
Join Date: Sep 2008
Location: Argentina
Old 03-11-2010 , 11:15   Re: Anti No-Flash
Reply With Quote #36

Quote:
Originally Posted by ConnorMcLeod View Post
You could split player and non player part for optimize
Good idea. It doesn't change the functionality but improves the code readability. I will do it and post a new version shortly.
__________________
Check out my other plugins.
Rul4 is offline
Rul4
Senior Member
Join Date: Sep 2008
Location: Argentina
Old 03-11-2010 , 13:26   Re: Anti No-Flash
Reply With Quote #37

BTW I uploaded a new version some hours ago (v1.0.5). It only improves the code in the AddToFullPack, not the functionality.

Is there anyone having trouble with this plugin that can provide me with an error log?

Another one: is there anyone not having trouble with this plugin who has been running it for a while and can say "it works"?
__________________
Check out my other plugins.
Rul4 is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 03-11-2010 , 16:01   Re: Anti No-Flash
Reply With Quote #38

I'm having a problem with your plugin.
It isn't compatible with plugins that remove flashbang.

For example, in HideNSeek, the terrorist team is not flashed whenever a flashbang explodes.
This is by hooking the "ScreenFade" message and returning PLUGIN_HANDLED.

However, the event is still sent and the terrorists that aren't flashed can no longer see the counter-terrorists.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 03-11-2010 , 16:09   Re: Anti No-Flash
Reply With Quote #39

Quote:
Originally Posted by Exolent[jNr] View Post
I'm having a problem with your plugin.
It isn't compatible with plugins that remove flashbang.

For example, in HideNSeek, the terrorist team is not flashed whenever a flashbang explodes.
This is by hooking the "ScreenFade" message and returning PLUGIN_HANDLED.

However, the event is still sent and the terrorists that aren't flashed can no longer see the counter-terrorists.
Use a plugin that hook FM_FindEntInSphere to prevent terrorists from being flashed, that is the proper method to do it (even if amxx fails because it sends an event when you blocked the message...)
If a flash effect is properly blocked, this plugin shouldn't catch the FadeScreen event, else it means the previous plugin brillantly failed.
__________________
- tired and retired -

- my plugins -

Last edited by ConnorMcLeod; 03-11-2010 at 16:11.
ConnorMcLeod is offline
Rul4
Senior Member
Join Date: Sep 2008
Location: Argentina
Old 03-11-2010 , 17:55   Re: Anti No-Flash
Reply With Quote #40

Quote:
Originally Posted by Exolent[jNr] View Post
I'm having a problem with your plugin.
It isn't compatible with plugins that remove flashbang.

For example, in HideNSeek, the terrorist team is not flashed whenever a flashbang explodes.
This is by hooking the "ScreenFade" message and returning PLUGIN_HANDLED.

However, the event is still sent and the terrorists that aren't flashed can no longer see the counter-terrorists.
If my plugin's hook gets the message before the other one it seems it is a race condition problem. All I can think of is:

a) Trying an alternative method of getting if the player is flashed (like the player offsets Connor proposed in this same thread). But my intuition is that if you only block the message, and that information is set before the message is sent, the result will be the same. There is no way for this plugin to know that you wanted to block the message unless the other plugin's hook eliminates it first. I didn't want to use the offsets because any other plugin sending the ScreenFade message with an alpha of 255 should get the same result as being flashed.
b) Changing the Hide'n'Seek plugin to catch this event before.

I would have a look myself at Connor's proposal (FM_FindEntInSphere) but it would not be useful in this case, because I would be getting the player as "flashed" before the other plugin has a chance to cancel this behavior.

I can think of an ugly workaround, but it would only be useful in this case where the "no flashable" team is fixed. Vars that will set if Ts or CTs should be "blinded" or not. If we don't find another way, I can code them.

Any other ideas?
__________________
Check out my other plugins.
Rul4 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 23:35.


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