Jump to content

Forums

  1. Multi Theft Auto: San Andreas 1.x

    1. Support for MTA:SA 1.x

      HELP! HELP! Need help? Post here.

      54.9k
      posts
    2. User Guides

      These guides are a good place to start learning how to achieve certain things within MTA in an efficient and well mannered way.

      11
      posts
    3. Open Source Contributors

      This space is for contributors to discuss the development of MTA. No user suggestions/support.

      1.3k
      posts
    4. Suggestions

      Suggestions and requests go here. Please note that actual feature requests must be filed on our GitHub.

      7.7k
      posts
    5. Ban appeals

      Use this forum to appeal your GLOBAL MTA:SA bans. Permanent bans only - appeals for timed ones (eg. 24 hours) will be refused.

      Do not use it for appealing server-specific bans as we do not have power over these specific servers.

      4.6k
      posts
  2. General MTA

    1. News

      News and updates on Multi Theft Auto.

      9.8k
      posts
    2. Media

      User-made screens and movies go here.

      4.5k
      posts
    3. Site/Forum/Discord/Mantis/Wiki related

      Share your comments & concerns about our services.

      5.6k
      posts
    4. MTA Chat

      MTA related chat that is NOT support related!

      2.1k
      posts
    5. 330.3k
      posts
  3. MTA Community

    1. Scripting

      All Lua scripting topics related to Multi Theft Auto.

      261.2k
      posts
    2. Maps

      Discussions for maps on various gamemodes.

      13.4k
      posts
    3. Resources

      Everything else about resources.

      28.6k
      posts
    4. Other Creations & GTA modding

      This section includes things such as GUI themes, forum userbars, user-created MTA logos, etc. Also contains topics which cover general GTA modding areas that can be used in MTA, such as modelling.

      2.5k
      posts
    5. Competitive gameplay

      Discussions about various MTA-related competitive gameplay events. Also gang (clan) forums.

      26.7k
      posts
    6. Servers

      Looking for a server to play on? Looking for someone to host your server? Looking for a place to discuss with other server owners? Here's where to look.

      15.6k
      posts
  4. Other

    1. General

      Non-MTA discussions. Anything you want.

      38.1k
      posts
    2. Multi Theft Auto 0.5r2

      Discussion regarding Multi Theft Auto 0.5r2 for GTAIII and Vice City.

      672
      posts
    3. Third party GTA mods

      Showcase for single player mods and requests.

      812
      posts
  5. Archive

    1. 144k
      posts
    2. Trash

      These posts have broken forum rules. They are stored here temporarily so offending users can see what they have done wrong.

      2.6k
      posts
  • Posts

    • function ItemMove() for i, slot in ipairs(slots) do if isMouseInPosition(sx * slot[1], sy * slot[2], sx * slot[3], sy * slot[4]) then slots[DragNDrop[2]][5], slot[5] = slot[5], slots[DragNDrop[2]][5] local itemId = slots[DragNDrop[2]][5][1] if itemId and slots[DragNDrop[2]][5][2] > items[itemId][3] then print("Stack overflow in slot", DragNDrop[2]) end DragNDrop = nil return end end slots[DragNDrop[2]][5] = DragNDrop[1] DragNDrop = nil end ddEventHandler("onClientClick", root, function(Button, State) if IsInvShow then for i, slot in ipairs(slots) do if isMouseInPosition(sx * slot[1], sy * slot[2], sx * slot[3], sy * slot[4]) then if Button == "right" and State == "down" and slot[5][1] then ClickOnItem(slot[5], i) return elseif Button == "left" then if not slot[5][1] then if State == "down" then WindowMove = {getCursorPosition() - InvPos[1], getCursorPosition() - InvPos[2]} else WindowMove = {false, false} end else if State == "down" then DragNDrop = {slot[5], i} slot[5] = {false} elseif DragNDrop then ItemMove() end end end return end end end end)  
    • ddEventHandler("onClientClick", root, function(Button, State) if IsInvShow then for i, slot in ipairs(slots) do if isMouseInPosition(sx * slot[1], sy * slot[2], sx * slot[3], sy * slot[4]) then if Button == "right" and State == "down" then if slot[5][1] then ClickOnItem(slot[5], i) break end else if not slot[5][1] then if Button == "left" and State == "down" then local x, y = getCursorPosition() WindowMove = {x - InvPos[1], y - InvPos[2]} else WindowMove = {false, false} end else if Button == "left" and State == "down" then DragNDrop = {slot[5], i} slot[5] = {false} else if DragNDrop[1] then ItemMove() end end end end end end end end) This is how I call the function --slot, ID, stack {1, 1, 1, ""} This is the content of the slot table
    • Hello, you will have to paste a good chunk of you code for better support.   Greetings.

Twitter Feed

×
×
  • Create New...