08.02.2019, 15:34
Hello,
I'm trying to make an abstraction on top of a PlayerVars array using macros.
I want to write something like this:
Which should be rewritten as this:
Is it possible to do that? And how should I do it?
I'm trying to make an abstraction on top of a PlayerVars array using macros.
I want to write something like this:
PHP код:
SET_VARS PlayerVars [
MAKE_PVAR(ID),
MAKE_PVAR(IsConnected),
MAKE_PVAR(Name[MAX_PLAYER_NAME]),
MAKE_PVAR(SkinID),
Float: MAKE_PVAR(Position[3]),
]
PHP код:
enum enum_PlayerVars {
MAKE_PVAR(ID),
MAKE_PVAR(IsConnected),
MAKE_PVAR(Name[MAX_PLAYER_NAME]),
MAKE_PVAR(SkinID),
Float: MAKE_PVAR(Position[3]),
}
new PlayerVars[MAX_PLAYERS][enum_PlayerVars];