14.09.2011, 18:56
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
I want to be able to create faction, with a simple command as above, that uses my enums.
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.
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;
}
pawn Код:
FactionID,
FactionName[24],
Float:fX,
Float:fY,
Float:fZ,
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.