Jump to content

Neptune

Member
  • Posts

    5
  • Joined

  • Last visited

Neptune's Achievements

  1. I think you can find the dying Events calling function and overwrite it.
  2. Thank u very much! I got much useful information.The trouble was solved.I try to change my code then it work. its src: NeptuneHandler = {};NeptuneHandler.addItems = function(_keyPressed) local key = _keyPressed; -- Store the parameter in a local variable. print(key); -- Prints the pressed key to the console. -- We test if the correct key is pressed. if key == 82 then local player = getSpecificPlayer(0); -- Java: get player one local inv = player:getInventory(); -- Java: access player inv -- Java: add the actual items to the inventory inv:AddItem("neptune.NeptuneBag"); endend-- This will be fired whenever a key is pressed.Events.OnKeyPressed.Add(NeptuneHandler.addItems);
  3. PS:I saw the console.When I press Num 0, nothing happened.
  4. Hello everyone,I have some question about modding.My English is not good ,but I am working on it. .Lua script of mod how to load? I have read the 'how to use the modding loader'.But I still cant load my mod.This is structure of my mod. Zomboid |-- mods |-- NeptuneMod/ |-- poster.png |-- mod.info |-- media/ |-- lua/ |-- lua.lua |-- scripts/ |-- NeptuneCustomItems.txt and this is source of lua.lua local function addItems(_keyPressed) local key = _keyPressed; print(key); if key == 96 then local player = getSpecificPlayer(0); local inv = player:getInventory(); inv:AddItem("neptune.NeptuneBag"); endendEvents.OnKeyPressed.Add(addItems);and this is Source of NeptuneCustomItems.txt module neptune{ item NeptuneBag { WeightReduction = 90, Weight = 0.5, Type = Container, Capacity = 500, DisplayName = Neptune Bag, Icon = Duffelbag, CanBeEquipped = Back, OpenSound = PZ_OpenBag, CloseSound = PZ_CloseBag, PutInSound = PZ_PutInBag, }}I can find mod in mod manager and I can select it to green,But it not work,When I press the Num 0,nothing happened.So I want to know the Lua Script how to load in correct.I cant solve this problem by my self,I need help.QAQ Yours A China Player
×
×
  • Create New...