About Factions
#9

1. Define factions, an unique ID for each:

#define LSPD 1
#define FBI 2

2. You need three arrays to detect: rank, duty and the faction each player is in.

FactionRank[MAX_PLAYERS];
Faction[MAX_PLAYERS];
bool:FactionDuty[MAX_PLAYERS = false;

3. You then can make a command to set the faction that player is in, another command to set the rank. This should set Faction[playerid] equal to the faction ID the player is in.

4. A /duty command that sets the player skin, colour and weapons. You should then set FactionDuty[playerid] to true.




-----------------

I would actually do,

enum playerinfo {
faction,
rank,
duty
}
new pInfo[MAX_PLAYERS][playerinfo];

instead of what I said above, however I split it to make it easier to understand for you ! Hope that helps!
Reply


Messages In This Thread
About Factions(change name color and private car) - by 5002 - 05.04.2015, 21:52
Re: About Factions - by Camorra - 06.04.2015, 07:13
Re: About Factions - by 5002 - 06.04.2015, 12:15
Re: About Factions - by 5002 - 09.04.2015, 11:23
Re: About Factions - by Andregood - 09.04.2015, 11:31
Re: About Factions - by 5002 - 10.04.2015, 18:52
Re: About Factions - by 5002 - 11.04.2015, 20:56
Re: About Factions - by 5002 - 14.04.2015, 10:03
Re: About Factions - by iiNzTicTx - 14.04.2015, 10:24

Forum Jump:


Users browsing this thread: 1 Guest(s)