1. Multi Theft Auto: San Andreas 1.x

    1. Support for MTA:SA 1.x

      HELP! HELP! Need help? Post here.
      50,133
      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.

      5
      posts
    3. Open Source Contributors

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

      1,196
      posts
    4. Suggestions

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

      7,486
      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.

      471
      posts
  2. General MTA

    1. News

      News and updates on Multi Theft Auto.
      9,425
      posts
    2. Media

      User-made screens and movies go here.

      4,180
      posts
    3. Site/Forum/Discord/Mantis/Wiki related

      Share your comments & concerns about our services.

      5,152
      posts
    4. MTA Chat

      MTA related chat that is NOT support related!
      1,786
      posts
    5. 313,530
      posts
  3. MTA Community

    1. Scripting

      All Lua scripting topics related to Multi Theft Auto.

      245,381
      posts
    2. Maps

      Discussions for maps on various gamemodes.
      12,822
      posts
    3. Resources

      Everything else about resources.
      26,658
      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.

      1,592
      posts
    5. Competitive gameplay

      Discussions about various MTA-related competitive gameplay events. Also gang (clan) forums.
      26,784
      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.
      13,329
      posts
  4. Other

    1. General

      Non-MTA discussions. Anything you want.
      38,083
      posts
    2. Multi Theft Auto 0.5r2

      Discussion regarding Multi Theft Auto 0.5r2 for GTAIII and Vice City.
      613
      posts
    3. Third party GTA mods

      Showcase for single player mods and requests.
      768
      posts
  5. Archive

    1. 144,331
      posts
    2. Trash

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

    • local dim = getElementDimension(localPlayer) if dim ~= 0 then local px, py, pz = getElementPosition(localPlayer) if not (getDistanceBetweenPoints3D(arrestPoints[dim][1], arrestPoints[dim][2], arrestPoints[dim][3], px, py, pz) <= 7) then -- here is the error exports.s_alert:showAlert("error", "Nem vagy letartóztatási hely közelében.") return end end arrestPoints:   arrestPoints = { --[Int ID] = {X, Y, Z} [10] = {215.72779846191, 115.77359771729, 1000.2130737305}, [10] = {219.50369262695, 115.5871963501, 1000.0123291016}, [10] = {223.50689697266, 115.81269836426, 1000.3059082031}, [10] = {227.45030212402, 115.83280181885, 1000.3964233398}, }  
    • What does inspect to, thanks tho read my second reply does it do that? ------------------------------ -- Authors: IIYAMA and Kenix -- ------------------------------ local addEventHandler = addEventHandler; local removeEventHandler = removeEventHandler; local table_remove = table.remove; local unpack = unpack; local len = table.getn; local root = root; local renderEvents = { "onClientRender", "onClientPreRender", "onClientHUDRender" } local allTargetFunctions = {} -- All attached functions will be stored in this table. local acceptedRenderEventTypes = {} -- Is type in use? See: renderEvents. local renderEventTypeStatus = {} -- Is the event in use? (so it doesn't have to be attached again) do -- prepare the data for i=1, len( renderEvents ) do local event = renderEvents[i] allTargetFunctions[event] = {} acceptedRenderEventTypes[event] = true renderEventTypeStatus[event] = false end end -- render all events here local processTargetFunction = function ( timeSlice ) local targetFunctions = allTargetFunctions[ eventName ] local i = 1 local itemCount = len(targetFunctions) repeat if targetFunctions[ i ] == true then -- remove = true table_remove( targetFunctions, i ) itemCount = itemCount - 1 else local targetFunctionData = targetFunctions[i] local arguments = targetFunctionData[2] if not arguments then targetFunctionData[ 1 ]( timeSlice ) else if timeSlice then targetFunctionData[ 1 ]( timeSlice, unpack( arguments ) ) else targetFunctionData[ 1 ]( unpack( arguments ) ) end end i = i + 1 end until i > itemCount end -- check if a function is already attached function isRenderEventAdded (theFunction, event) if not event or not acceptedRenderEventTypes[event] then event = "onClientRender" end local targetFunctions = allTargetFunctions[event] for i = 1, len( targetFunctions ) do if targetFunctions[i] and targetFunctions[i] ~= true and targetFunctions[i][1] == theFunction then return true end end return false end local isRenderEventAdded = isRenderEventAdded -- add render event, default type is onClientRender function addRenderEvent(theFunction, event, ...) if not event or not acceptedRenderEventTypes[event] then event = "onClientRender" end if not isRenderEventAdded(theFunction) then local targetFunctions = allTargetFunctions[event] -- Don't pass an arguments if it not needed. local aArgs = { ... }; local mArgs = len( aArgs ) > 0 and aArgs or nil; targetFunctions[ len( targetFunctions ) + 1 ] = { theFunction, mArgs } -- attach an event if not renderEventTypeStatus[event] then addEventHandler (event, root, processTargetFunction, false, "high") renderEventTypeStatus[event] = true end return true end return false end -- remove a render event function removeRenderEvent(theFunction, event) if not event or not acceptedRenderEventTypes[event] then event = "onClientRender" end local targetFunctions = allTargetFunctions[event] for i = 1, len( targetFunctions ) do if targetFunctions[i] and targetFunctions[i] ~= true and targetFunctions[i][1] == theFunction then targetFunctions[i] = true -- true = remove if len( targetFunctions ) == 0 then if renderEventTypeStatus[event] then removeEventHandler (event, root, processTargetFunction) renderEventTypeStatus[event] = false end end return true end end return false end ----------------- function dxDrawRelativeText( text,posX,posY,right,bottom,color,scale,mixed_font,alignX,alignY,clip,wordBreak,postGUI ) local resolutionX = 1366 local resolutionY = 768 local sWidth,sHeight = guiGetScreenSize( ) return dxDrawText( tostring( text ), ( posX/resolutionX )*sWidth, ( posY/resolutionY )*sHeight, ( right/resolutionX )*sWidth, ( bottom/resolutionY)*sHeight, color, ( sWidth/resolutionX )*scale, mixed_font, alignX, alignY, clip, wordBreak, postGUI ) end function dxDrawRelativeRectangle( posX, posY, width, height,color,postGUI ) local resolutionX = 1366 local resolutionY = 768 local sWidth,sHeight = guiGetScreenSize( ) return dxDrawRectangle( ( posX/resolutionX )*sWidth, ( posY/resolutionY )*sHeight, ( width/resolutionX )*sWidth, ( height/resolutionY )*sHeight, color, postGUI ) end function dxDrawRelativeImage( posX, posY, width, height,link,r1,r2,r3,color,postGUI ) local resolutionX = 1366 local resolutionY = 768 local sWidth,sHeight = guiGetScreenSize( ) return dxDrawImage( ( posX/resolutionX )*sWidth, ( posY/resolutionY )*sHeight, ( width/resolutionX )*sWidth, ( height/resolutionY )*sHeight, ""..link, r1, r2, r3, color, postGUI ) end function dxDrawRelativeLine( posX, posY, width, height,color, size, postGUI ) local resolutionX = 1366 local resolutionY = 768 local sWidth,sHeight = guiGetScreenSize( ) return dxDrawLine( ( posX/resolutionX )*sWidth, ( posY/resolutionY )*sHeight, ( width/resolutionX )*sWidth, ( height/resolutionY )*sHeight, color, size, postGUI ) end function drawkeys(keys,key) local z1 = 0 for keyName, state in pairs(keys) do z1 = z1+90 dxDrawRelativeText(keyName, 0+z1, 455, 109, 469, tocolor(255, 255, 255, 255), 1.00, "default-bold", "center", "center", false, false, false, false, false) end dxDrawRelativeLine(86 - 1, 411 - 1, 86 - 1, 450, tocolor(254, 254, 254, 132), 1, false) dxDrawRelativeLine(303, 411 - 1, 86 - 1, 411 - 1, tocolor(254, 254, 254, 132), 1, false) dxDrawRelativeLine(86 - 1, 450, 303, 450, tocolor(254, 254, 254, 132), 1, false) dxDrawRelativeLine(303, 450, 303, 411 - 1, tocolor(254, 254, 254, 132), 1, false) dxDrawRelativeRectangle(86, 411, 217, 39, tocolor(0, 0, 0, 132), false) dxDrawRelativeImage(90, 411, 45, 39, ":SAEGTradeSystem/images/dmt.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawRelativeImage(145, 411, 45, 39, ":SAEGTradeSystem/images/pcp.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawRelativeImage(200, 411, 45, 39, ":SAEGTradeSystem/images/cocaine.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawRelativeImage(252, 411, 45, 39, ":SAEGTradeSystem/images/morphine.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) end addEvent("triggerKeys",true) addEventHandler("triggerKeys",root,function() controlName = "use" local keys = getBoundKeys ( controlName ) -- get the keys bound to this control if not keys then -- make sure the control name is valid and any keys are bound to it removeEventHandler("onClientRender",root,drawkeys) return end addRenderEvent(drawkeys,"onClientRender",keys,keys) end) I used your functions - they worked for rendering but its showing all keys binded to "use" command i just wanna find  ["Tires"]["Mask"]["Gas"]["Title"]
    • try  local command = string.sub(localMessage, 2, string.len(localMessage)) local arguments = table.concat(localMessage, " ") executeCommandHandler( command, thePlayer, arguments )   you can check this too    
    • when I type a command in T example: / kill it instead of executing the command it simply sends it to the server as a message, I want help fixing it.