07.11.2018, 15:52
(
Последний раз редактировалось v1k1nG; 08.11.2018 в 15:28.
)
Better more if you use a anum for player data storage and get his name only once when connecting, it is better this way of course rather than using resources everytime to get a guy's name.
Of course if you want to allow players to change nick in game you will need some editings, but yeah that is
EDIT: I have to edit this.
so, the answer is
Thanks to who explained me this.
Of course if you want to allow players to change nick in game you will need some editings, but yeah that is
EDIT: I have to edit this.
Quote:
avoid enumerated arrays because they are not arrays they work, but they don't adhere to the same rules as actual arrays so to save confusion, just use a variable and, if you're doing modules (which you should in 2018 ) use static instead of new to restrict the scope of the variable to that module only then provide access to it via functions |
PHP код:
static Name[MAX_PLAYERS][MAX_PLAYER_NAME + 1]