01.10.2012, 19:30
So I have this Dynamic Faction System, I am trying to get it so when I do /editfactionguns it will come up with a sscanf thing and you can do /editfactionguns [factionid] [gunids] for example: /editfactionguns facidhere 24, 29, 30
So that would create a deagle since its ID 24, an MP5 and an AK47
But, how can I do that with sscanf? and add it to that factions weapons thing, I already have saving for it
My CMD:
+rep thanks
So that would create a deagle since its ID 24, an MP5 and an AK47
But, how can I do that with sscanf? and add it to that factions weapons thing, I already have saving for it
My CMD:
Код:
CMD:editfactionguns(playerid, params[]) { if(PlayerInfo[playerid][pAdmin] < 5) return SendClientMessage(playerid, COLOR_WHITE, "You are not authorized to use this command!"); new iFac, weapons, string[128]; if(sscanf(params, "ds[32]", iFac, weapons)) return SendClientMessage(playerid, -1, "USAGE: /editfactionguns [factionid] [gun IDs]"); else { arrFaction[iFac][g_iLockerGuns] = weapons; format(string, sizeof(string), "You have modified faction ID %i weapon's too: %s.", iFac, weapons); SendClientMessage(playerid, COLOR_WHITE, string); SaveDynamicFactions(); } return 1; }