Raised This Month: $158 Target: $400
 39% 

Anti No-Flash


Post New Thread Reply   
 
Thread Tools Display Modes
lazarev
Veteran Member
Join Date: Sep 2008
Old 03-08-2010 , 18:26   Re: Anti No-Flash
Reply With Quote #21

plugin doesnt work for me.
[edit]
PHP Code:
public event_flashed(id){
    
    if ( ! 
get_pcvar_num(pcv_on) || (!id) || !is_user_connected(id) )
        return 
PLUGIN_CONTINUE;

    
//Up to when this player should be flashed
    
g_flashed_until[id] = read_data(2)/4096.0 get_gametime();

    if(
get_pcvar_num(pcv_demo)){    
        
client_print(idprint_chat"Gametime: %0.2f - Flashed until: %0.2f",get_gametime(),g_flashed_until[id]);
        
remove_flash(id)
    }
    
    return 
PLUGIN_CONTINUE


Do not make a doublechecking for pcvar -.-
PHP Code:
new g_isBot[33];
new 
g_isAlive[33]; 
Why do you use this? just check if is_user_alive or !is_user_bot

Last edited by lazarev; 03-08-2010 at 18:35.
lazarev is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 03-08-2010 , 18:46   Re: Anti No-Flash
Reply With Quote #22

Quote:
Originally Posted by lazarev View Post
PHP Code:
new g_isBot[33];
new 
g_isAlive[33]; 
Why do you use this? just check if is_user_alive or !is_user_bot
Because checking those natives in FM_AddToFullPack is a waste of CPU when those values can be stored in memory.

http://forums.alliedmods.net/showpos...1&postcount=10
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
hold1981
Junior Member
Join Date: Sep 2009
Old 03-08-2010 , 18:48   Re: Anti No-Flash
Reply With Quote #23

Hello people!
I see that the leading talk about no anti-flash plugin, one question? Dal can this plugin, to do an option that the player is constantly white, while the spectators in the admin and admin DEMAG his report on the opponent players Flesh?
hold1981 is offline
Rul4
Senior Member
Join Date: Sep 2008
Location: Argentina
Old 03-08-2010 , 20:28   Re: Anti No-Flash
Reply With Quote #24

Quote:
Originally Posted by lazarev View Post
plugin doesnt work for me.
Could you please be more specific?

Quote:
Originally Posted by lazarev View Post
PHP Code:
public event_flashed(id){
    
    if ( ! 
get_pcvar_num(pcv_on) || (!id) || !is_user_connected(id) )
        return 
PLUGIN_CONTINUE;

    
//Up to when this player should be flashed
    
g_flashed_until[id] = read_data(2)/4096.0 get_gametime();

    if(
get_pcvar_num(pcv_demo)){    
        
client_print(idprint_chat"Gametime: %0.2f - Flashed until: %0.2f",get_gametime(),g_flashed_until[id]);
        
remove_flash(id)
    }
    
    return 
PLUGIN_CONTINUE


Do not make a doublechecking for pcvar -.-
I don't understand your comment. "pcv_on" and "pcv_demo" are two different vars.
__________________
Check out my other plugins.
Rul4 is offline
Rul4
Senior Member
Join Date: Sep 2008
Location: Argentina
Old 03-08-2010 , 20:31   Re: Anti No-Flash
Reply With Quote #25

Quote:
Originally Posted by Seta00 View Post
Tested with ECC 5.2 and it works. Nice job.
The blind time could be bigger, though, cause the player goes visible as soon as the flash starts to fade out, and normal players can't see in this moment.
I can give you a var to set a delay and you can play with it at your own risk. IMHO it looks weird when they just appear out of thin air when the screen starts to fade.
__________________
Check out my other plugins.
Rul4 is offline
Rul4
Senior Member
Join Date: Sep 2008
Location: Argentina
Old 03-08-2010 , 20:34   Re: Anti No-Flash
Reply With Quote #26

Quote:
Originally Posted by Nextra View Post
Good idea and a nice plugin, well done!

For the caching stuff, here are some things you could improve even further:

- Checking the cvar in every AddToFullPack will add up to thousands of calls every second. I'd suggest to unregister the forward completely if the plugin is disabled and do the required cvar check at the beginning of a round. To overcome the minor inconvenience of not being able to change the plugin state mid-round (which should not be any hassle, who would want to disable a anti-cheat plugin anyway) you could introduce an admin command that hooks the forward again.
- Check the player var before the other two. It should be better to access the non-array stuff first.
- ent != host and g_isAlive[ent] could be placed, like the other 3 checks, before get_gametime. ent != host should go in front of the array stuff aswell.
Nice. I will change the first one. I can change the other ones only to indulge you, adding an offset to a memory address or not should not be noticeable... but changing the order cannot hurt either... so...
__________________
Check out my other plugins.
Rul4 is offline
Rul4
Senior Member
Join Date: Sep 2008
Location: Argentina
Old 03-08-2010 , 21:04   Re: Anti No-Flash
Reply With Quote #27

New version. Added new delay var plus optimized the call to the ON/OFF var (the plugin checks if it is on/off whenever a player is flashed instead of every AddToFullPack call).

BTW, do you think this plugin is ready for approval now? Has anyone found any issue with it?
__________________
Check out my other plugins.
Rul4 is offline
ditmesteam
Senior Member
Join Date: Oct 2009
Old 03-08-2010 , 22:20   Re: Anti No-Flash
Reply With Quote #28

You forgot make log: Changelog:
1.0 - first release
1.1 - .....
1.2 - .....

I have never seen this plugin until now
ditmesteam is offline
Rul4
Senior Member
Join Date: Sep 2008
Location: Argentina
Old 03-08-2010 , 22:35   Re: Anti No-Flash
Reply With Quote #29

Quote:
Originally Posted by ditmesteam View Post
You forgot make log: Changelog:
1.0 - first release
1.1 - .....
1.2 - .....

I have never seen this plugin until now
Well, since it is not approved yet and the changes are minor I am just putting version numbers so people testing it know if they have the latest or not. Current version is 1.0.3. It is not "released" yet...

In case you are too curious:
1.0.0 - First version
1.0.1 - Created the anti_noflash_demo var
1.0.2 - Optimizations: cached values to avoid calling native functions in AddToFullPack.
1.0.3 - New var: anti_noflash_delay. More optimizations: avoid calling on/off var in AddToFullPack.



I don't think this information is really useful for anyone at this point. I will put real changes in a change log after it is approved.
__________________
Check out my other plugins.
Rul4 is offline
Rul4
Senior Member
Join Date: Sep 2008
Location: Argentina
Old 03-08-2010 , 22:36   Re: Anti No-Flash
Reply With Quote #30

Quote:
Originally Posted by hold1981 View Post
Hello people!
I see that the leading talk about no anti-flash plugin, one question? Dal can this plugin, to do an option that the player is constantly white, while the spectators in the admin and admin DEMAG his report on the opponent players Flesh?
Dude, I didn't understand a word of what you are saying.
__________________
Check out my other plugins.
Rul4 is offline
Reply


Thread Tools
Display Modes

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 05:37.


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