I have a question about gang ranks.. - 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: I have a question about gang ranks.. (
/showthread.php?tid=411588)
I have a question about gang ranks.. -
TrueForYourSelf - 29.01.2013
So maybe someone can say how I can make rank sytstem and save it in y_ini.
(Just it can be peace of code or something + looked in ****** nothing good wasn't found).
I just need some start point..
Wishing all the best TrueForYourSelf.
Re: I have a question about gang ranks.. -
Ayumi - 29.01.2013
Quote:
Originally Posted by Jakku
First, create an enum to store your faction data.
Example:
pawn Код:
#define MAX_FACTIONS 10
new FactionCount;
enum Factions { Name[32], //String, that's why [32] = length Skin, //Integer Weapons[5][2], //5 for example, use more if you need, [2] = ammo and weapon id Float:PositionX, Float:PositionY, Float:PositionZ, };
new Faction[MAX_FACTIONS][Factions];
Then you could create a function to create a faction (Easier for you if you create them from your gamemode)
pawn Код:
stock CreateFaction(name[], skin, Float:x, Float:y,Float:z) { FactionCount++; new id = FactionCount; Faction[id][Name] = name; Faction[id][Skin] = skin; Faction[id][PositionX] = x; Faction[id][PositionY] = y; Faction[id][PositionZ] = z; printf("Faction created: %s", name); //I let you configure the other things like weapons if you need them }
Then under OnGameModeInit; create your factions:
pawn Код:
public OnGameModeInit() { CreateFaction("Example name", skinid, x,y,z); CreateFaction("Example name 2", skinid, x,y,z); return 1; }
Hope you got my point 
|
Found this by using ****** in an instant.
What you're looking for sounds more like a faction/family system, which is used for gangs usually in servers and pre-build gamemodes. Try searching with the word 'faction' or 'family' instead of 'gang'.
Re: I have a question about gang ranks.. -
TrueForYourSelf - 29.01.2013
Okay

Thank you for fast replay