would it be more proffesional to replace MAX_PLAYERS?
#1

I am about to open server that is going to have 30-40 players, and the thing about making loops with "MAX_PLAYERS" bothers me(MAX_PLAYERS defined as 255 so every "for" loop from 0 to 255 goes 255 times while the server has only 40 players and its not necesery) so I thought about making an integer lets name it "HigestID" evry time someone connects then this "HighestID" checks if the id of player is higher then varible in "HighestID", when its is higher then HighestID=playerid, its seems cool but when the player with the "HighestID" disconnects then its have to loop all way downto the next high id, so I am wondering would it be more proffesional to work in that way? or should I just stick with MAX_PLAYERS?

Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)