Search the Community

Showing results for tags 'ajuda script'.



More search options

  • 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
  • Archive
  • Private Bugtracker

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


About Me


Gang


Location


Occupation


Interests

Found 2 results

  1. Iae rapaziada, bom estou com um certo problema em um painel q estou criado basicamente o Painel funciona da seguinte forma: O Player ao passar por uma determinada Marker, abre-se o painel onde ele terá uma quantidade de opções dentre elas "Armamentos, Uniformes e a parte de iniciar/finalizar seu expediente (painel voltado mais para corporações!). O problema esta na parte do Expediente o mesmo funciona da seguinte forma: Tem dois Ícones (print abaixo), o Painel Menor contém dois ícones, sendo o Primeiro ( soldado prestando Continência) o Inicio do Expediente e o Segundo o termino Ao iniciar o trabalho o Player receberá uma mensagem e 1 hora após o Inicio receberá seu salario no valor X (não decidi ainda) --> Esta primeira parte eu consegui fazer porém A segunda parte que seria Terminar o trabalho é onde esta o Problema. Ao Iniciar ele recebe este valor porém ao terminar o intuito é que o valor X pare de ser dado ao Player... tentei diversos jeitos porém não tive exito -->> Script logo Abaixo do Print!! Script Client-Side o Problema se encontra Próximo as linhas 280/310 local screenW,screenH = guiGetScreenSize() local resW, resH = 1360,768 local x, y = (screenW/resW), (screenH/resH) local pPrin = false local pPatru = false local pAcao = false local pPcolete = false local pParmas = false local pJob = false function painelPrincipal() dxDrawRectangle(x*43, y*167, x*235, y*25, tocolor(215, 0, 0, 254), false) dxDrawRectangle(x*43, y*191, x*235, y*314, tocolor(0, 0, 0, 194), false) dxDrawText("EQUIPAMENTOS", x*106, 169, x*243, y*191, tocolor(255, 255, 255, 255), 1.00, "sans", "left", "top", false, false, false, false, false) dxDrawRectangle(x*53, y*216, x*100, y*25, tocolor(0, 0, 0, 217), false) dxDrawText("Patrulhamento", x*63, y*220, x*132, y*237, tocolor(255, 255, 255, 255), 1.00, "default-bold", "left", "top", false, false, false, false, false) dxDrawRectangle(x*168, y*216, x*100, y*25, tocolor(0, 0, 0, 217), false) dxDrawText("Ação", x*203, y*220, x*278, y*241, tocolor(255, 255, 255, 255), 1.00, "default-bold", "left", "top", false, false, false, false, false) dxDrawRectangle(x*252, y*167, x*26, y*25, tocolor(0, 0, 0, 217), false) dxDrawText("X", x*262, y*170, x*269, y*192, tocolor(255, 255, 255, 255), 1.00, "default", "left", "top", false, false, false, false, false) end function painelPatrulhamento() -- Painel Patru dxDrawImage(x*69, y*267, x*63, y*59, ":[PainelArmas]/imgs/coleteLogo.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawImage(x*184, y*267, x*62, y*58, ":[PainelArmas]/imgs/ia2Logo.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawImage(x*74, y*363, x*58, y*56, ":[PainelArmas]/imgs/jobLogo.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawImage(x*188, y*367, x*48, y*47, ":[PainelArmas]/imgs/uniformLogo.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) end function painelPtColete() -- Patru Colete dxDrawRectangle(x*288, y*167, x*145, y*25, tocolor(215, 0, 0, 254), false) dxDrawRectangle(x*288, y*192, x*145, y*59, tocolor(0, 0, 0, 187), false) dxDrawImage(x*298, y*199, x*54, y*52, ":[PainelArmas]/imgs/coleteLogo.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawImage(x*375, y*202, x*48, y*46, ":[PainelArmas]/imgs/vidaLogo.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) end function painelPtArmas() -- Patru Armas dxDrawRectangle(x*288, y*167, x*192, y*25, tocolor(215, 0, 0, 254), false) dxDrawRectangle(x*288, y*192, x*192, y*215, tocolor(0, 0, 0, 187), false) dxDrawImage(x*298, y*202, x*62, y*58, ":[PainelArmas]/imgs/ia2Logo.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) -- ptarma1 dxDrawImage(x*398, y*201, x*68, y*65, ":[PainelArmas]/imgs/taserLogo.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) -- ptarma2 dxDrawImage(x*304, y*281, x*50, y*48, ":[PainelArmas]/imgs/shotLogo.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) -- ptarma3 dxDrawImage(x*406, y*281, x*50, y*49, ":[PainelArmas]/imgs/sprayLogo.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) -- ptarma4 dxDrawImage(x*304, y*345, x*53, y*52, ":[PainelArmas]/imgs/caceteteLogo.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) -- ptarma5 end function painelJob() dxDrawRectangle(x*288, y*167, x*143, y*25, tocolor(215, 0, 0, 254), false) dxDrawRectangle(288, y*192, x*143, y*65, tocolor(0, 0, 0, 187), false) dxDrawImage(x*298, y*200, x*48, y*47, ":[PainelArmas]/imgs/jobLogo.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawImage(x*370, y*201, x*47, y*47, ":[PainelArmas]/imgs/exitLogo.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) end function painelAcao() end ----- Abrir-Fechar Painel Principal ---------- function abrir (_,state) if pPrin == false then showCursor(true) addEventHandler("onClientRender", root, painelPrincipal) pPrin = true if not fontScale then fontScale = screenW/225 end tick1 = getTickCount() else showCursor(false) removeEventHandler("onClientRender", root, painelPrincipal) pPrin = false end end addEvent("PArmas", true) addEventHandler("PArmas", root , abrir) function fechar (_,state) if pPrin == true then if state == "down" then if isCursorOnElement(x*252, y*167, x*26, y*25 ) then showCursor(false) removeEventHandler("onClientRender", root, painelPrincipal) removeEventHandler("onClientRender", root, painelAcao) -- Painel Ação removeEventHandler("onClientRender", root, painelPatrulhamento) -- Painel Patru removeEventHandler("onClientRender", root, painelPtColete) -- Patru Colete removeEventHandler("onClientRender", root, painelPtArmas) -- Patru Armas removeEventHandler("onClientRender", root, painelJob) -- Patru Job pPrin = false pAcao = false pPatru = false pPcolete = false pParmas = false pJob = false end end end end addEventHandler ("onClientClick", root, fechar) function AbrirPatru(_,state) if pPrin == true then if pPatru == false then if state == "down" then if isCursorOnElement(x*53, y*216, x*100, y*25 ) then addEventHandler("onClientRender", root, painelPatrulhamento) -- Painel Patru removeEventHandler("onClientRender", root, painelAcao) -- Painel Ação pPatru = true pAcao = false end end end end end addEventHandler ("onClientClick", root, AbrirPatru) function AbPtColete(_,state) if pPatru == true then if pPcolete == false then if state == "down" then if isCursorOnElement(x*69, y*267, x*63, y*59 ) then addEventHandler("onClientRender", root, painelPtColete) -- Patru Colete removeEventHandler("onClientRender", root, painelPtArmas) -- Patru Armas removeEventHandler("onClientRender", root, painelJob) -- Patru Job pPcolete = true pParmas = false pJob = false end end end end end addEventHandler ("onClientClick", root, AbPtColete) function PgPtColete(_,state) if pPcolete == true then if state == "down" then if isCursorOnElement(x*298, y*199, x*54, y*52 ) then triggerServerEvent("colete", localPlayer) end end end end addEventHandler ("onClientClick", root, PgPtColete) function PgPtVida(_,state) if pPcolete == true then if state == "down" then if isCursorOnElement(x*375, y*202, x*48, y*46 ) then triggerServerEvent("vida", localPlayer) end end end end addEventHandler ("onClientClick", root, PgPtVida) ------------------------------------------------------------------------------------------------------------ function AbPtArmas(_,state) if pPatru == true then if pParmas == false then if state == "down" then if isCursorOnElement(x*184, y*267, x*62, y*58 ) then addEventHandler("onClientRender", root, painelPtArmas) -- Patru Armas removeEventHandler("onClientRender", root, painelPtColete) -- Patru Colete removeEventHandler("onClientRender", root, painelJob) -- Patru Job pParmas = true pPcolete = false pJob = false end end end end end addEventHandler ("onClientClick", root, AbPtArmas) function PgPtArma1(_,state) -- ptarma1 if pParmas == true then if state == "down" then if isCursorOnElement(x*298, y*202, x*62, y*58 ) then triggerServerEvent("M4", localPlayer) end end end end addEventHandler ("onClientClick", root, PgPtArma1) function PgPtArma2(_,state) -- ptarma2 if pParmas == true then if state == "down" then if isCursorOnElement(x*398, y*201, x*68, y*65 ) then triggerServerEvent("taser", localPlayer) end end end end addEventHandler ("onClientClick", root, PgPtArma2) function PgPtArma3(_,state) -- ptarma3 if pParmas == true then if state == "down" then if isCursorOnElement(x*304, y*281, x*50, y*48 ) then triggerServerEvent("shot", localPlayer) end end end end addEventHandler ("onClientClick", root, PgPtArma3) function PgPtArma4(_,state) -- ptarma4 if pParmas == true then if state == "down" then if isCursorOnElement(x*406, y*281, x*50, y*49 ) then triggerServerEvent("spray", localPlayer) end end end end addEventHandler ("onClientClick", root, PgPtArma4) function PgPtArma5(_,state) -- ptarma5 if pParmas == true then if state == "down" then if isCursorOnElement(x*304, y*345, x*53, y*52 ) then triggerServerEvent("stick", localPlayer) end end end end addEventHandler ("onClientClick", root, PgPtArma5) ------------------------------------------------------------------------------------------------------------ function AbJob(_,state) if pPatru == true then if pJob == false then if state == "down" then if isCursorOnElement(x*74, y*363, x*58, y*56 ) then addEventHandler("onClientRender", root, painelJob) -- Patru Job removeEventHandler("onClientRender", root, painelPtColete) -- Patru Colete removeEventHandler("onClientRender", root, painelPtArmas) -- Patru Armas pJob = true pPcolete = false pParmas = false end end end end end addEventHandler ("onClientClick", root, AbJob) function IniJobCl(_,state) -- IniJob if pJob == true then if state == "down" then if isCursorOnElement(x*298, y*200, x*48, y*47 ) then outputChatBox("Iniciou", 0, 255, 0) local tempo = setTimer ( function() givePlayerMoney(500) outputChatBox("Salario", 255, 0, 0) end, 10000, 5 ) end end end end addEventHandler ("onClientClick", root, IniJobCl) function ExitJob(_,state) -- ExitJob if pJob == true then if state == "down" then if isCursorOnElement(x*370, y*201, x*47, y*47 ) then outputChatBox("Terminou", 0, 255, 0) if isTimer ( tempo ) then killTimer ( tempo ) end end end end end addEventHandler ("onClientClick", root, ExitJob) function AbrirAcao(_,state) if pPrin == true then if pAcao == false then if state == "down" then if isCursorOnElement(x*168, y*216, x*100, y*25 ) then addEventHandler("onClientRender", root, painelAcao) -- Painel Ação removeEventHandler("onClientRender", root, painelPatrulhamento) -- Painel Patru pAcao = true pPatru = false end end end end end addEventHandler ("onClientClick", root, AbrirAcao) function isCursorOnElement(x,y,w,h) local mx,my = getCursorPosition () local fullx,fully = guiGetScreenSize() cursorx,cursory = mx*fullx,my*fully if cursorx > x and cursorx < x + w and cursory > y and cursory < y + h then return true else return false end end Decidi fazer no Cliente pelo fato de que no Server-side não estava tendo exito até que percebi que setTimer e GivePlayerMoney são funções Shared's adendo: estou usando setTimer pois ainda não compreendi a função getTickCount (estou tentando aprender )
  2. Alguem poderia me ajudar com esse mod -> http://top-mods-mta-br.blogspot.com.br/2015/11/mtasa-lojas-de-veiculos-exclusivo.html ele nao so salva quando o servidor esta ligado tipo se vc deslogar do servidor e entra denovo todos seus carros salva mais quando servidor reinicia ou ele e parado todos os carros somem e o dinheiro nao volta sera que alguem poderia me ajudar a fazer esse script salvar por favor ???