PlayerVars abstraction using macros
#1

Hello,

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),
    
FloatMAKE_PVAR(Position[3]),

Which should be rewritten as this:

PHP код:
enum enum_PlayerVars {
    
MAKE_PVAR(ID),
    
MAKE_PVAR(IsConnected),
    
MAKE_PVAR(Name[MAX_PLAYER_NAME]),
    
MAKE_PVAR(SkinID),
    
FloatMAKE_PVAR(Position[3]),
}
new 
PlayerVars[MAX_PLAYERS][enum_PlayerVars]; 
Is it possible to do that? And how should I do it?
Reply


Messages In This Thread
PlayerVars abstraction using macros - by PeanutButter - 08.02.2019, 15:34
Re: PlayerVars abstraction using macros - by PeanutButter - 08.02.2019, 21:58

Forum Jump:


Users browsing this thread: 1 Guest(s)