Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- }
- stock AbrirInventario(playerid)
- {
- invSelectedSlot[targetid] = -1;
- for(new i = 0; i != 8; i++)
- {
- PlayerTextDrawShow(targetid, invText[playerid][i]);
- }
- TextDrawShowForPlayer(targetid, invNew[0]);
- TextDrawShowForPlayer(targetid, invNew[1]);
- TextDrawShowForPlayer(targetid, invNew[2]);
- TextDrawShowForPlayer(targetid, invNew[3]);
- TextDrawShowForPlayer(targetid, invNew[4]);
- SelectTextDraw(playerid, 0xFFFFFFFF);//0xFFFFFFFF
- new str[256];
- format(str,300,"Pagina_%d_-_5",InventarioPagina[playerid]);
- PlayerTextDrawSetString(playerid,invText[playerid][4],str);
- new itens;
- for(new i = 0; i < 75; i++)
- {
- if(InventarioInfo[playerid][i][iSlot] != 19382) itens++;
- format(str, sizeof str, "%s", PlayerName(playerid));
- PlayerTextDrawSetString(playerid, invText[playerid][5], str);
- format(str, sizeof str, "Itens:_%d/75", itens);
- PlayerTextDrawSetString(playerid, invText[playerid][7], str);
- }
- InventarioAberto[playerid] = 1;
- if(InventarioPagina[playerid] == 1)
- {
- for(new i=0; i < 15; i++)
- {
- if(InventarioInfo[playerid][i][iUnidades] > 0)
- {
- format(str, sizeof str, "%s ~r~%d", NomeItemInventarioInventario(i, playerid), InventarioInfo[playerid][i][iUnidades]);
- PlayerTextDrawSetString(playerid, invName[playerid][i], str);
- PlayerTextDrawShow(playerid, invName[playerid][i]);
- }
- PlayerTextDrawSetPreviewModel(playerid, invPreview[playerid][i], InventarioInfo[playerid][i][iSlot]);
- PlayerTextDrawShow(playerid, invPreview[playerid][i]);
- if(InventarioInfo[playerid][i][iSlot] == 11738 || InventarioInfo[playerid][i][iSlot] == 11739)
- {
- PlayerTextDrawSetPreviewModel(playerid, invPreview[playerid][i], 11736);
- PlayerTextDrawShow(playerid, invPreview[playerid][i]);
- }
- if(InventarioInfo[playerid][i][iSlot] == 19382)
- {
- PlayerTextDrawSetPreviewModel(playerid, invPreview[playerid][i], 18631);
- PlayerTextDrawShow(playerid, invPreview[playerid][i]);
- }
- }
- }
- return 1;
- }
- stock DiminuirInv(slot, playerid)
- {
- if(InventarioInfo[playerid][slot][iUnidades] > 1)
- {
- new str[128];
- InventarioInfo[playerid][slot][iUnidades] --;
- format(str, sizeof str, "%s ~r~%d", NomeItemInventarioInventario(slot, playerid), InventarioInfo[playerid][slot][iUnidades]);
- PlayerTextDrawSetString(playerid, invName[playerid][slot], str);
- PlayerTextDrawShow(playerid, invName[playerid][slot]);
- PlayerTextDrawSetPreviewModel(playerid, invPreview[playerid][slot], InventarioInfo[playerid][slot][iSlot]);
- PlayerTextDrawShow(playerid, invPreview[playerid][slot]);
- return 1;
- }
- if(InventarioInfo[playerid][slot][iUnidades] == 1)
- {
- InventarioInfo[playerid][slot][iUnidades] = 0;
- InventarioInfo[playerid][slot][iSlot] = 19382;
- PlayerTextDrawHide(playerid, invName[playerid][slot]);
- PlayerTextDrawBackgroundColor(playerid, invPreview[playerid][ItemSelecionado[playerid]], -2139062219);
- PlayerTextDrawHide(playerid, invBox[playerid][0]);
- PlayerTextDrawHide(playerid, invBox[playerid][1]);
- PlayerTextDrawHide(playerid, invBox[playerid][2]);
- PlayerTextDrawHide(playerid, invBox[playerid][3]);
- PlayerTextDrawHide(playerid, invBox[playerid][4]);
- PlayerTextDrawHide(playerid, invBox[playerid][5]);
- PlayerTextDrawHide(playerid, invBox[playerid][6]);
- PlayerTextDrawHide(playerid, invBox[playerid][7]);
- BoxAberto[playerid] = 0;
- }
- return 1;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement