Organisational include -
RajatPawar - 25.07.2013
Hello guys.
The sheer amount of threads asking for
member group, faction, administrator, VIPs, cops and robbers teams, battle teams, etc, filterscripts is huge. The difference between them is the way they are handled, but basically they are just organisations and levels. I was thinking about making a final include for this that would make it all end, may be like:
pawn Код:
enum player
{
pORGANISATION_level
bool:pleader
}
new playerINFO[MAX_PLAYERS][player];
stock SetPlayerLevel( playerid, level )
{
return playerInfo[playerid][pORGANISATION_level] = level;
}
stock Player_HasEnoughLevel(playerid, level)
{
switch playerINFO...
return true;
return false;
}
I think you get the idea. But then the whole include just gets over in a few stocks (Setting and Getting) which isn't quite that helpful nor that attractive. Can anyone suggest me what I can add so any organisation can be made with this, and you don't need to answer threads over this all day?
Thanks, cheers
Re: Organisational include -
Scenario - 25.07.2013
All we need is basic functionality. We can tell people "use this" and give them an example of how to make group-only commands and functions. It doesn't need to be pretty, it just needs to get the job done.
Re: Organisational include -
RajatPawar - 25.07.2013
That is true. I however, have this idea - define different organisations and then make different stocks for them. I am unsure on how to go about on that though. Suppose -
pawn Код:
#define ORG_VIP 14124
#define ORG_MEMGROUP 1511
#define ORG_ADMIN 21995
#define ORG_FACTION 981
#define USE_INCLUDE_FOR ORG_ADMIN // Use my include for making what organisation?
#if USE_INCLUDE_FOR == ORG_ADMIN
stock GetAdminLevel(..)
#else if USE_INCLUDE_FOR ORG_VIP
..
#end if
Something like that could work? Would it?
Re: Organisational include -
RajatPawar - 25.07.2013
Sorry for double posting, but if anyone was wondering (I doubt), I already made it (Link is in my signature). And instead of using directives, I used a multi dimensional array POV.
Organisation definition ---> stocks
instead of
Stocks ---> Organisation definition.