10.09.2011, 22:10
(
Последний раз редактировалось Kyle; 10.09.2011 в 23:02.
)
Basically in this tutorial, I'm going to show you how to use enums, for example.
If you want to create a small register script insted of having lots of arrays like this:
It will turn to this
To start off: you must create the enum:
With pInfo being the name of the enum:
Now you are all set you must create a array which holds the enum:
Then later on you can use the enum as it will work eg:
That way it gets stored in the enum but still saves time insted of doing a new variable for each.
If you have any questions feel free to ask.
Kyle
If you want to create a small register script insted of having lots of arrays like this:
pawn Код:
new username[MAX_PLAYERS][24];
new password[MAX_PLAYERS][24];
new adminlevel[MAX_PLAYERS];
pawn Код:
UserStats[playerid][AdminLevel] = 1234;
pawn Код:
enum pInfo {
pawn Код:
enum pInfo {
Username[24],
Password[40],
AdminLevel
}
pawn Код:
new UserStats[MAX_PLAYERS][pInfo];
pawn Код:
UserStats[playerid][AdminLevel] = 1;
If you have any questions feel free to ask.
Kyle