Jump to content

The_GTA

Helpers
  • Posts

    816
  • Joined

  • Last visited

  • Days Won

    81

The_GTA last won the day on June 24

The_GTA had the most liked content!

About The_GTA

  • Birthday 03/01/1993

Member Title

  • Forum Helper

Details

  • Gang
    developers
  • Location
    GTA community
  • Occupation
    modding the game
  • Interests
    meow

Recent Profile Visitors

5,475 profile views

The_GTA's Achievements

Hoodsta

Hoodsta (34/54)

  • Helpful Rare

Recent Badges

408

Reputation

  1. I am happy to hear that! Have fun with this project. I agree. This workflow seems really complicated. Not much I can do about that though on the module's end. We know the steps of adjusting the server configuration and adding the binary. But I hope that people are willing to get into stuff that seems new to them!
  2. Yes, you can read files inside of any resource and adjust the meta.xml files according to rules. Be careful and do not add the same file twice. Also think about removing meta.xml entries whose files do not exist anymore.
  3. I would like to see a modloader that uses the scanDir API instead of the meta.xml. Also a personal webspace on the MTA server for user-submitted mods could be cool.
  4. Hello MTA developers, today I have added the Linux version of the FileSystem 2.0 release. I am sorry for the delay - caused by unnecessaringly technical and motivational factors - but this release is the most stable Linux version yet. It is made possible by directly linking to the deathmatch.so Linux module so that fileSystem.so does use the actual Lua implementations exported by MTA. I was unable to get a LuaRocks version ready because I do not understand how to integrate my custom Code::Blocks build system into it. If there is sufficient interest and straight-forward help I might deliver that too. Wouldn't want to disrespect the hard-effort by qaisjp and co. Only AMD 64bit is supported. Hit me up if you need any other platform. Download it here: https://green-candy.osdn.jp/external/releases/fileSystem_2_0_linux.zip Have fun!
  5. local function invMoveSlots(sinv, sslot, tinv, tslot) if not sslot or not tslot or not sinv or not tinv then return end local selectedSlot1 = sinv.items[sslot] local selectedSlot2 = tinv.items[tslot] sinv.items[sslot] = selectedSlot2 tinv.items[tslot] = selectedSlot1 end local isdragging = false; local draginv = false; local dragslot = false; local slotrender = false; function Inventory:drag(button,state,mouseX,mouseY) if button == 'left' then if state == 'down' then if (isdragging == false) then self.getSlotInfo = {self:getSlot(mouseX,mouseY)} firsSlot = self.getSlotInfo[4] if (firsSlot) then isdragging = true; draginv = self; dragslot = firsSlot; slotrender = self.fSlot; addEventHandler('onClientRender',root,self.fSlot) end end end if state == 'up' then if (isdragging) then self.getSlotInfo = {self:getSlot(mouseX,mouseY)} print(self.getSlotInfo[4]) if (self.getSlotInfo[4]) then invMoveSlots(draginv, dragslot, self, self.getSlotInfo[4]) end removeEventHandler('onClientRender',root,slotrender) isdragging = false; draginv = false; dragslot = false; slotrender = false; end end end end Your system is fundamentally flawed because it does not contain the global inventory list but you are ignoring my messaging so I won't remind you any further.
  6. Definition of the bind function? Actual error message?
  7. Yea so what? What is your fSlot anyway? Are you being serious?
  8. local function invMoveSlots(sinv, sslot, tinv, tslot) if not sslot or not tslot or not sinv or not tinv then return end local selectedSlot1 = sinv.items[sslot] local selectedSlot2 = tinv.items[tslot] sinv.items[sslot] = selectedSlot2 tinv.items[tslot] = selectedSlot1 end local isdragging = false; local draginv = false; local dragslot = false; local slotrender = false; function Inventory:drag(button,state,mouseX,mouseY) if button == 'left' then if state == 'down' then self.getSlotInfo = {self:getSlot(mouseX,mouseY)} firsSlot = self.getSlotInfo[4] if (firsSlot) then isdragging = true; draginv = self; dragslot = firsSlot; slotrender = self.fSlot; addEventHandler('onClientRender',root,self.fSlot) end end if state == 'up' then if (isdragging) then self.getSlotInfo = {self:getSlot(mouseX,mouseY)} print(self.getSlotInfo[4]) if (self.getSlotInfo[4]) then invMoveSlots(draginv, dragslot, self, self.getSlotInfo[4]) end removeEventHandler('onClientRender',root,slotrender) isdragging = false; draginv = false; dragslot = false; slotrender = false; end end end end This is just an example and does not contain the code for cross inventory dragging. You have to implement the list of inventories to do it.
  9. Oh, I remember. How about moveSlots?
  10. I don't see any fundamental design problems in your code. But you seem to have trouble with taking the right parameter to the right place. What does the getSlot method do and how is it defined?
  11. What should work? Can you describe it?
  12. I think that with "clicking" you are not referring to the repeat motion of clicking the mouse button BUT the motion of leaving your finger on the mouse button clicked? You can query this information using the getKeyState function by passing the "mouse1" string to it for the left mouse button, "mouse2" for the right mouse button.
  13. What do you mean? If you execute the on click handler then a click has happened. Please rephrase your question or show details.
  14. Glad to hear that you got it working! You're welcome. Come back if you have any further questions.
  15. Put all inventories into a list, iterate over them in the mouse click handler and check which one has a defined rectangle item slot at the current mouse position. Store the successful inventory in a variable and retrieve it's type field to check which one it is.
×
×
  • Create New...