{ format(szTitle, sizeof(szTitle), "%s Locker Menu", arrGroupData[iGroupID][g_szGroupName]); if(arrGroupData[iGroupID][g_iLockerCostType] == 0) { if(arrGroupData[iGroupID][g_iLockerStock] > 100) { format(szTitle, sizeof(szTitle), "%s - Locker Stock: %d", szTitle, arrGroupData[iGroupID][g_iLockerStock]); } else { format(szTitle, sizeof(szTitle), "%s - {AA3333}Locker Stock: %d", szTitle, arrGroupData[iGroupID][g_iLockerStock]); } } format(szDialog, sizeof(szDialog), "Duty\nEquipment\nUniform\nFirstAid & Kevlar%s", (arrGroupData[iGroupID][g_iGroupType] == 1) ? ("\nClear Suspect\nMedkit & Vest Trunk Kit\nTazer & Cuffs\n") : (arrGroupData[iGroupID][g_iGroupType] == 2) ? ("\nKnife\n") : ("")); ShowPlayerDialog(playerid, G_LOCKER_MAIN, DIALOG_STYLE_LIST, szTitle, szDialog, "Select", "Cancel"); return 1; }
It's because it's not case 7 and it's case 4, you should check the playerid's faction under case 4, enter clear suspects if LEO factions and give them knife if they have Contract faction.
|
case 4:
{
if (arrGroupData[iGroupID][g_iGroupType] == 1)
{
ShowPlayerDialog(playerid, G_LOCKER_CLEARSUSPECT,DIALOG_STYLE_INPUT, arrGroupData[iGroupID][g_szGroupName]," Who would you like to clear?","Clear","Return");
}
else if (arrGroupData[iGroupID][g_iGroupType] == 2)
{
if(PlayerInfo[playerid][pHasKnife] == 0)
{
SendClientMessageEx(playerid, COLOR_WHITE, "You are now carrying a knife.");
PlayerInfo[playerid][pHasKnife] = 1;
}
else return SendClientMessageEx(playerid, COLOR_WHITE, "You are already carrying a knife.");
}
}
./includes/commands.pwn(55676) : warning 204: symbol is assigned a value that is never used: "string" ./includes/OnDialogResponse.pwn(391) : warning 217: loose indentation ./includes/OnDialogResponse.pwn(391) : error 014: invalid statement; not in switch ./includes/OnDialogResponse.pwn(391) : warning 215: expression has no effect ./includes/OnDialogResponse.pwn(391) : error 001: expected token: ";", but found ":" ./includes/OnDialogResponse.pwn(391) : error 029: invalid expression, assumed zero ./includes/OnDialogResponse.pwn(391) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors.