• Announcements

    • jhxp

      Forums are online again after a maintenance.   18/03/17

      MTA Forums maintenance is completed, although some automatic time-heavy tasks are still in process and will be finished eventually in background. Expect some features such as Forum Search to not display all results until all processes are finished. Please let us know if you spot a forum feature that worked correctly before the maintenance but does not work anymore now. Thanks. --MTA Team
    • jhxp

      Multi Theft Auto: San Andreas 1.5.4 is out!   21/04/17

      Click the link in the announcement for more details.  


  • Content count

  • Joined

  • Last visited

  • Days Won


Necktrox last won the day on January 10

Necktrox had the most liked content!

Community Reputation

14 Decent


About Necktrox

  • Rank
  • Birthday 22/11/95


  • Gang
  • Location
  • Interests

Recent Profile Visitors

487 profile views
  1. You should use the following URL for Soundcloud application registration: http://soundcloud.com/you/apps/new. vmuzice.com is not available in my country and you don't escape search queries. The resource doesn't require the entire admin ACL range, you can put it into RPC or use aclrequest in meta.xml.
  2. Learn to read. https://github.com/Necktrox/mta-discord-bot
  3. You can make your own script, which is loaded before the encrypted script. You can overwrite functions in your own script to output the URL in debug and then spoof the result whenever the encrypted script does a callRemote. -- Store the original function local _callRemote = callRemote -- Overwrite the global function for our purpose function callRemote(url, a, b, c, d, ...) outputDebugString(("callRemote(%q, ...)"):format(url)) -- Should we spoof the result? if url ~= "<url which returns ip>" then return _callRemote(url, a, b, c, d, ...) end -- callRemote(url, callback) if type(a) == "function" then return callback("<fake data from url>", 200, b, c, d, ...) end -- callRemote(url, attempts, callback) if type(b) == "function" then return callback("<fake data from url>", 200, c, d, ...) end -- callRemote(url, attempts, timeout, callback) if type(c) == "function" then return callback("<fake data from url>", 200, d, ...) end -- callRemote(url, queueName, attempts, timeout, callback) if type(d) == "function" then return callback("<fake data from url>", 200, ...) end end
  4. Unable to edit my previous post. Anyway, there are two functions, which might do what you want: saveMapData and loadMapData
  5. function splitf(input, separator) local output = split(input, separator) for index = 1, #output do local fragment = output[index] if fragment:match("^%d") then output[index] = tonumber(fragment:match("^%d+%.?%d+")) end end return output end Example: output = {"Hello", "123", "World", "123prefix", "3.141wtf", "suffix456"} 1 Hello string 2 123 number 3 World string 4 123 number 5 3.141 number 6 suffix456 string
  6. What you want is data serialization. There are different ways to store information e.g. in files, in memory, in databases etc. You should consider that other servers might want to store other useful information about elements (e.g. you might store the owner of the vehicle) and each of these servers use a different method to store the information. You have the Lua language and the MTA functions to make your own serialization structure. You can go ahead, make a serialization "library" for MTA and release it for others.
  7. The map editor is working in the dimension 200, that's not a bug. Why do you need an other dimension in the map editor? https://github.com/multitheftauto/mtasa-resources/blob/master/[editor]/editor_main/workingdimension.lua
  8. --[[ Draw a fancy bounding box: c-----d |\ /| | \ / | | x | | / \ | |/ \| a-----b ]] local minX, minY, minZ, maxX, maxY, maxZ = vehicle:getBoundingBox() local a = vehicleMatrix:transformPosition(Vector3(minX, minY, maxZ)) drawTextOnWorldPosition("a", a) local b = vehicleMatrix:transformPosition(Vector3(maxX, minY, maxZ)) drawTextOnWorldPosition("b", b) local c = vehicleMatrix:transformPosition(Vector3(minX, maxY, maxZ)) drawTextOnWorldPosition("c", c) local d = vehicleMatrix:transformPosition(Vector3(maxX, maxY, maxZ)) drawTextOnWorldPosition("d", d) dxDrawLine3D(c, d, 0xFFFF0000, 1.0) dxDrawLine3D(a, b, 0xFFFF0000, 1.0) dxDrawLine3D(c, a, 0xFFFF0000, 1.0) dxDrawLine3D(d, b, 0xFFFF0000, 1.0) dxDrawLine3D(a, d, 0xFFFF0000, 1.0) dxDrawLine3D(b, c, 0xFFFF0000, 1.0) function drawTextOnWorldPosition(text, vecPosition) local x, y = getScreenFromWorldPosition(vecPosition) if x and y then dxDrawText(text, x, y, nil, nil, 0xFFFFFFFF, 2.0, "default-bold", "center", "center") end end You didn't tell me what you want to do, my previous code segment only solved the question in the first post.
  9. You need OOP enabled: function getElementRotatedBoundingBox(element) local elementMatrix = element:getMatrix() local minX, minY, minZ, maxX, maxY, maxZ = element:getBoundingBox() local minVector = elementMatrix:transformPosition(Vector3(minX, minY, minZ)) local maxVector = elementMatrix:transformPosition(Vector3(maxX, maxY, maxZ)) return minVector, maxVector end
  10. Look at the repository, it has a Makefile e.g. in ml_system. https://github.com/multitheftauto/multitheftauto-modules
  11. addEventHandler("onClientPlayerSpawn", root, function () setPedCanBeKnockedOffBike(source, false) end ) This would prevent any player to be knocked off his bike. Furthermore, this snippet is clientside, because setPedCanBeKnockedOffBike is a clientside-only function.
  12. You have to use cancelEvent in the onPlayerChat event if messageType == 1 and place your /me related code there.
  13. You are missing the socket module for your MTA server. There is a check in place to prevent starting the resource without it, which you probably circumvented, because the resource stops immediately if it's not available.
  14. 1 second 1 minute = 60 seconds 1 hour = 60 minutes = 3600 seconds 1 day = 24 hours = 1440 minutes = 86400 seconds 1 month = 31 days = 744 hours = 44640 minutes = 2678400 seconds 1 year = 12 months = 365 days = 8760 hours = 525600 minutes = 31536000 seconds
  15. https://github.com/Necktrox/mta-discord-bot/commit/da6cd936a57ef106b2c612fd7dec0bc893de216c Fixed, I didn't test this part of the code, because I modified my config to include the "Bot " prefix and never tested it without it. Sorry for any inconvenience.