Save Faction
#1

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.
Reply
#2

i also wana know how to save factions.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)