01.10.2015, 15:24
Quote:
Actually I was too sleepy and didn't notice he doesn't have a check to see if leader is online, in theory it does exactly what he said, which is show leader first
and btw storing players then sorting them is CPU efficient, I like to do the loop twice, it's ram efficient and it's a matter of personal preference, I don't have experience in foreach, but in a simple for I would simply check on the i=MAX_PLAYERS to see if findleader==0, if it was =0 I would make i=0 again and findleader=1, and tada, problem is fixed. You can't expect someone to magically learn something unless you either fix their problem this time, or give them a different working example that they can follow, or babble for an hour for them to learn. Whichever you choose thats your choice, and I simply got mine alright ? so instead of crying in every topic, be helpful, either make a well explained answer for them to learn, write a new code for them to follow or just don't answer to that topic alright ? |