MAX_PLAYERS what is this?
#6

Quote:
Originally Posted by icey--t
i still dont get it. why even use it then. so max_players puts a playerid unique to a declaration?
it would usually be used in an array, to create a variable slot for each player.

e.g.

pawn Код:
new money;
Is just one cell. You can only store one number in it.
pawn Код:
new money[MAX_PLAYERS];
Creates 200 cells (MAX_PLAYERS is just a define for 200). You can store a number in each of them.

_________________________________________________

With that, you can store players information easily.

pawn Код:
money[playerid] = GetPlayerMoney(playerid);
printf("playerid %d has $%d",playerid, money[playerid]);
Reply


Messages In This Thread
MAX_PLAYERS what is this? - by icey--t - 18.02.2009, 04:51
Re: MAX_PLAYERS what is this? - by Finn - 18.02.2009, 04:59
Re: MAX_PLAYERS what is this? - by icey--t - 18.02.2009, 05:42
Re: MAX_PLAYERS what is this? - by robanswe - 20.02.2009, 12:30
Re: MAX_PLAYERS what is this? - by Mikep - 20.02.2009, 12:35
Re: MAX_PLAYERS what is this? - by kc - 20.02.2009, 12:36

Forum Jump:


Users browsing this thread: 1 Guest(s)