SA-MP Forums Archive
Save Faction - 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: Save Faction (/showthread.php?tid=283394)



Save Faction - Abreezy - 14.09.2011

Howdy,

I'm working on a dynamic MySQL faction system. I made the enums and loading with ease, but the saving, confuses me. I want to make a command to make factions, something like

pawn Код:
CMD:cfaction(playerid, params)
{
//createfactionstuff whivh i can't think of
return 1;
}
I want to be able to create faction, with a simple command as above, that uses my enums.

pawn Код:
FactionID,
    FactionName[24],
    Float:fX,
    Float:fY,
    Float:fZ,
I'm guessing if we used like sscanf to select the each field it would be possible, but i'm not fully sure how to do that.

So basically, i want it work like this:

/cfaction L.A.P.D

Then it grabs the x,y,z and sets the fX, fY, fZ using those coords.

I'm guessing it would be

GetPlayerPos(playerid, Faction[factionid][fX], Faction[factionid][fY], Faction[factionid][fZ]);

Then i would have other commands, such as /frank1 [fid] rankname

Thanks for all help in advance.


Re: Save Faction - ZayanImran - 27.01.2013

i also wana know how to save factions.