2019-04-18, 12:34 AM
example:
can any of the code i gave as an example will help distributing data into enums/arrays to its usage?
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?