Jump to content

Search the Community

Showing results for tags 'button'.

  • 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 8 results

  1. GUIEditor = { gridlist = {}, staticimage = {} } addEventHandler("onClientResourceStart", resourceRoot, function () local screenW, screenH = guiGetScreenSize() win = guiCreateStaticImage((screenW - 554) / 2, (screenH - 477) / 2, 554, 477, "s/panel.png", false) guiSetVisible(win,false) local screenW2, screenH2 = guiGetScreenSize() PlayerList = guiCreateStaticImage((screenW2 - 342) / 2, (screenH2 - 415) / 2, 342, 415, "s/PlayerList.png", false) guiSetVisible(PlayerList,false) GridPlayer = guiCreateGridList(23, 59, 188, 346, false, PlayerList) c = guiGridListAddColumn(GridPlayer, "Player", 0.9) SendWe = guiCreateStaticImage(215, 59, 101, 32, "s/SendWe.png", false, PlayerList) Close = guiCreateStaticImage(215, 117, 101, 32, "s/Close.png", false, PlayerList) GUIEditor.staticimage[1] = guiCreateStaticImage(216, 315, 104, 90, "s/logo.png", false, PlayerList) for _,player in ipairs ( getElementsByType("player") ) do local row = guiGridListAddRow(GridPlayer) guiGridListSetItemText(GridPlayer,row,1,getPlayerName(player),false,false) end Grid = guiCreateGridList(16, 71, 277, 400, false, win) guiGridListAddColumn(Grid, "name", 0.2) guiGridListAddColumn(Grid, "id", 0.2) guiGridListAddColumn(Grid, "ammo", 0.2) guiGridListAddColumn(Grid, "price", 0.2) for k,v in ipairs(Weapons) do local row = guiGridListAddRow(Grid) guiGridListSetItemText(Grid,row,1, v[1],false,false) guiGridListSetItemText(Grid,row,2, v[2],false,false) guiGridListSetItemText(Grid,row,3, v[3],false,false) guiGridListSetItemText(Grid,row,4, v[4],false,false) guiGridListSetItemText(Grid,row,5, v[5],false,false) guiGridListSetItemText(Grid,row,6, v[6],false,false) guiGridListSetItemText(Grid,row,7, v[7],false,false) guiGridListSetItemText(Grid,row,8, v[8],false,false) guiGridListSetItemText(Grid,row,9, v[9],false,false) guiGridListSetItemText(Grid,row,10, v[10],false,false) guiGridListSetItemText(Grid,row,11, v[11],false,false) guiGridListSetItemText(Grid,row,12, v[12],false,false) guiGridListSetItemText(Grid,row,13, v[13],false,false) Close1 = guiCreateStaticImage(215, 117, 101, 32, "s/Close.png", false, win) -- I want it to close the window. I tried several ways but no result. Buy = guiCreateStaticImage(320, 95, 200, 60, "s/Buy.png", false, win) Send = guiCreateStaticImage(320, 224, 200, 60, "s/Send.png", false, win) GUIEditor.staticimage[4] = guiCreateStaticImage(352, 339, 170, 132, "s/logo.png", false, win) end end) I want it to close the window. I tried several ways but no result.
  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. So first I tried on top-left: window = guiCreateWindow(800, 290, 500, 500, "Testing", false) closeBut = guiCreateButton(0, 0, 22, 19, "X", false, window) guiSetProperty(closeBut, "ClippedByParent", "False") guiSetProperty(closeBut, "AlwaysOnTop", "True") It looks like this: Now, I'm used to it on the right just like most operating systems, it just doesn't look right to me, so I tried taking it to the top right of the window.. window = guiCreateWindow(800, 290, 500, 500, "Testing", false) closeBut = guiCreateButton(800-22-5, 0, 22, 19, "X", false, window)--X position set to 800-button width guiSetProperty(closeBut, "ClippedByParent", "False") guiSetProperty(closeBut, "AlwaysOnTop", "True") It took me an hour to figure out that the button is that far above ? Now, I tried to see how I could make it go lower: window = guiCreateWindow(800, 290, 500, 500, "Testing", false) closeBut = guiCreateButton(160-19, 0, 22, 19, "X", false, window) --Here I tried to make it on one-quarter 1/4 guiSetProperty(closeBut, "ClippedByParent", "False") guiSetProperty(closeBut, "AlwaysOnTop", "True") Of course, I tried changing its 'Y' position, to end up between 2 numbers that were the reason I'm asking for aid: window = guiCreateWindow(800, 290, 500, 500, "Testing", false) closeBut = guiCreateButton(160-19, 8, 22, 19, "X", false, window)--Kept on one-quarter but with 'Y' position as 8 guiSetProperty(closeBut, "ClippedByParent", "False") guiSetProperty(closeBut, "AlwaysOnTop", "True") window = guiCreateWindow(800, 290, 500, 500, "Testing", false) closeBut = guiCreateButton(160-19, 9, 22, 19, "X", false, window)--Kept on one-quarter but with 'Y' position as 9 guiSetProperty(closeBut, "ClippedByParent", "False") guiSetProperty(closeBut, "AlwaysOnTop", "True") I don't want to use onClientRender for CPU usage and a button without parent means its on top of the guiRoot and if you open more than 1 window, those buttons will be on top of everything.. I tried using labels, worked perfectly. And the rest? Static images, edits, combo box, checkbox, radio button, grid list, memo, progress bar, scroll bar and tab panel have the same problem as the button takes the same position as all these pictures.. Anyone knows what should I do? I don't want to place the button on top-left neither use a label as button..
  4. My goal is that when the player clicks on the first button, the function for this button is to change for each player in his team, but unfortunately the function changes only for the person who clicked. --client side local Button1 = guiCreateButton(--There are no valid arguments ) addEventHandler("onClientGUIClick", Button1, OnTeamPlayerClickLVL1) function OnTeamPlayerClickLVL1() for i, v in pairs(getPlayersInTeam(getPlayerTeam(getLocalPlayer()))) do outputChatBox("U bought level 1 for your TEAM ^^", 0, 255, 0) removeEventHandler("onClientGUIClick", Button1, OnTeamPlayerClickLVL1) addEventHandler("onClientGUIClick", Button1, OnTeamPlayerClickLVL2) end end function OnTeamPlayerClickLVL2() for i, v in pairs(getPlayersInTeam(getPlayerTeam(getLocalPlayer()))) do outputChatBox("U bought level 2 for your TEAM ^^", 0, 255, 0) removeEventHandler("onClientGUIClick", Button1, OnTeamPlayerClickLVL2) end end -- server side RED = createTeam("Red Team", 255, 0, 0) BLUE = createTeam("Blue Team", 0, 0, 255) Here is my code that works only for ONE person and I want for the current team
  5. redditing

    Button

    -- Client Side Button = guiCreateButton(0.45, 0.54, 0.10, 0.06, "Get Value", true) guiSetProperty(Button, "NormalTextColour", "FFAAAAAA") guiSetVisible(Button, false) EditBox= guiCreateEdit(0.41, 0.45, 0.18, 0.04, " chcesz tego kupić sztuk?", true) guiSetProperty(EditBox, "NormalTextColour", "FFFF0000") guiEditSetMaxLength(EditBox, 3) guiSetVisible(EditBox, false) addEventHandler("onClientGUIClick", Button function() local inputBox = tonumber(guiGetEdit(EditBox)) if inputBox==0 then outputChatBox("U set value input "..inputBox, 255, 255, 0) end end) -- Another Client Side addCommandHandler("TurnOnButton", function() guiSetVisible(Button, true) guiSetVisible(EditBox, true) end) I don't know what's wrong, but when I type the command 'TurnOnButton' I can't click the button and the editBox as if they didn't exist
  6. Can you give me a code to take a car from a button in a window? Meaning, I want to press button 1 and take a car. pleaseee in arabic : شباب ممكن كود يعني اضغط على زر من نافذة ويعطيني سيارة . بيللييز
  7. Hi guys,im stuck here... I want when i press on GUIEditor.button[1] it sends that i typed in GUIEditor.edit[1] to selected player.. --client GUIEditor = { edit = {}, button = {}, window = {}, label = {}, gridlist = {} } addEventHandler("onClientResourceStart", resourceRoot, function() local screenW, screenH = guiGetScreenSize() GUIEditor.window[1] = guiCreateWindow((screenW - 528) / 2, (screenH - 183) / 2, 528, 183, "dm panel - gat", false) guiWindowSetSizable(GUIEditor.window[1], false) GUIEditor.gridlist[1] = guiCreateGridList(29, 32, 186, 142, false, GUIEditor.window[1]) local column = guiGridListAddColumn(GUIEditor.gridlist[1], "players", 0.9) GUIEditor.button[1] = guiCreateButton(247, 107, 271, 60, "DM", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFAAAAAA") GUIEditor.edit[1] = guiCreateEdit(247, 32, 269, 65, "", false, GUIEditor.window[1]) GUIEditor.label[1] = guiCreateLabel(216, 63, 31, 15, "close", false, GUIEditor.window[1]) for id, player in pairs(getElementsByType("player")) do local row = guiGridListAddRow ( GUIEditor.gridlist[1]) guiGridListSetItemText ( GUIEditor.gridlist[1], row, column, getPlayerName ( player ), false, false ) guiSetVisible(GUIEditor.window[1], false ) end end ) function show () if guiGetVisible(GUIEditor.window[1] ) then guiSetVisible(GUIEditor.window[1], false ) showCursor (false) else guiSetVisible(GUIEditor.window[1], true ) showCursor (true) end end addCommandHandler("dm", show) function clickin () if source == GUIEditor.label[1] then guiSetVisible(GUIEditor.window[1], false ) showCursor (false) elseif source == GUIEditor.button[1] then if guiGetText(GUIEditor.edit[1] ) == "" then return end --im stoped here, showCursor (false) guiSetVisible(GUIEditor.window[1], false ) end end addEventHandler("onClientGUIClick", root, clickin)
  8. My code at the end contains button variables but it defines in 2 cases: 1 - as button1 variable 2 - creates button button1 = guiCreateButton(747, 286, 102, 40, "", false) button2 = guiCreateButton(498, 286, 102, 40, "", false) how can i replace it or prevent creation? i just want make button open and close on pressed key. 1 button changes player skin/2 gives player a car
×
×
  • Create New...