• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Pawn] distributed enumerators - enums
#1
example:



Code:
enum E_ADMIN_DATA



{

? ? ? e_admin_position_none = 0,

? ? ? e_admin_position_admin = 1

}



enum E_PLAYER_DATA



{

? ? ?e_id,

? ? ?e_name[MAX_PLAYER_NAME],

? ? ?E_ADMIN_DATA:e_admin,

}



new player[MAX_PLAYERS][E_PLAYER_DATA];

....



public OnPlayerConnect(playerid)

{

? ? ?// will it be like so.....?

? ? ?player[playerid][e_admin] = E_ADMIN_DATA:e_admin_position_none;

? ? ?return 1;

}



RetrieveAdminLevel(playerid, E_ADMIN_DATA:level)

{

? ? ? ?switch(level) { .... }

? ? ? ?return level;

}



can any of the code i gave as an example will help distributing data into enums/arrays to its usage?
  Reply


Messages In This Thread
distributed enumerators - enums - by hastlaking - 2019-04-18, 12:34 AM
RE: distributed enumerators - enums - by Ihnify - 2019-04-18, 11:17 AM

Forum Jump: