Advertisement
Guest User

Untitled

a guest
Dec 9th, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.46 KB | None | 0 0
  1. }
  2. stock AbrirInventario(playerid)
  3. {
  4. invSelectedSlot[targetid] = -1;
  5. for(new i = 0; i != 8; i++)
  6. {
  7. PlayerTextDrawShow(targetid, invText[playerid][i]);
  8. }
  9. TextDrawShowForPlayer(targetid, invNew[0]);
  10. TextDrawShowForPlayer(targetid, invNew[1]);
  11. TextDrawShowForPlayer(targetid, invNew[2]);
  12. TextDrawShowForPlayer(targetid, invNew[3]);
  13. TextDrawShowForPlayer(targetid, invNew[4]);
  14. SelectTextDraw(playerid, 0xFFFFFFFF);//0xFFFFFFFF
  15. new str[256];
  16.  
  17. format(str,300,"Pagina_%d_-_5",InventarioPagina[playerid]);
  18. PlayerTextDrawSetString(playerid,invText[playerid][4],str);
  19.  
  20. new itens;
  21. for(new i = 0; i < 75; i++)
  22. {
  23. if(InventarioInfo[playerid][i][iSlot] != 19382) itens++;
  24. format(str, sizeof str, "%s", PlayerName(playerid));
  25. PlayerTextDrawSetString(playerid, invText[playerid][5], str);
  26. format(str, sizeof str, "Itens:_%d/75", itens);
  27. PlayerTextDrawSetString(playerid, invText[playerid][7], str);
  28. }
  29. InventarioAberto[playerid] = 1;
  30. if(InventarioPagina[playerid] == 1)
  31. {
  32. for(new i=0; i < 15; i++)
  33. {
  34. if(InventarioInfo[playerid][i][iUnidades] > 0)
  35. {
  36. format(str, sizeof str, "%s ~r~%d", NomeItemInventarioInventario(i, playerid), InventarioInfo[playerid][i][iUnidades]);
  37. PlayerTextDrawSetString(playerid, invName[playerid][i], str);
  38. PlayerTextDrawShow(playerid, invName[playerid][i]);
  39. }
  40. PlayerTextDrawSetPreviewModel(playerid, invPreview[playerid][i], InventarioInfo[playerid][i][iSlot]);
  41. PlayerTextDrawShow(playerid, invPreview[playerid][i]);
  42. if(InventarioInfo[playerid][i][iSlot] == 11738 || InventarioInfo[playerid][i][iSlot] == 11739)
  43. {
  44. PlayerTextDrawSetPreviewModel(playerid, invPreview[playerid][i], 11736);
  45. PlayerTextDrawShow(playerid, invPreview[playerid][i]);
  46. }
  47. if(InventarioInfo[playerid][i][iSlot] == 19382)
  48. {
  49. PlayerTextDrawSetPreviewModel(playerid, invPreview[playerid][i], 18631);
  50. PlayerTextDrawShow(playerid, invPreview[playerid][i]);
  51. }
  52. }
  53. }
  54. return 1;
  55. }
  56. stock DiminuirInv(slot, playerid)
  57. {
  58. if(InventarioInfo[playerid][slot][iUnidades] > 1)
  59. {
  60. new str[128];
  61. InventarioInfo[playerid][slot][iUnidades] --;
  62. format(str, sizeof str, "%s ~r~%d", NomeItemInventarioInventario(slot, playerid), InventarioInfo[playerid][slot][iUnidades]);
  63. PlayerTextDrawSetString(playerid, invName[playerid][slot], str);
  64. PlayerTextDrawShow(playerid, invName[playerid][slot]);
  65. PlayerTextDrawSetPreviewModel(playerid, invPreview[playerid][slot], InventarioInfo[playerid][slot][iSlot]);
  66. PlayerTextDrawShow(playerid, invPreview[playerid][slot]);
  67. return 1;
  68. }
  69. if(InventarioInfo[playerid][slot][iUnidades] == 1)
  70. {
  71. InventarioInfo[playerid][slot][iUnidades] = 0;
  72. InventarioInfo[playerid][slot][iSlot] = 19382;
  73. PlayerTextDrawHide(playerid, invName[playerid][slot]);
  74. PlayerTextDrawBackgroundColor(playerid, invPreview[playerid][ItemSelecionado[playerid]], -2139062219);
  75. PlayerTextDrawHide(playerid, invBox[playerid][0]);
  76. PlayerTextDrawHide(playerid, invBox[playerid][1]);
  77. PlayerTextDrawHide(playerid, invBox[playerid][2]);
  78. PlayerTextDrawHide(playerid, invBox[playerid][3]);
  79. PlayerTextDrawHide(playerid, invBox[playerid][4]);
  80. PlayerTextDrawHide(playerid, invBox[playerid][5]);
  81. PlayerTextDrawHide(playerid, invBox[playerid][6]);
  82. PlayerTextDrawHide(playerid, invBox[playerid][7]);
  83. BoxAberto[playerid] = 0;
  84. }
  85. return 1;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement