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

One-Shot Multikill Detection


Post New Thread Reply   
 
Thread Tools Display Modes
EFFx
Veteran Member
Join Date: Feb 2016
Location: São Paulo, Brasil
Old 01-08-2017 , 18:25   Re: One-Shot Multikill Detection
Reply With Quote #31

I have added some things but I don't updated because I have not made all the changes, and for not updating much times, I just will update when I finish all the changes.

And you don't explained how I can return the CHAT when the cvar is more than 2...
__________________
• Ranking System • AutoMix 5vs5 System
• Web Ban System • Plugins for free

____________________________________________
For private works:
• Discord: EFFEXo#8850 • Steam: EFFEXo

Last edited by EFFx; 01-08-2017 at 18:27.
EFFx is offline
PRoSToTeM@
Veteran Member
Join Date: Jan 2010
Location: Russia, Ivanovo
Old 01-08-2017 , 20:02   Re: One-Shot Multikill Detection
Reply With Quote #32

Quote:
Originally Posted by PRoSToTeM@ View Post
PlayerTakenDamage
Oh, i've failed, this should be PlayerTookDamage.
This is from microsoft guidelines for event naming in C#. https://msdn.microsoft.com/en-us/lib....aspx#Anchor_2
Quote:
✓ DO give events names with a concept of before and after, using the present and past tenses.
For example, a close event that is raised before a window is closed would be called Closing, and one that is raised after the window is closed would be called Closed.
X DO NOT use "Before" or "After" prefixes or postfixes to indicate pre- and post-events. Use present and past tenses as just described.
So, for pre this should be PlayerTakingDamage and for post PlayerTookDamage.
__________________
PRoSToTeM@ is offline
Send a message via ICQ to PRoSToTeM@ Send a message via Skype™ to PRoSToTeM@
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 01-08-2017 , 20:57   Re: One-Shot Multikill Detection
Reply With Quote #33

Quote:
Originally Posted by PRoSToTeM@ View Post
Oh, i've failed, this should be PlayerTookDamage.
This is from microsoft guidelines for event naming in C#. https://msdn.microsoft.com/en-us/lib....aspx#Anchor_2

So, for pre this should be PlayerTakingDamage and for post PlayerTookDamage.
Good thing we're not coding in C#

I think it's more obvious and clear with the '_Post' suffix, but that's just me.
__________________
Bugsy is offline
EFFx
Veteran Member
Join Date: Feb 2016
Location: São Paulo, Brasil
Old 01-08-2017 , 20:58   Re: One-Shot Multikill Detection
Reply With Quote #34

@Bugsy

Did you readed my post? https://forums.alliedmods.net/showpo...7&postcount=31
__________________
• Ranking System • AutoMix 5vs5 System
• Web Ban System • Plugins for free

____________________________________________
For private works:
• Discord: EFFEXo#8850 • Steam: EFFEXo
EFFx is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 01-08-2017 , 21:00   Re: One-Shot Multikill Detection
Reply With Quote #35

EFFx, what I meant with the cvar thing.

Suppose the cvar is set to 8.

You have switch for 0, 1, 2. Nothing would happen since nothing is defined for 8.

You need something to be there for outlier/undefined values.

So what I suggested is:
PHP Code:
case HUD: [for cvar value 1]
case 
LOG: [for cvar value 2]
default: [for 
cvar value 0 (CHAT) and anything else (-5, -135100etc
I suggested to use whatever you want the default output type to be, I assumed CHAT for my above example.
__________________

Last edited by Bugsy; 01-08-2017 at 21:02.
Bugsy is offline
EFFx
Veteran Member
Join Date: Feb 2016
Location: São Paulo, Brasil
Old 01-08-2017 , 21:45   Re: One-Shot Multikill Detection
Reply With Quote #36

Yes, I know about default, but should I repeat the same case like case CHAT?? Is any optimization?
__________________
• Ranking System • AutoMix 5vs5 System
• Web Ban System • Plugins for free

____________________________________________
For private works:
• Discord: EFFEXo#8850 • Steam: EFFEXo

Last edited by EFFx; 01-08-2017 at 21:45.
EFFx is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 01-08-2017 , 21:53   Re: One-Shot Multikill Detection
Reply With Quote #37

Quote:
Originally Posted by EFFx View Post
Yes, I know about default, but should I repeat the same case like case CHAT?? Is any optimization?
Just do not define CHAT, it will fall into default along with any other undefined value.
__________________
Bugsy is offline
EFFx
Veteran Member
Join Date: Feb 2016
Location: São Paulo, Brasil
Old 01-09-2017 , 18:21   Re: One-Shot Multikill Detection
Reply With Quote #38

All things are now added, see the spoiler at description for see the new observation.

Waiting new answers...
__________________
• Ranking System • AutoMix 5vs5 System
• Web Ban System • Plugins for free

____________________________________________
For private works:
• Discord: EFFEXo#8850 • Steam: EFFEXo

Last edited by EFFx; 01-09-2017 at 18:21.
EFFx is offline
kristi
Senior Member
Join Date: Nov 2016
Old 01-09-2017 , 21:22   Re: One-Shot Multikill Detection
Reply With Quote #39

Quote:
Originally Posted by EFFx View Post
if you add !g, the word 'grenade' will show renade because the replace_all() is removing the !g..
!ggrenade ?

Last edited by kristi; 01-09-2017 at 21:22.
kristi is offline
Send a message via Skype™ to kristi
EFFx
Veteran Member
Join Date: Feb 2016
Location: São Paulo, Brasil
Old 01-09-2017 , 21:28   Re: One-Shot Multikill Detection
Reply With Quote #40

Exactly. If you add !ggrenade or !g grenade the message will show renade. Because the !g have G, and this letter will be replaced with nothing with replace_all()
__________________
• Ranking System • AutoMix 5vs5 System
• Web Ban System • Plugins for free

____________________________________________
For private works:
• Discord: EFFEXo#8850 • Steam: EFFEXo

Last edited by EFFx; 01-09-2017 at 21:32.
EFFx 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:33.


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