Зарегистрировавшись у нас, вы сможете обсуждать, делиться и отправлять личные сообщения другим участникам нашего сообщества.
Зарегистрироваться! ExecuteEvent(playerid, 0, "window.executeEvent('event.setActiveView', '[\"Inventory\"]');");
ExecuteEvent(playerid, 0, "window.executeEvent('event.inventory.setPlayerInventoryVisible', '[true]');");
ExecuteEvent(playerid, 0, "window.executeEvent('event.inventory.updateCharacterTab', '[\"character\"]');");
ExecuteEvent(playerid, 0, "window.executeEvent('event.inventory.playerInventory', '[{\"action\":0,\"data\":{\"type\":2,\"items\":[{\"slot\":99},{\"slot\":100},{\"slot\":101},{\"slot\":102},{\"slot\":103},{\"slot\":104}]}}]');");
ExecuteEvent(playerid, 0, "window.executeEvent('event.inventory.playerInventory', '[{\"action\":0,\"data\":{\"type\":17,\"items\":[{\"slot\":0}]}}]');");
ExecuteEvent(playerid, 0, "window.executeEvent('event.inventory.playerInventory', '[{\"action\":0,\"data\":{\"type\":17,\"items\":[{\"slot\":1}]}}]');");
ExecuteEvent(playerid, 0, "window.executeEvent('event.inventory.playerInventory', '[{\"action\":0,\"data\":{\"type\":17,\"items\":[]}}]');");
ExecuteEvent(playerid, 0, "window.executeEvent('event.inventory.playerInventory', '[{\"action\":0,\"data\":{\"type\":10,\"items\":[{\"slot\":0}]}}]');");
ExecuteEvent(playerid, 0, "window.executeEvent('event.inventory.playerInventory', '[{\"action\":0,\"data\":{\"type\":22,\"items\":[{\"slot\":0,\"item\":2970,\"amount\":1,\"text\":\"ID:824\",\"available\":1,\"time\":0}]}}]');");
ExecuteEvent(playerid, 0, "window.executeEvent('event.inventory.playerInventory', '[{\"action\":1,\"data\":{\"skin\":{\"model\":123,\"background\":-1},\"security\":1,\"buttons\":2049}}]');");
ExecuteEvent(playerid, 0, "window.executeEvent('event.inventory.playerInventory', '[{\"action\":0,\"data\":{\"type\":1,\"items\":[{\"slot\":5}]}}]');");
ExecuteEvent(playerid, 0, "window.executeEvent('event.inventory.playerInventory', '[{\"action\":0,\"data\":{\"type\":1,\"items\":[{\"slot\":6}]}}]');");
ExecuteEvent(playerid, 0, "window.executeEvent('event.inventory.playerInventory', '[{\"action\":0,\"data\":{\"type\":1,\"items\":[{\"slot\":7}]}}]');");
ExecuteEvent(playerid, 0, "window.executeEvent('event.inventory.playerInventory', '[{\"action\":0,\"data\":{\"type\":1,\"items\":[{\"slot\":11,\"item\":1234,\"amount\":2,\"text\":\"\",\"available\":1,\"time\":0,\"enchant\":0,\"color\":0,\"background\":858993663}]}}]');");
Как добавить команду на открытие этого инвентаря, типо так?Вывод инвентаря
Pawn:ExecuteEvent(playerid, 0, "window.executeEvent('event.setActiveView', '[\"Inventory\"]');"); ExecuteEvent(playerid, 0, "window.executeEvent('event.inventory.setPlayerInventoryVisible', '[true]');"); ExecuteEvent(playerid, 0, "window.executeEvent('event.inventory.updateCharacterTab', '[\"character\"]');"); ExecuteEvent(playerid, 0, "window.executeEvent('event.inventory.playerInventory', '[{\"action\":0,\"data\":{\"type\":2,\"items\":[{\"slot\":99},{\"slot\":100},{\"slot\":101},{\"slot\":102},{\"slot\":103},{\"slot\":104}]}}]');"); ExecuteEvent(playerid, 0, "window.executeEvent('event.inventory.playerInventory', '[{\"action\":0,\"data\":{\"type\":17,\"items\":[{\"slot\":0}]}}]');"); ExecuteEvent(playerid, 0, "window.executeEvent('event.inventory.playerInventory', '[{\"action\":0,\"data\":{\"type\":17,\"items\":[{\"slot\":1}]}}]');"); ExecuteEvent(playerid, 0, "window.executeEvent('event.inventory.playerInventory', '[{\"action\":0,\"data\":{\"type\":17,\"items\":[]}}]');"); ExecuteEvent(playerid, 0, "window.executeEvent('event.inventory.playerInventory', '[{\"action\":0,\"data\":{\"type\":10,\"items\":[{\"slot\":0}]}}]');"); ExecuteEvent(playerid, 0, "window.executeEvent('event.inventory.playerInventory', '[{\"action\":0,\"data\":{\"type\":22,\"items\":[{\"slot\":0,\"item\":2970,\"amount\":1,\"text\":\"ID:824\",\"available\":1,\"time\":0}]}}]');"); ExecuteEvent(playerid, 0, "window.executeEvent('event.inventory.playerInventory', '[{\"action\":1,\"data\":{\"skin\":{\"model\":123,\"background\":-1},\"security\":1,\"buttons\":2049}}]');"); ExecuteEvent(playerid, 0, "window.executeEvent('event.inventory.playerInventory', '[{\"action\":0,\"data\":{\"type\":1,\"items\":[{\"slot\":5}]}}]');"); ExecuteEvent(playerid, 0, "window.executeEvent('event.inventory.playerInventory', '[{\"action\":0,\"data\":{\"type\":1,\"items\":[{\"slot\":6}]}}]');"); ExecuteEvent(playerid, 0, "window.executeEvent('event.inventory.playerInventory', '[{\"action\":0,\"data\":{\"type\":1,\"items\":[{\"slot\":7}]}}]');");
Добавление слотов
Pawn:ExecuteEvent(playerid, 0, "window.executeEvent('event.inventory.playerInventory', '[{\"action\":0,\"data\":{\"type\":1,\"items\":[{\"slot\":11,\"item\":1234,\"amount\":2,\"text\":\"\",\"available\":1,\"time\":0,\"enchant\":0,\"color\":0,\"background\":858993663}]}}]');");
Чтобы добавлять слоты, нужно менять значение slot
Вроде все, но возможно что-нибудь да напутал
CMD:cefinv(playerid)
ExecuteEvent(playerid, 0, "window.executeEvent('event.setActiveView', '[\"Inventory\"]');");
ExecuteEvent(playerid, 0, "window.executeEvent('event.inventory.setPlayerInventoryVisible', '[true]');");
ExecuteEvent(playerid, 0, "window.executeEvent('event.inventory.updateCharacterTab', '[\"character\"]');");
ExecuteEvent(playerid, 0, "window.executeEvent('event.inventory.playerInventory', '[{\"action\":0,\"data\":{\"type\":2,\"items\":[{\"slot\":99},{\"slot\":100},{\"slot\":101},{\"slot\":102},{\"slot\":103},{\"slot\":104}]}}]');");
ExecuteEvent(playerid, 0, "window.executeEvent('event.inventory.playerInventory', '[{\"action\":0,\"data\":{\"type\":17,\"items\":[{\"slot\":0}]}}]');");
ExecuteEvent(playerid, 0, "window.executeEvent('event.inventory.playerInventory', '[{\"action\":0,\"data\":{\"type\":17,\"items\":[{\"slot\":1}]}}]');");
ExecuteEvent(playerid, 0, "window.executeEvent('event.inventory.playerInventory', '[{\"action\":0,\"data\":{\"type\":17,\"items\":[]}}]');");
ExecuteEvent(playerid, 0, "window.executeEvent('event.inventory.playerInventory', '[{\"action\":0,\"data\":{\"type\":10,\"items\":[{\"slot\":0}]}}]');");
ExecuteEvent(playerid, 0, "window.executeEvent('event.inventory.playerInventory', '[{\"action\":0,\"data\":{\"type\":22,\"items\":[{\"slot\":0,\"item\":2970,\"amount\":1,\"text\":\"ID:824\",\"available\":1,\"time\":0}]}}]');");
ExecuteEvent(playerid, 0, "window.executeEvent('event.inventory.playerInventory', '[{\"action\":1,\"data\":{\"skin\":{\"model\":123,\"background\":-1},\"security\":1,\"buttons\":2049}}]');");
ExecuteEvent(playerid, 0, "window.executeEvent('event.inventory.playerInventory', '[{\"action\":0,\"data\":{\"type\":1,\"items\":[{\"slot\":5}]}}]');");
ExecuteEvent(playerid, 0, "window.executeEvent('event.inventory.playerInventory', '[{\"action\":0,\"data\":{\"type\":1,\"items\":[{\"slot\":6}]}}]');");
ExecuteEvent(playerid, 0, "window.executeEvent('event.inventory.playerInventory', '[{\"action\":0,\"data\":{\"type\":1,\"items\":[{\"slot\":7}]}}]');");
return;
}
да, так, только все равно это работать из коробки не будет. тебе нужно будет самостоятельно добавить клики, получать предметы игрока и выводить их, и т.дКак добавить команду на открытие этого инвентаря, типо так?
Pawn:CMD:cefinv(playerid) ExecuteEvent(playerid, 0, "window.executeEvent('event.setActiveView', '[\"Inventory\"]');"); ExecuteEvent(playerid, 0, "window.executeEvent('event.inventory.setPlayerInventoryVisible', '[true]');"); ExecuteEvent(playerid, 0, "window.executeEvent('event.inventory.updateCharacterTab', '[\"character\"]');"); ExecuteEvent(playerid, 0, "window.executeEvent('event.inventory.playerInventory', '[{\"action\":0,\"data\":{\"type\":2,\"items\":[{\"slot\":99},{\"slot\":100},{\"slot\":101},{\"slot\":102},{\"slot\":103},{\"slot\":104}]}}]');"); ExecuteEvent(playerid, 0, "window.executeEvent('event.inventory.playerInventory', '[{\"action\":0,\"data\":{\"type\":17,\"items\":[{\"slot\":0}]}}]');"); ExecuteEvent(playerid, 0, "window.executeEvent('event.inventory.playerInventory', '[{\"action\":0,\"data\":{\"type\":17,\"items\":[{\"slot\":1}]}}]');"); ExecuteEvent(playerid, 0, "window.executeEvent('event.inventory.playerInventory', '[{\"action\":0,\"data\":{\"type\":17,\"items\":[]}}]');"); ExecuteEvent(playerid, 0, "window.executeEvent('event.inventory.playerInventory', '[{\"action\":0,\"data\":{\"type\":10,\"items\":[{\"slot\":0}]}}]');"); ExecuteEvent(playerid, 0, "window.executeEvent('event.inventory.playerInventory', '[{\"action\":0,\"data\":{\"type\":22,\"items\":[{\"slot\":0,\"item\":2970,\"amount\":1,\"text\":\"ID:824\",\"available\":1,\"time\":0}]}}]');"); ExecuteEvent(playerid, 0, "window.executeEvent('event.inventory.playerInventory', '[{\"action\":1,\"data\":{\"skin\":{\"model\":123,\"background\":-1},\"security\":1,\"buttons\":2049}}]');"); ExecuteEvent(playerid, 0, "window.executeEvent('event.inventory.playerInventory', '[{\"action\":0,\"data\":{\"type\":1,\"items\":[{\"slot\":5}]}}]');"); ExecuteEvent(playerid, 0, "window.executeEvent('event.inventory.playerInventory', '[{\"action\":0,\"data\":{\"type\":1,\"items\":[{\"slot\":6}]}}]');"); ExecuteEvent(playerid, 0, "window.executeEvent('event.inventory.playerInventory', '[{\"action\":0,\"data\":{\"type\":1,\"items\":[{\"slot\":7}]}}]');"); return; }