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

Solved How to get the lowest health of the player?


Post New Thread Closed Thread   
 
Thread Tools Display Modes
Neuro Toxin
Veteran Member
Join Date: Oct 2013
Location: { closing the void; }
Old 09-18-2018 , 17:29   Re: How to get the lowest health of the player?
#11

Everytime I see IsValidClient I instantly think bad code.
__________________
Neuro Toxin is offline
ThatKidWhoGames
Veteran Member
Join Date: Jun 2013
Location: IsValidClient()
Old 09-18-2018 , 17:46   Re: How to get the lowest health of the player?
#12

Quote:
Originally Posted by Neuro Toxin View Post
Everytime I see IsValidClient I instantly think bad code.
In a loop (or a situation where you only need to use IsClientInGame), I agree.
ThatKidWhoGames is offline
Vaggelis
Senior Member
Join Date: May 2017
Old 09-18-2018 , 19:05   Re: How to get the lowest health of the player?
#13

Quote:
Originally Posted by Neuro Toxin View Post
Everytime I see IsValidClient I instantly think bad code.
You deserve a cookie
Vaggelis is offline
Ilusion9
Veteran Member
Join Date: Jun 2018
Location: Romania
Old 09-19-2018 , 05:56   Re: How to get the lowest health of the player?
#14

Quote:
Originally Posted by Vaggelis View Post
Whats the point posting that code? Edison1318 got what he wanted
your question is so dumb
i offered him another solution for the problem, support for health > 100.
Ilusion9 is offline
Vaggelis
Senior Member
Join Date: May 2017
Old 09-19-2018 , 06:23   Re: How to get the lowest health of the player?
#15

Quote:
Originally Posted by Ilusion9 View Post
your question is so dumb
i offered him another solution for the problem, support for health > 100.
Dumb? If you posted that code only to support health > 100 propably you are not able to think that you can set min to a higher value like 99999, also you have a variable named size for no reason.

Last edited by Vaggelis; 09-19-2018 at 06:34.
Vaggelis is offline
Psyk0tik
Veteran Member
Join Date: May 2012
Location: Homeless
Old 09-19-2018 , 07:06   Re: How to get the lowest health of the player?
#16

Quote:
Originally Posted by Vaggelis View Post
Dumb? If you posted that code only to support health > 100 propably you are not able to think that you can set min to a higher value like 99999, also you have a variable named size for no reason.
It sounds like a dumb question because there's nothing wrong with posting an alternative to a solution. It also acts as a visual representation of what he was saying to Shane about not needing IsClientConnected when IsClientInGame is already being used. Plus his code looks more optimized than the one Shane provided. I'm not hating on Shane, its just an observation.
__________________
Psyk0tik is offline
Vaggelis
Senior Member
Join Date: May 2017
Old 09-19-2018 , 07:20   Re: How to get the lowest health of the player?
#17

Quote:
Originally Posted by Crasher_3637 View Post
It sounds like a dumb question because there's nothing wrong with posting an alternative to a solution. It also acts as a visual representation of what he was saying to Shane about not needing IsClientConnected when IsClientInGame is already being used. Plus his code looks more optimized than the one Shane provided. I'm not hating on Shane, its just an observation.
Shane could see my code, also how can you say its an alternative code? the only thing he did, was to
add extra statements to support "health > 100" while you can do that thing with my code
Vaggelis is offline
Ilusion9
Veteran Member
Join Date: Jun 2018
Location: Romania
Old 09-19-2018 , 08:09   Re: How to get the lowest health of the player?
#18

Quote:
Originally Posted by Vaggelis View Post
Shane could see my code, also how can you say its an alternative code? the only thing he did, was to
add extra statements to support "health > 100" while you can do that thing with my code
you should start to learn some algorithms and see why is better to initialise the minimum with the first element.
that size = 0 was for multiple clients with the same minimum health, but i was too lazy to do that.

this is the scripting forum, anyone can post ideas or code. if you ask something here, you should be able to understand, to optimize and to correct someone else's code.

Last edited by Ilusion9; 09-19-2018 at 08:10.
Ilusion9 is offline
Vaggelis
Senior Member
Join Date: May 2017
Old 09-19-2018 , 08:28   Re: How to get the lowest health of the player?
#19

Quote:
Originally Posted by Ilusion9 View Post
you should start to learn some algorithms and see why is better to initialise the minimum with the first element.
that size = 0 was for multiple clients with the same minimum health, but i was too lazy to do that.

this is the scripting forum, anyone can post ideas or code. if you ask something here, you should be able to understand, to optimize and to correct someone else's code.
You said to me learn some algorithms? Nice joke. Its not a must to always initialize the minimum from the first element if you know the maximum clever boy, also i dont see any optimization in your code, only the opposite.

Last edited by Vaggelis; 09-19-2018 at 08:48. Reason: forgot to say "first element"
Vaggelis is offline
Closed Thread


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 12:54.


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