public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { if (dialogid == INVENTORY_DIALOG) { if (response) { RemoveItemFromInventory(playerid, listitem + 1); } } return 1; }