14.10.2012, 20:37
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;
}
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 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], |
thanks
+rep