Question about Name's and getting them
#2

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.

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

so, the answer is
PHP код:
static Name[MAX_PLAYERS][MAX_PLAYER_NAME 1
Thanks to who explained me this.
Reply


Messages In This Thread
Question about Name's and getting them - by IdonTmiss - 07.11.2018, 13:45
Re: Question about Name's and getting them - by v1k1nG - 07.11.2018, 15:52
Re: Question about Name's and getting them - by CaptainBoi - 07.11.2018, 15:58
Re: Question about Name's and getting them - by Ermanhaut - 07.11.2018, 16:04
Re: Question about Name's and getting them - by Gforcez - 08.11.2018, 14:22
Re: Question about Name's and getting them - by v1k1nG - 08.11.2018, 15:29
Re: Question about Name's and getting them - by cSharp - 08.11.2018, 15:38
Re: Question about Name's and getting them - by TheToretto - 08.11.2018, 18:14
Re: Question about Name's and getting them - by SyS - 09.11.2018, 01:17

Forum Jump:


Users browsing this thread: 2 Guest(s)