Jump to content

botder

MTA Team
  • Posts

    524
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by botder

  1. Should be possible. Simply store about 20 messages for each tab for a certain amount of time serverside. That is not really useful and would only cause a lot traffic to transfer the messages across the clients. Nothing to say here.
  2. You can follow the refactoring in the dev branch
  3. Do you want to add an static image as GUI window background or something else?
  4. The tooltips shouldn't appear immediately after entering a GUI element. Furthermore, you could remove the "Language" and "Help Mode" buttons and stick static images to the title bar (these static images should have no parent and should always be on top/behind when you Focus/Blur the window) and add a dropdown for the language selection (maybe hide every element in the window and show only a dropdown box)
  5. botder

    [HELP] Tables

    Looks almost like my code except you are limited to 1 "backpack/table" with data.
  6. Line 25 outputChatBox(" - Transportlīdzekļa nosaukums: "..getVehicleNameFromModel( getElementModel( source ) ).."" ) Replacement local model = getElementModel( source ) outputChatBox(" - Transportlīdzekļa nosaukums: ".. ( CarNames[model] or getVehicleNameFromModel( model ) ) .."" ) Line 33 table.insert(content, {" - Transportlīdzekļa nosaukums: "..getVehicleNameFromModel( getElementModel( source ) ).."" } ) Replacement: local model = getElementModel( source ) table.insert(content, {" - Transportlīdzekļa nosaukums: "..( CarNames[model] or getVehicleNameFromModel( model ) ).."" } )
  7. Is it possible that you may upload your scripts to GitHub, if you have no problem with that?
  8. botder

    [HELP] Tables

    Not sure if you are going to like that style (because of metatable usage - advanced sh0t) Backpack = { } function Backpack:create() local new = { items = { } } return setmetatable(new, {__index = Backpack}) end function Backpack:add(item, amount) self.items[item] = math.max(0, (self.items[item] or 0) + amount) end function Backpack:remove(item, amount) self.items[item] = math.max(0, (self.items[item] or 0) - amount) end function Backpack:drop(item) self.items[item] = nil end function Backpack:getItems() local copy = { } for item, amount in pairs(self.items) do copy[item] = amount end return copy end function Backpack:getItemCount(item) local count = (self.items[item] or 0) return count end function Backpack:hasItem(item) local count = self:getItemCount(item) return (count > 0) end -- Example example = Backpack:create() example:add("apple", 3) example:add("apple", 3) example:add("apple", 3) example:add("banana", 2) example:add("cherry", 4) -- Gather every item collected local items = example:getItems() -- Show items in chatbox for name, amount in pairs(items) do outputChatBox("* ".. name .. ": " .. amount) end Result: * banana: 2 * apple: 9 * cherry: 4
  9. Use guiLabelSetHorizontalAlign and use guiLabelSetVerticalAlign
  10. It's not only about debugging resource warnings/errors/bugs, you can also use it to show useful information when something happens without editing the resource (which output the debug message). And that's where the debugconsole has it advantage - you can seperate the messages into tabs.
  11. The regular debugscript does a great job if you are not going to spam it from different sources.
  12. You can escape the special characters with a "%" prefix (e.g. "%%s", "%%", "%.")
  13. http://wiki.roblox.com/index.php?title=String_pattern Check that page out
  14. That happens because e.g. "%" is a part of a pattern http://lua-users.org/wiki/PatternsTutorial
  15. botder

    [HELP] Tables

    He wants to prevent "spam" - in his example there is 2x "apple" and he wants to output it only once.
  16. botder

    [HELP] Tables

    Make a new function (table.find) to search trough your table if there is an index with the same message.
  17. I didn't do much in the last time (to be honest, nothing yet). Was only thinking about how to split the code actually and keep it simple (the current version is a 774 line long piece of code in one file). What I am going to add + Resize (still not sure) + Tabmoving (e.g. split debug into 2+ windows with different tabs) + Remove the long "Server/Client" and time indicators + Add right-click-action for messages (where you can see some info (time received, server/client) in a hover-window) + Prevent spamming + Make scrollwheel jump page-wise Should I add logging for the custom tabs, because right now only the default tabs (info, warning, error) have the MTA file-logging available.
  18. botder

    fetchremote

    You don't even read the API documentation right? Read the first 3 lines from the link I gave you. Hint: This section presumes you have: Registered your App
  19. botder

    fetchremote

    Use the Soundcloud API (and if soundcloud doesn't deliver mp4 format then you have to convert the stream)
  20. botder

    Fps

    You could use SetFPSLimit clientside.
  21. Looks nice, but your dependency is pretty useless for that library and you could have added that on your own with metatables.
  22. Do you mean your selection (with blue background) is much lower than the visible list?
×
×
  • Create New...