31.10.2017, 01:14
Pretty sure you don't need to check if the player is connected in foreach.
Your code is difficult to look at when you're using doublespaced lines, and it's a terrible idea to run 10 foreach statements simply to find each individual placing.
See if you can find the 'top' examples, as this is basically all you need to do. Make an array of how many places you are tracking, and see who has the highest checkpoint. If doubles, then calculate distance, and change order appropriately. Otherwise, change order anyway due to placing.
Your code is difficult to look at when you're using doublespaced lines, and it's a terrible idea to run 10 foreach statements simply to find each individual placing.
See if you can find the 'top' examples, as this is basically all you need to do. Make an array of how many places you are tracking, and see who has the highest checkpoint. If doubles, then calculate distance, and change order appropriately. Otherwise, change order anyway due to placing.
