14.10.2014, 14:48
Hello guys,
Many of you use enums as of saving systems (register/login data), so I want to ask this question here. What if I would use all player data in one enum? I use enums only for saving dates, and arrays for temp data. So, if you don't understand me I'll give an example.
that's what I'm using currently. But could I move them to pInfo enum? And tell me please difference.
Thanks in advise.
Many of you use enums as of saving systems (register/login data), so I want to ask this question here. What if I would use all player data in one enum? I use enums only for saving dates, and arrays for temp data. So, if you don't understand me I'll give an example.
pawn Код:
enum pInfo
{
pAdmin,
pKills,
pDeaths,
pBanned,
pVip
};
new PlayerData[MAX_PLAYERS][pInfo];
new gPlayerLogged[MAX_PLAYERS char];
new gPlayerZone[MAX_PLAYERS char];
new gPlayerAFK[MAX_PLAYERS];
new gPlayerName[MAX_PLAYER_NAME];
new gPlayerIp[16];
// more
pawn Код:
enum pInfo
{
pAdmin,
pKills,
pDeaths,
pBanned,
pVip,
pLogged,
pZone,
pAFK,
pName[MAX_PLAYER_NAME],
pIp[16]
// more
};
new PlayerData[MAX_PLAYERS][pInfo];