Locker problem rep
#1

pawn Код:
CMD:testlocker(playerid, params[])
{
    new string[256], iFac = arrFaction[playerid][g_iFactionID];
    if(arrFaction[playerid][p_iMember] > 0)
    {
        if(arrFaction[iFac][g_iLockerGuns] == 0)
        {
            SendClientMessage(playerid, COLOR_WHITE, "Your faction lockers have no weapons in them!");
        }
        if(arrFaction[iFac][g_iLockerGuns] > 0)
        {
            [B][U]new str[24];GetWeaponName(arrFaction[iFac][g_iLockerGuns], str, sizeof(str))[/U][/B];
            format(string, sizeof(string), "%s - $%i", str, arrFaction[iFac][g_iLockerCost]);
            ShowPlayerDialog(playerid, DIALOG_FACWEPS, DIALOG_STYLE_LIST, "Faction Locker", string, "Select", "Cancel");
        }
    }
    else SendClientMessage(playerid, COLOR_WHITE, "You are not in a faction!");
    return 1;
}
Basically, whenever I set lockerGuns 1 to an ID it doesnt pick it up.
Probably why:
pawn Код:
CMD:editweapons(playerid, params[])
{
    new string[128], wepslot, weaponID, iFac = arrFaction[playerid][g_iFactionID];
    if(PlayerInfo[playerid][pAdmin] >= 5)
    {
        if(sscanf(params, "id", wepslot, weaponID)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /editweapons [wepslot] [wepid]");
       
        if(wepslot == 1)
        {
            [B]arrFaction[iFac][g_iLockerGuns][U][1][/U] = weaponID;[/B]
            format(string, sizeof(string), "You have changed %s's weapon slot 1 to weapon ID %d.", arrFaction[iFac][g_szFactionName], weaponID);
            SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
        }
    }
    return 1;
}
I underlined the problem the number and made the line bold.

I am setting the locker gun 1 to an ID but on my testlocker cmd its not looking for all the guns, my enum:
Quote:

g_iLockerGuns[16],

So how can I do this? Because when I add the [16] on the end of the :testlocker thing(highlighted and bolded it) it gives me an error

thanks

+rep
Reply


Messages In This Thread
Locker problem rep - by RLGaming - 14.10.2012, 20:37
Re: Locker problem rep - by JhnzRep - 15.10.2012, 00:05
Re: Locker problem rep - by RLGaming - 20.10.2012, 17:00
Re : Locker problem rep - by Varkoll_ - 20.10.2012, 18:29
Re: Locker problem rep - by RLGaming - 20.10.2012, 18:41
Re : Locker problem rep - by Varkoll_ - 20.10.2012, 19:03
Re: Locker problem rep - by RLGaming - 20.10.2012, 19:32
Re : Locker problem rep - by Varkoll_ - 20.10.2012, 19:50
Re: Locker problem rep - by RLGaming - 20.10.2012, 20:11

Forum Jump:


Users browsing this thread: 1 Guest(s)