How to call this enum?
#5

Код:
GetPlayerPos(playerid, AccInfo[playerid][currentpos][0], AccInfo[playerid][currentpos][1], AccInfo[playerid][currentpos][2]);
"currentpos" isn't a variable by itself, it's a placeholder for a number, in this case it's a placeholder name for an array. You basically allowed a table to be three-dimensional by having an array in an enum (would be 2D if it wouldn't have been for MAX_PLAYERS).

Код:
enum e_somethings {
	hi,
	hello,
	samp[3],
	okay
};
Below you can see the same thing written on the left side as the right side with different ways, explaining what I said above.
Код:
Somethings[playerid][0] == Somethings[playerid][hi]
Somethings[playerid][1] == Somethings[playerid][hello]
Somethings[playerid][2][0] == Somethings[playerid][samp][0]
Somethings[playerid][2][1] == Somethings[playerid][samp][1]
Somethings[playerid][2][2] == Somethings[playerid][samp][2]
Somethings[playerid][3] == Somethings[playerid][okay]
Hope that made any sense to you lol.
Reply


Messages In This Thread
How to call this enum? - by Sc0pion - 27.04.2017, 02:35
Re: How to call this enum? - by Kane - 27.04.2017, 02:40
Re: How to call this enum? - by Sc0pion - 27.04.2017, 02:46
Re: How to call this enum? - by Kane - 27.04.2017, 02:50
Re: How to call this enum? - by Hansrutger - 27.04.2017, 02:52
Re: How to call this enum? - by Sc0pion - 27.04.2017, 03:09
Re: How to call this enum? - by Hansrutger - 27.04.2017, 03:11
Re: How to call this enum? - by DRIFT_HUNTER - 27.04.2017, 05:15
Re: How to call this enum? - by raydx - 27.04.2017, 07:48
Re: How to call this enum? - by denNorske - 27.04.2017, 09:50
Re: How to call this enum? - by Hansrutger - 27.04.2017, 11:37
Re: How to call this enum? - by Sc0pion - 27.04.2017, 12:15
Re: How to call this enum? - by Hansrutger - 27.04.2017, 12:28
Re: How to call this enum? - by Sc0pion - 27.04.2017, 12:34

Forum Jump:


Users browsing this thread: 3 Guest(s)