Advertisement
Guest User

Untitled

a guest
Nov 1st, 2017
475
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.37 KB | None | 0 0
  1. Dialog:DialogIIProductsOpz(playerid, response, listitem, inputtext[])
  2. {
  3. if(!response) return
  4. IllegalIndustries_ShowOptions(playerid, PlayerInfo[playerid][pIndustryMOD]);
  5.  
  6. new id = PlayerInfo[playerid][pIndustryMOD];
  7. new itemid = PlayerInfo[playerid][pIngredientID];
  8. new inSell = IllegalIndustries_HasIngredient(id, itemid);
  9. new actual_id = (inSell == -1) ? IllegalIndustries_GetFreeSlot(id) : inSell;
  10.  
  11. switch(listitem)
  12. {
  13. case 0:
  14. {
  15. IllegalIndustryInfo[id][iIngredients][actual_id] = (inSell != -1) ? -1 : itemid;
  16. SendAdminAlert(false, COLOR_ADMIN, "AdmCmd: %s ha impostato l'ingrediente %s %s nell'industria ID %d.", ReturnRoleplayName(playerid), InventoryObjects[itemid][invName], (IllegalIndustryInfo[id][iIngredients][actual_id] != -1) ? ("vendibile") : ("non vendibile"), id); // traduire rien comprit lel
  17. PlayerInfo[playerid][pIndustryMOD] = -1;
  18. PlayerInfo[playerid][pIngredientID] = -1;
  19. Log(playerid, "/iedit ingrediente", -1, id, itemid);
  20. SaveIllegalIndustry(id);
  21. }
  22. case 1: Dialog_Show(playerid, DialogIIProductPrice, DIALOG_STYLE_INPUT, InventoryObjects[itemid][invName], "Insérer le prix de vente (actuel: $%d) du produit %s pour l'entreprise. (ID: %d)", "Changer", "Retour", IllegalIndustryInfo[id][iPrices][inSell], InventoryObjects[itemid][invName], id); // vérifier si les arguments sont biens
  23. }
  24.  
  25. return 1;
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement