Raised This Month: $32 Target: $400
 8% 

Close your eyes


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   Admin Commands       
joropito
AlliedModders Donor
Join Date: Mar 2009
Location: pfnAddToFullPack
Old 11-27-2009 , 11:53   Close your eyes
Reply With Quote #1

.:=Close Your Eyes...before get flashed!!!=:.

I didn't find any plugin with this simple feature.
I found some suggestions but never a plugin submission so, here's the plugin.

Description:
With this little plugin you can blink your eyes to avoid get flashed.
Install:
- Compile the sma file
- Copy the amxx file to plugins folder
- Add amxx file to plugins.ini file
Usage:
- bind any letter or button to +blink
- hold that bind to close your eyes before get flashed!

Thanks to Asd' (testing and time)
Attached Files
File Type: sma Get Plugin or Get Source (closeyoureyes.sma - 661 views - 1.8 KB)
__________________

Divide et vinces
approved plugins | steam account

I don't accept PM for support. Just ask on forums.
If you're looking for private work, PM me.

Last edited by joropito; 11-27-2009 at 11:56.
joropito is offline
Send a message via MSN to joropito
#8 SickneSS
BANNED
Join Date: Sep 2008
Location: Here
Old 11-27-2009 , 11:57   Re: Close your eyes
Reply With Quote #2

OMG O_O

I F#çking like it !!!
#8 SickneSS is offline
Send a message via MSN to #8 SickneSS Send a message via Skype™ to #8 SickneSS
BeasT
Senior Member
Join Date: Apr 2007
Location: Lithuania
Old 11-27-2009 , 11:58   Re: Close your eyes
Reply With Quote #3

Something simillar http://forums.alliedmods.net/showthread.php?t=834
But your is more simple. Gj.
BeasT is offline
Send a message via Skype™ to BeasT
joropito
AlliedModders Donor
Join Date: Mar 2009
Location: pfnAddToFullPack
Old 11-27-2009 , 12:04   Re: Close your eyes
Reply With Quote #4

Quote:
Originally Posted by BeasT View Post
Something simillar http://forums.alliedmods.net/showthread.php?t=834
But your is more simple. Gj.
Yes, but it's different.

With sunglasses you're always avoiding to get flashed.

With mine, you need to close for yourself the eyes and keep it closed until flahsbang grenade explodes.
It's more realistic.

Thanks!
__________________

Divide et vinces
approved plugins | steam account

I don't accept PM for support. Just ask on forums.
If you're looking for private work, PM me.
joropito is offline
Send a message via MSN to joropito
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 11-27-2009 , 12:45   Re: Close your eyes
Reply With Quote #5

Nothing to say. Well, just some very minors things :

- MSG_ONE -> MSG_ONE_UNRELIABLE
- You could use one cell instead of array, saving some memory using such thing
Code:
#define SetPlayerBit(%1,%2)    ( %1 |=    1 << ( %2 & 31 ) ) #define ClearPlayerBit(%1,%2)  ( %1 &= ~( 1 << ( %2 & 31 ) ) ) #define GetPlayerBit(%1,%2)    ( %1 &     1 << ( %2 & 31 ) )
- float() is not needed because you divide by a float, so the output will be a float.
- So you allow to block for all screenfade effect. A plugin could emit such event for another purpose. Maybe you should filter since the purpose of the plugin is "to avoid get flashed."
- I don't like much you write '9000' :p ; 1 second being 1 << 12 or 4096, I would like to see when I read your code you don't give random number. I mean It can be useful for people to understand.
- "jrpt" ; I would suggest to use a more speaking cvar like : closeyoureyes_version or close_your_eyes ; I don't know. Because I guess that jrpt stands for joropito ; If you do severals plugin with the same cvar, the meaning to track a specific plugin is null.
__________________

Last edited by Arkshine; 11-27-2009 at 12:55.
Arkshine is offline
joropito
AlliedModders Donor
Join Date: Mar 2009
Location: pfnAddToFullPack
Old 11-27-2009 , 14:15   Re: Close your eyes
Reply With Quote #6

Quote:
Originally Posted by Arkshine View Post
- MSG_ONE -> MSG_ONE_UNRELIABLE
I will change that.

Quote:
Originally Posted by Arkshine View Post
- You could use one cell instead of array, saving some memory using such thing
Code:
#define SetPlayerBit(%1,%2)    ( %1 |=    1 << ( %2 & 31 ) ) #define ClearPlayerBit(%1,%2)  ( %1 &= ~( 1 << ( %2 & 31 ) ) ) #define GetPlayerBit(%1,%2)    ( %1 &     1 << ( %2 & 31 ) )
I've never used that way. I will take a look.

Quote:
Originally Posted by Arkshine View Post
- float() is not needed because you divide by a float, so the output will be a float.
Didn't know that. I will fix.

Quote:
Originally Posted by Arkshine View Post
- So you allow to block for all screenfade effect. A plugin could emit such event for another purpose. Maybe you should filter since the purpose of the plugin is "to avoid get flashed."
You're right but think that player close eyes manually. I will add some checks for flash detection.

Quote:
Originally Posted by Arkshine View Post
- I don't like much you write '9000' :p ; 1 second being 1 << 12 or 4096, I would like to see when I read your code you don't give random number. I mean It can be useful for people to understand.
It's the fadeout time (about 2 seconds). I can put a define to keep you happy

Quote:
Originally Posted by Arkshine View Post
- "jrpt" ; I would suggest to use a more speaking cvar like : closeyoureyes_version or close_your_eyes ; I don't know. Because I guess that jrpt stands for joropito ; If you do severals plugin with the same cvar, the meaning to track a specific plugin is null.
__________________

Divide et vinces
approved plugins | steam account

I don't accept PM for support. Just ask on forums.
If you're looking for private work, PM me.
joropito is offline
Send a message via MSN to joropito
Emilioneri
Senior Member
Join Date: Feb 2009
Location: Georgia, Tbilisi
Old 11-27-2009 , 14:31   Re: Close your eyes
Reply With Quote #7

http://forums.alliedmods.net/showthread.php?t=21778
__________________
Emilioneri is offline
Send a message via Skype™ to Emilioneri
Alucard^
AMXX Moderator: Others
Join Date: Sep 2007
Location: Street
Old 11-27-2009 , 14:31   Re: Close your eyes
Reply With Quote #8

Good Job joropito!

Now i have to go, so i am not sure but... isn't the same as: http://forums.alliedmods.net/showthread.php?p=188147 ?

But maybe yours is better, well.. cya
__________________
Approved Plugins - Steam Profile

Public non-terminated projects:
All Admins Menu, HLTV parameters, Subnick,
Second Password (cool style), InfoZone,
Binary C4 plant/defuse, and more...

Private projects:
NoSpec (+menu), NV Surf Management,
PM Adanved System, KZ longjump2, and more...
Alucard^ is offline
Send a message via Skype™ to Alucard^
joropito
AlliedModders Donor
Join Date: Mar 2009
Location: pfnAddToFullPack
Old 11-27-2009 , 14:35   Re: Close your eyes
Reply With Quote #9

Ops

I only search for "eyes"...
__________________

Divide et vinces
approved plugins | steam account

I don't accept PM for support. Just ask on forums.
If you're looking for private work, PM me.
joropito is offline
Send a message via MSN to joropito
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 11-27-2009 , 14:38   Re: Close your eyes
Reply With Quote #10

VEN's version is more complete ; try to add more feature that this one.
__________________
Arkshine 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 16:54.


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