Adding gun's (Dynamic)
#3

for love of god use [.pawn] tags instead of [.code]

anyway:

pawn Код:
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, "di", iFac, weapons)) return SendClientMessage(playerid, -1, "USAGE: /editfactionguns [factionid] [gun IDs]");
    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;
}
issues were :
unnecessary "else" after if(sscanf..
weapon IDs are integers, not strings.
Reply


Messages In This Thread
Adding gun's (Dynamic) - by RLGaming - 01.10.2012, 19:30
Re: Adding gun's (Dynamic) - by RLGaming - 02.10.2012, 14:35
Re: Adding gun's (Dynamic) - by CmZxC - 02.10.2012, 14:43

Forum Jump:


Users browsing this thread: 1 Guest(s)