Jump to content

Search the Community

Showing results for tags 'click'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Multi Theft Auto: San Andreas 1.x
    • Support for MTA:SA 1.x
    • User Guides
    • Open Source Contributors
    • Suggestions
    • Ban appeals
  • General MTA
    • News
    • Media
    • Site/Forum/Discord/Mantis/Wiki related
    • MTA Chat
    • Other languages
  • MTA Community
    • Scripting
    • Maps
    • Resources
    • Other Creations & GTA modding
    • Competitive gameplay
    • Servers
  • Other
    • General
    • Multi Theft Auto 0.5r2
    • Third party GTA mods
  • Archive
    • Archived Items
    • Trash

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Gang


Location


Occupation


Interests

Found 10 results

  1. Hello, I am making this post as a last resort towards my problem (If there are spelling errors, it is because I am writing this in Google Translate) My problem is about a bug (I want to believe) that the clicks do not respond, the alt+F4 does not work and I have to force MTA to close from the task manager I have tried many ways, but none of them have worked, I just hope this works.
  2. Fala pessoal, estou com um problema, eu coloquei o Butoon_Sair para sair do PAINEL GUI, mas se eu apertar em qualquer lugar da WINDOW, ela FECHA quando deveria fechar somente com o butoon_sair Esse é o: client.lua ----------------------------------------------------------------------------WINDOW local Janela_Agencia_Emprego = guiCreateWindow(0.22, 0.07, 0.54, 0.80, "", true) guiWindowSetMovable(Janela_Agencia_Emprego, false) guiWindowSetSizable(Janela_Agencia_Emprego, false) guiSetAlpha(Janela_Agencia_Emprego, 1.00) guiSetProperty(Janela_Agencia_Emprego, "CaptionColour", "FF1B0743") local Label_Top = guiCreateLabel(0.29, 0.11, 0.40, 0.09, "AGENCIA DE EMPREGO", true, Janela_Agencia_Emprego) guiSetFont(Label_Top, "clear-normal") guiLabelSetHorizontalAlign(Label_Top, "center", false) guiLabelSetVerticalAlign(Label_Top, "center") ----------------------------------------------------------------------------BUTOON local Butoon_Catador = guiCreateButton(0.01, 0.26, 0.27, 0.10, "CATADOR", true, Janela_Agencia_Emprego) guiSetProperty(Butoon_Catador, "NormalTextColour", "FFFFFFFF") local Butoon_Jornal = guiCreateButton(0.71, 0.26, 0.27, 0.10, "ENTREGADOR DE JORNAL", true, Janela_Agencia_Emprego) guiSetProperty(Butoon_Jornal, "NormalTextColour", "FFFFFFFF") local Butoon_Pedreiro = guiCreateButton(0.01, 0.38, 0.27, 0.10, "PEDREIRO", true, Janela_Agencia_Emprego) guiSetProperty(Butoon_Pedreiro, "NormalTextColour", "FFFFFFFF") local Butoon_Pescador = guiCreateButton(0.71, 0.38, 0.27, 0.10, "PESCADOR", true, Janela_Agencia_Emprego) guiSetProperty(Butoon_Pescador, "NormalTextColour", "FFFFFFFF") local Butoon_MotoBoy = guiCreateButton(0.01, 0.49, 0.27, 0.10, "MOTO BOY", true, Janela_Agencia_Emprego) guiSetProperty(Butoon_MotoBoy, "NormalTextColour", "FFFFFFFF") local Butoon_Gas = guiCreateButton(0.71, 0.49, 0.27, 0.10, "ENTREGADOR DE GÁS", true, Janela_Agencia_Emprego) guiSetProperty(Butoon_Gas, "NormalTextColour", "FFFFFFFF") local Butoon_Leite = guiCreateButton(0.01, 0.61, 0.27, 0.10, "ENTRAGADOR DE LEITE", true, Janela_Agencia_Emprego) guiSetProperty(Butoon_Leite, "NormalTextColour", "FFFFFFFF") local Butoon_Eletricista = guiCreateButton(0.71, 0.61, 0.27, 0.10, "ELETRICISTA", true, Janela_Agencia_Emprego) guiSetProperty(Butoon_Eletricista, "NormalTextColour", "FFFFFFFF") local Butoon_Caminhoneiro = guiCreateButton(0.01, 0.73, 0.27, 0.10, "CAMINHONEIRO", true, Janela_Agencia_Emprego) guiSetProperty(Butoon_Caminhoneiro, "NormalTextColour", "FFFFFFFF") local Butoon_Minerador = guiCreateButton(0.71, 0.73, 0.27, 0.10, "MINERADOR", true, Janela_Agencia_Emprego) guiSetProperty(Butoon_Minerador, "NormalTextColour", "FFFFFFFF") local Butoon_Sair = guiCreateButton(10, 532, 719, 59, "SAIR", false, Janela_Agencia_Emprego) guiSetProperty(Butoon_Sair, "NormalTextColour", "FFFFFFFF") guiSetVisible(Janela_Agencia_Emprego, false) ----------------------------------------------------------------------------COMANDOS local function Abrir_Painel() if not guiGetVisible(Janela_Agencia_Emprego) then guiSetVisible(Janela_Agencia_Emprego, true) showCursor(true) else guiSetVisible(Janela_Agencia_Emprego, false) showCursor(false) end end addEvent("Abrir_Painel", true) addEventHandler("Abrir_Painel", root, Abrir_Painel) ----------------------------------------------------------------------------FUNÇOES addEventHandler("onClientGUIClick", Butoon_Sair, function(tecla) if tecla == "left" then guiSetVisible(Janela_Agencia_Emprego, false) showCursor(false) end end)
  3. DX Button Create local nextOffset = centerX - 45 -- menü x pozisyonu for i, v in pairs(menu) do local textwidth = 150 -- yazının genişliği local textheight = 29 -- yazının yüksekliği local posX = nextOffset local posY = centerY + 315 -- menü y pozisyonu local endX = posX + textwidth local endY = posY + textheight table={bir=posX,iki=posY,uc=endX,dort=endY} dxDrawRectangle(posX-5, posY-3, 150, 29, (isCursorHover(posX-5, posY-3, endX, endY) and tocolor(0, 0, 0, 170) or tocolor(0, 0, 0, 200))) dxDrawText(v.name, posX, posY, endX, endY, (isCursorHover(posX, posY, endX, endY) and tocolor(255, 135, 0) or v.color), 1.5, 1.5, font, "center") nextOffset = nextOffset + textwidth end How to click dynamic DX items function buttonClick(button, state) for i, v in pairs(table) do if (v) then if not isCursorHover(v.bir, v.iki, v.uc, v.dort) then return false end if button == "left" and state == "down" then if v == 1 then outputChatBox("Login") end if table == 1 then outputChatBox("Register") end end end end end addEventHandler ("onClientClick", getRootElement(), buttonClick) function isCursorHover(posX, posY, sizeX, sizeY) if ( not isCursorShowing( ) ) then return false end local cX, cY = getCursorPosition() local screenWidth, screenHeight = guiGetScreenSize() local cX, cY = (cX*screenWidth), (cY*screenHeight) return ( (cX >= posX and cX <= posX+(sizeX - posX)) and (cY >= posY and cY <= posY+(sizeY - posY)) ) end
  4. Olá pessoal do fórum, queria fazer um sistema de que quando eu clicasse no meu personagem iniciava uma função exp: abrir um painel cegui - realmente não sei por onde começar, também não quero o script pronto quero aprender e fazer do 0, quem poder me ajudar por favor agradeço desde já.
  5. I've been working on a script that realistically manipulates the wheels. I've gotten to the point I can hide the original wheels, in hopes I can later attach a new set in the same place. I'm aware I might have to use attachElements, and several other functions. For the moment, I'd like to attach a single wheel. I've got this: -- All GUI elements. local vehicle = getPedOccupiedVehicle(localPlayer) local x1, y1, z1 = getVehicleComponentPosition(vehicle, "wheel_lf_dummy") local x2, y2, z2 = getVehicleComponentPosition(vehicle, "wheel_rf_dummy") local x3, y3, z3 = getVehicleComponentPosition(vehicle, "wheel_lb_dummy") local x4, y4, z4 = getVehicleComponentPosition(vehicle, "wheel_rb_dummy") local function replace1 () attachElements (1097, vehicle, x1, y2, z1, 0, 0, 0) end addEventHandler ("onClientGUIClick", set1, replace1, false) -- Function runs when button called 'set1' is clicked. -- Everything else. Here's my thought process: First, I get the player's vehicle. Then, I get the position of all four wheels in the player's vehicle, and represent them with x1, y1 and z1. With all wheels hidden by another function, I then attach the wheel model in the same place as the front left wheel. At the moment, I'm only aiming at the position; I'll handle the rotation later. DB 3 can't identify '1097', and thus asks for a valid element. Am I on the right path?
  6. Olá Pessoal, como fazer para clicar em um veículo e receber no chat uma localização da roda dele? Já tenho a ideia de como usar o getVehicleComponentPosition (algo do lado do cliente), mas como identificar ou veicular o que estou tentando ver no OnElementClicked é do lado Server? function rodadireita (source) local vehicle = --Queria por aqui o veiculo que estou clicando x, y, z = getVehicleComponentPosition ( vehicle , "wheel_rf_dummy", "world") outputChatBox ( "Cordenadas:"..x..", "..y..", "..z, 255, 255, 255, true ) end
  7. Hey guys i saw many servers have a resource make staff/Moderators able to warp using F11 map, by clicking anywhere on the map they will warp there.. like mta freeroam map warping.... So if someone have this resource pls gimme it... I want it fast, Thnx
  8. i created a dx panel, and i created some onClientClick event for this panel. but when i hide the panel, the onClientClick events are working.. how to fix this?
  9. i am looking for example of dx button (rectangle/text). I tried to find info at forum/wiki but nothing understood(( Example (some code show/hide dx window+img+rectangle+text using key "i") --have it (code that spawns car/changes skin on clicked dx rectangle/text --Nothing of it(( local rectangleData = { x = 0, y = 0, width = 100, height = 20 } addEventHandler ( "onClientRender", root, function ( ) dxDrawRectangle ( rectangleData.x, rectangleData.y, rectangleData.width, rectangleData.height, tocolor ( 0, 0, 0, 120 ) ) end ) addEventHandler ( "onClientClick", root, function ( _, _, x, y ) if ( x >= rectangleData.x and x <= rectangleData.x + rectangleData.width and y >= rectangleData.y and y <= rectangleData.y + rectangleData.height ) then outputChatBox ( "On rectangle click!" ) end end ) I found this code but it is long and execute twice in game (noob lvl of lua + russian=poor english+stupid questions sry :3 )
  10. Hi everyone! Can someone help me that, if I click on specified object, then run a function named "startit1"
×
×
  • Create New...