SA-MP Forums Archive
Help with faction system - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Help with faction system (/showthread.php?tid=429958)



Help with faction system - Michael_Cuellar - 12.04.2013

So I made a faction system and I got it to save and load with yini now how do I make a "makeleader command" and ranks and stuff like that?


Re: Help with faction system - zDivine - 12.04.2013

Well, the makeleader command is simple variables. if you have an enum for playerinfo, you could do something like.

pawn Код:
enum pInfo
{
pLeader
};
new PlayerInfo[MAX_PLAYERS][pInfo];
And then for the makeleader, do:
pawn Код:
PlayerInfo[playerid][pLeader] = 1; // Faction Name 1, you can use 2 for second faction, and so on.
So therefor, you can make it if pLeader for a player = 1, then he's leader of, say, LSPD. If it = 2, then he's leader of say, FBI. You get it?


Re: Help with faction system - Michael_Cuellar - 12.04.2013

can you show me on teamview? I mean like not do it for me but like watch me and make sure im doing it right?


Re: Help with faction system - Scrillex - 12.04.2013

I can help you with it...

Only i will tell you will do it by your self..

And i will watch if you are doing it right!