Raised This Month: $ Target: $400
 0% 

Help Me With Hud For Spectator


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
thEsp
BANNED
Join Date: Aug 2017
Old 05-20-2020 , 06:08   Re: Help Me With Hud For Spectator
Reply With Quote #1

Quote:
Originally Posted by OciXCrom View Post
It's much better to do the loop with "get_players".
Why don't you define why it's much better? That native does roughly the same process.
thEsp is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 05-20-2020 , 10:19   Re: Help Me With Hud For Spectator
Reply With Quote #2

Quote:
Originally Posted by thEsp View Post
Why don't you define why it's much better? That native does roughly the same process.
What is the point of looping through all player indexes manually, even the ones that aren't connected, instead of using a built in native that does the job for you and gives you an array of indexes that fit the criteria? It's 2020, we should stop using 2005 practices. This has been discussed many times. Using natives is faster.
__________________

Last edited by OciXCrom; 05-20-2020 at 10:20.
OciXCrom is offline
Send a message via Skype™ to OciXCrom
thEsp
BANNED
Join Date: Aug 2017
Old 05-20-2020 , 10:51   Re: Help Me With Hud For Spectator
Reply With Quote #3

Quote:
Originally Posted by OciXCrom View Post
What is the point of looping through all player indexes manually, even the ones that aren't connected, instead of using a built in native that does the job for you and gives you an array of indexes that fit the criteria? It's 2020, we should stop using 2005 practices. This has been discussed many times. Using natives is faster.
That native does exactly what Gabe's code does, loop until the maximum number of players is reached and check if players are connected, plus some other checks. Natives are faster but not superior, we're dealing with small chunks of data and the performance is absolutely unnoticeable. Also, if you realize we live in 2020, must've you not realize we have better and faster machines?
thEsp is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 05-20-2020 , 14:34   Re: Help Me With Hud For Spectator
Reply With Quote #4

Quote:
Originally Posted by thEsp View Post
That native does exactly what Gabe's code does, loop until the maximum number of players is reached and check if players are connected, plus some other checks. Natives are faster but not superior, we're dealing with small chunks of data and the performance is absolutely unnoticeable. Also, if you realize we live in 2020, must've you not realize we have better and faster machines?
Better and faster machines doesn't mean we should use bad scripting practices. I don't see the point of this argument.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
thEsp
BANNED
Join Date: Aug 2017
Old 05-20-2020 , 15:00   Re: Help Me With Hud For Spectator
Reply With Quote #5

Quote:
Originally Posted by OciXCrom View Post
Better and faster machines doesn't mean we should use bad scripting practices. I don't see the point of this argument.
You are in both cases wrong. Your last response was that natives are faster, and now you're saying it is a bad scripting practice. Natives aren't fast enough to make any difference that is noticeable, especially nowadays, and it is not a so-called bad scripting practice because as I already told you, core module does the same. Either way works totally fine, I don't blame you, but saying "... is much better" without proving why is not a good idea.
thEsp is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 05-20-2020 , 16:15   Re: Help Me With Hud For Spectator
Reply With Quote #6

Quote:
Originally Posted by thEsp View Post
You are in both cases wrong. Your last response was that natives are faster, and now you're saying it is a bad scripting practice. Natives aren't fast enough to make any difference that is noticeable, especially nowadays, and it is not a so-called bad scripting practice because as I already told you, core module does the same. Either way works totally fine, I don't blame you, but saying "... is much better" without proving why is not a good idea.
I mentioned both things in my first comment and I stand by them, so please don't manipulate my words. Like I said - this has been discussed many times, feel free to search why it is better.

Let's also not forget that you used the exact same words a while ago:

Quote:
Originally Posted by thEsp View Post
Use get_players native, it's better if you loop throughout a certain team.
https://forums.alliedmods.net/showthread.php?t=129484
__________________

Last edited by OciXCrom; 05-20-2020 at 16:45.
OciXCrom is offline
Send a message via Skype™ to OciXCrom
thEsp
BANNED
Join Date: Aug 2017
Old 05-20-2020 , 16:47   Re: Help Me With Hud For Spectator
Reply With Quote #7

Quote:
Originally Posted by OciXCrom View Post
I mentioned both things in my first comment, so please don't manipulate my words. Like I said - this has been discussed multiple times, feel free to search why it is better.

From what I can see, you used the exact same words a while ago:
I did words manipulation? Can you point out where exactly?
Quote:
Originally Posted by OciXCrom View Post
Using natives is faster.
Quote:
Originally Posted by OciXCrom View Post
Better and faster machines doesn't mean we should use bad scripting practices.
You clearly surfed from an argument to another one. While little did I knew how the native worked back then, I now know one thing: both ways are fine. Do I have to repeat my words, if somehow you didn't get my point? This time I didn't say either way is better or worse. If you want to check for certain flags without having messy code, sure, do it with get_players native, but for something rather inexpensive and pointless to bother about, choose your own. I am 100% sure the OP found his acquired code to be working all fine, even without your (and my) comment. Speaking of comments, making "just-to-exist" comments which are oftentimes neglecting is not something a wise man would do.
thEsp 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 17:03.


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