Posts: 1,564
Threads: 98
Joined: Apr 2011
Reputation:
0
Oh yeah, mb; anyways. Is it possible to do it with a normal array?
Posts: 882
Threads: 50
Joined: Jun 2012
Reputation:
0
Yes
new a[] = {1,2,3,4,5,6};
and to get a value a[0]
If you want to name each element of the array
You can do this
#define CLASS 1
#define ADMIN 2
#define IDIOT 3
#define JOKER 4
#define MAD 5
and a[MAD] = 1;
Posts: 1,564
Threads: 98
Joined: Apr 2011
Reputation:
0
Yeah i knew that already. But i want to assign a number to a variable inside the array.
Posts: 882
Threads: 50
Joined: Jun 2012
Reputation:
0
Updated my previous post which does it using defines.
Posts: 1,564
Threads: 98
Joined: Apr 2011
Reputation:
0
I would swear there was a different way to do this by not using defines, can't remember that way though. I guess i will use this for now, and maybe a next poster will know the right way
Posts: 882
Threads: 50
Joined: Jun 2012
Reputation:
0
OMG lol - I use it everywhere(almost) and I never thought of it
EDIT:Example how to use Neros code
enum PlayerInfo_t
{
Admin,
EpicPlayer
}
new PlayerInfo[MAX_PLAYERS][PlayerInfo_t];
and to use it PlayerInfo[playerid][Admin] = 1;
Posts: 1,046
Threads: 29
Joined: Mar 2010
Why do you store for example into
pawn Код:
AdminLevel[cpv][0] = cpv // Equals zero in this case
?