28.12.2015, 17:53
Hey, I'd like to add different dialog options for different factions in a RP gamemode I am editing.
So basically, the options Duty, Equipment, Uniform and FirstAid & Kevlar should be available for every faction, options Clear Suspect, Medkit & Vest Trunk Kit and Tazer for GroupType 1 which would be the Law Enforcement Agency, whereas the Knife should be available only for GroupType 2, which is the Contract Agency.
So basically, the menu itself works fine for Contract Agency, but instead of getting the Knife, I get the option to perform 'Clear Suspect'. I also added Knife to be the case 7 in the list, but it doesn't really seem to matter.
Код:
{ 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; }
So basically, the menu itself works fine for Contract Agency, but instead of getting the Knife, I get the option to perform 'Clear Suspect'. I also added Knife to be the case 7 in the list, but it doesn't really seem to matter.