Jump to content

Murda

Members
  • Posts

    10
  • Joined

  • Last visited

Murda's Achievements

Member

Member (5/54)

0

Reputation

  1. ue mano kkkkk agora tem q ser assim? se eu n souber fazer algo tenho q desistir dela, painel gui eu sei fazer , mais gui e mt feio e quero algo mais bonito, pelo menos queria, eu vou dar um tempo em scripting eu acho, vou estudar melhor pra poder fazer algo , mais e isso , mt obg
  2. me confundiu todo kkkkk, ainda n cheguei nesse return, sei pra q serve, retornar valor a uma funcao eu acho, mais n entendi nada kkkkkkkkkkkkkkkkkkkkkkkkkk
  3. estou voltando aq novamente pois n consegui de jeito nenhum usar o retangulo como botão, vou mandar o codigo e pfv alguem me ajude , me fala onde eu to errando CLIENT: local screenW, screenH = guiGetScreenSize() local mostrar = false function paineldx() if mostrar == true then dxDrawRectangle(screenW * 0.3109, screenH * 0.2931, screenW * 0.3781, screenH * 0.4153, tocolor(0, 0, 0, 235), false) dxDrawRectangle(screenW * 0.3109, screenH * 0.6764, screenW * 0.3789, screenH * 0.0319, tocolor(0, 89, 173, 254), false) dxDrawRectangle(screenW * 0.3102, screenH * 0.2931, screenW * 0.3789, screenH * 0.0319, tocolor(0, 89, 173, 254), false) dxDrawLine((screenW * 0.4445) - 1, (screenH * 0.4500) - 1, (screenW * 0.4445) - 1, screenH * 0.5514, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(screenW * 0.5555, (screenH * 0.4500) - 1, (screenW * 0.4445) - 1, (screenH * 0.4500) - 1, tocolor(0, 0, 0, 255), 1, false) dxDrawLine((screenW * 0.4445) - 1, screenH * 0.5514, screenW * 0.5555, screenH * 0.5514, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(screenW * 0.5555, screenH * 0.5514, screenW * 0.5555, (screenH * 0.4500) - 1, tocolor(0, 0, 0, 255), 1, false) dxDrawRectangle(screenW * 0.4445, screenH * 0.4500, screenW * 0.1109, screenH * 0.1014, tocolor(115, 0, 0, 254), false) dxDrawText("ARMA", screenW * 0.4437, screenH * 0.4486, screenW * 0.5555, screenH * 0.5514, tocolor(255, 255, 255, 255), 1.00, "bankgothic", "center", "center", false, false, false, false, false) end end addEventHandler("onClientRender", root,paineldx) function mostrardx() if mostrar == false then showCursor(true) mostrar = true addEventHandler("onClientRender", root,paineldx) else showCursor(false) mostrar = false removeEventHandler("onClientRender", root,paineldx) end end bindKey("z","down", mostrardx) function sidearma(button,state) if paineldx == true then if state == "down" then if isCursorOnElement(screenW * 0.4445, screenH * 0.4500, screenW * 0.1109, screenH * 0.1014) then triggerServerEvent("dararmaevento", localPlayer) end end end end addEventHandler("onClientClick", root, sidearma) SERVER: function dararmaaa() giveWeapon ( source, 31, 200 ) end addEvent("dararmaevento", true) addEventHandler("dararmaevento", root, dararmaaa)
  4. eu consegui fazer um codigo aqui ja sobre isso da tecla local painel = false function Render () dxDrawLine(452 - 1, 162 - 1, 452 - 1, 437, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(841, 162 - 1, 452 - 1, 162 - 1, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(452 - 1, 437, 841, 437, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(841, 437, 841, 162 - 1, tocolor(0, 0, 0, 255), 1, false) dxDrawRectangle(452, 162, 389, 275, tocolor(0, 0, 0, 181), false) end function open() if painel == false then painel = true addEventHandler("onClientRender",root, Render) else painel = false removeEventHandler("onClientRender",root, Render) end end bindKey("z", "down", open) mais agora minha duvida é sobre isso, e foi essa minha pergunta, quais eventos devo usar, pra quando o player clicar no elemento dx , chamar o arquivo server do script? vou tentar
  5. quais funções e como devo começar pra fazer um painel dx ? como dito sou iniciante e tava começando no gui, agora quero trabalhar um poco com dx, quais funcoes devo usar pra abrir um painel dx por uma tecla?, e como faço pra juntar 2 script client e server? exemplo: fiz um painel dx no server, quando o player clicar no botao dx uma arma venha a ele,
  6. quais funções, e por onde devo começar pra fazer um painel em dx pra trocar a cor do veiculo?, exemplo: o player escolher a cor em uma telinha, e comprar a cor ,e a cor escolhida é setada no carro dele desde já agradeço, e desculpa por fazer tantos tópicos kkkk, estou começando
  7. local janela = guiCreateWindow( 434, 304, 280, 123, "Nova Janela", false) guiSetVisible(janela,false) function tornarvisivel() showCursor(true) if guiGetVisible(janela) == false then guiSetVisible(janela, true) else guiSetVisible(janela,false) end bindKey("z", "down",tornarvisivel) end fiz como vc disse, mais agora eu aperto "z" e a janela n abre, mais nao apresenta nenhum erro no debug Consegui resolver, era algo errado no bindkey, jjjjkk me desculpe
  8. fiz um pequeno script que quando alguem aperta a letra z do teclado aparecer uma janela gui e quando apertar denovo ela desapareça só q quando eu aperto z quando a janela gui está aberta ele duplica a janela, e n faz desaparecer function tornarvisivel() showCursor(true) local janela = guiCreateWindow( 434, 304, 280, 123, "Nova Janela", false) end if (guiGetVisible(janela) == true ) then guiSetVisible(janela, false) else guiSetVisible(janela, true) end bindKey("z", "down",tornarvisivel)
  9. COMO DITO NO TÓPICO ANTERIOR TO APRENDENDO Lua E E AINDA SOU BEM INICIANTE SEGUINTE, TO TENTANDO FAZER UM PEQUENO GUI , ONDE TEM UM BOTAO E UM PAINEL GUI, QUERO FAZER COM QUE, AO APERTAR UMA TECLA, APARECA O BOTAO, E DEPOIS EU CLICK NO BOTAO PARA APARECER A JANELA GUI, TENTEI GuiSetVisible, bindkey etc.., mais ainda n sei ler a wiki direito, se puderem me falar oque eu tenho q fazer agradeço addEventHandler( "onClientResourceStart", resourceRoot, function() local janela guiCreateWindow( 434, 304, 280, 123, "Nova Janela", false) local botao guiCreateButton(50, 150, 120, 60, "click Aqui", false) showCursor(true) end) function()
  10. EAE PESSOAL, TO COMECANDO A PROGRAMAR E DESENVOLVI UM PEQUENO SCRIPT EM QUE QUANDO O MONEY PASSA DE 1000$ ELE FAZ O MENOR DESAPARECER, QUANDO O 1000 É ATINGIDO FICA POR CIMA DO OUTRO, ALGUEM ME AJUDA? EDIT: CONSEGUI ARRUMAR, ESQUECI DE CONTATENAR ALI KKKKK, DESCULPEM local screenW, screenH = guiGetScreenSize() addEventHandler("onClientRender", root, function() local dinheiro = math.floor(getPlayerMoney(localPlayer)) dxDrawText("$"..dinheiro, screenW * 0.8535, screenH * 0.0625, screenW * 0.9668, screenH * 0.1107, tocolor(255, 255, 255, 255), 1.00, "bankgothic", "left", "top", false, false, false, false, false) if dinheiro >= 1000 then dxDrawText("$00000", screenW * 0.8535, screenH * 0.0625, screenW * 0.9668, screenH * 0.1107, tocolor(0, 254, 137, 255), 1.00, "bankgothic", "left", "top", false, false, false, false, false) end end )
×
×
  • Create New...