GetEnumInt
#1

I want to be able to check enums between scripts without having to create a function for each.

I tried this
pawn Код:
public GetEnumInt(enumname[], id, var[]) return enumname[id][var];
Though it doesn't seem to work.

Basically, what i'm aiming to do, is if i'm in a different script module, I want to be able to use
pawn Код:
GetEnumInt("pInfo", playerid, "Admin");
to return their admin level, for example. I just don't want to have to create a separate function for each value, because of course, I could just use something like GetPlayerAdminLevel, or GetPlayer whatever. Though I don't want to spend all that time making all of those functions if I can get away with something a little neater.
Reply


Messages In This Thread
GetEnumInt - by TakeiT - 27.01.2015, 18:33
Re: GetEnumInt - by TakeiT - 27.01.2015, 19:49
Re: GetEnumInt - by TakeiT - 27.01.2015, 20:26
Re: GetEnumInt - by Dignity - 27.01.2015, 20:27
Re: GetEnumInt - by TakeiT - 27.01.2015, 20:30
Re: GetEnumInt - by Dignity - 27.01.2015, 20:38
Re: GetEnumInt - by TakeiT - 27.01.2015, 20:58
Re: GetEnumInt - by DRIFT_HUNTER - 27.01.2015, 21:18
Re: GetEnumInt - by Dignity - 27.01.2015, 21:22
Re: GetEnumInt - by TakeiT - 27.01.2015, 21:33

Forum Jump:


Users browsing this thread: 2 Guest(s)