Search the Community

Showing results for tags '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 692 results

  1. Hey! , sorry for wasting you time guys, but i'm having a problem with a mod that i downloaded for my DestructionDerby server, is a user panel, when i tested it i saw one issue, when a donator (in donator tab) choose a wheel, the other players can't see the wheel that the donator are using, even the normal ones from the game. i dont have a lot of knowledge in scripting (i only know the very basics) and i tryed to find the error by myself by 3 days, and nothing. i dont know what's happening, if you guys can help me, i will be os much gratefull. i will leave the link for download so you guys can test and see (u need another player to see the issue) https://drive.google.com/file/d/1N26FW1hBZ1ErkiAoJSrxpMIYwnXTkRRU/view?usp=sharing I Hope that you guys can help me out! ❤️
  2. Alguém pode me ajudar, não consigo localizar a tecla ou comando que abre este painel gui link.
  3. i need a Moving Steering wheel script for imvehft vehicles. if someone have the script please give me link
  4. Does any one Have the script for a Turning Steering wheel in The Car ? i have Imvehft Vehicles that i'm sure it will work in. Can someone give me the Mod / Script ?
  5. Bom dia, eu fiz um sistema que faz identificar o dano do player quando acerta o corpo, porem nao consigo identificar o Headshot ou partes do corpo funcional. Alguem pode me ajudar? a função usada é a onClientPlayerWeaponFire function tiro(wap,mag,ClipM,x,y,z,element) if element then if getType(element) then screenX, screenY = getScreenFromWorldPosition(x,y,z) if getType(element) then receivePos() end if getType(element) == "player" then dano, weapon = weaponDamage() triggerServerEvent("sincroniaSv", getLocalPlayer(), element, dano, weapon) end end end end addEventHandler("onClientPlayerWeaponFire", getLocalPlayer(), tiro) OBRIGADO.
  6. Alguém sabe como devo fazer uma tela de login que deixa o usuário registrar apenas uma conta, e setar o nome que ele colocou no login como nome de user?
  7. Anyone can send me a working yt mp3 converter API? Or how to create one, to play music from youtube on my server?
  8. atempt to concatenate a boolean value ---------aparece isso -- Config do Chat Local addEventHandler("onPlayerChat", root, function(tresc, msgtype) if (msgtype == 0) then cancelEvent() local x,y,z = getElementPosition(source) for key, gracze in ipairs(getElementsByType("player")) do local x2,y2,z2 = getElementPosition(gracze) -- if getElementData (source, "ChatLocal:Delay", true) then -- outputChatBox ( MensagemFalandoRapidoDemaisLocal, source, 255, 255, 255, true ) return end if ( getDistanceBetweenPoints3D ( x, y, z, x2, y2, z2 ) < DistanciaDoChatLocal ) then local int = getElementInterior ( source ) local dim = getElementDimension ( source ) local int2 = getElementInterior ( gracze ) local dim2 = getElementDimension ( gracze ) if ( int == int2 and dim == dim2 ) then conta = getAccountName ( getPlayerAccount ( source ) ) if isObjectInACLGroup ("user."..conta, aclGetGroup ( "Console" ) ) then outputChatBox("#ffffff[ #FFEE00Local #ffffff] ["..getElementData(source, "ID").."] #00FF00● #00ff8cPresidente #00FF00● #00ff8c"..getPlayerName(source).. "#00FA9A » :#ffffff "..tresc, gracze, 255, 255, 255, true) elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "Admin" ) ) then outputChatBox("#ffffff[ #FFEE00Local #ffffff] ["..getElementData(source, "ID").."] #00FF00● #ff6600Vice Presidente #00FF00● #ff6600"..getPlayerName(source).."#A914F9 » :#ffffff "..tresc, gracze, 255, 255, 255, true) elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "Humanos" ) ) then outputChatBox("#ffffff[ #FFEE00Local #ffffff] ["..getElementData(source, "ID").."] #00FF00● #00ffedAdm Corp/Gang #00FF00● #00ffed"..getPlayerName(source).."#A914F9 » :#ffffff "..tresc, gracze, 255, 255, 255, true) elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "SuperModerator" ) ) then outputChatBox("#ffffff[ #FFEE00Local #ffffff] ["..getElementData(source, "ID").."] #00FF00● #00ffedDeputado Estadual #00FF00● #00ffed"..getPlayerName(source).."#A914F9 » :#ffffff "..tresc, gracze, 255, 255, 255, true) elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "Moderator" ) ) then outputChatBox("#ffffff[ #FFEE00Local #ffffff] ["..getElementData(source, "ID").."] #00FF00● #00ffed Vereador #00FF00● #00ffed"..getPlayerName(source).."#ffffff » :#ffffff "..tresc, gracze, 255, 255, 255, true) elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "BOPE" ) ) then outputChatBox("#ffffff[ #FFEE00Local #ffffff] ["..getElementData(source, "ID").."] #00FF00● #000000 BOPE #00FF00● #000000"..getPlayerName(source).."#ffffff » :#ffffff ".. tresc, gracze, 255, 255, 255, true) elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "CHOQUE" ) ) then outputChatBox("#ffffff[ #FFEE00Local #ffffff] ["..getElementData(source, "ID").."] #00FF00● #635f5f C O E #00FF00● #635f5f"..getPlayerName(source).."#ffffff » :#ffffff ".. tresc, gracze, 255, 255, 255, true) elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "COE" ) ) then outputChatBox("#ffffff[ #FFEE00Local #ffffff] ["..getElementData(source, "ID").."] #00FF00● #228B22 #00FF00● #228B22"..getPlayerName(source).."#ffffff » :#ffffff ".. tresc, gracze, 255, 255, 255, true) elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "ROTA" ) ) then outputChatBox("#ffffff[ #FFEE00Local #ffffff] ["..getElementData(source, "ID").."] #00FF00● #838B83 ROTA #00FF00● #838B83"..getPlayerName(source).."#ffffff » :#ffffff ".. tresc, gracze, 255, 255, 255, true) elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "BAEP" ) ) then outputChatBox("#ffffff[ #FFEE00Local #ffffff] ["..getElementData(source, "ID").."] #00FF00● #838B83 BAEP #00FF00● #838B83"..getPlayerName(source).."#ffffff » :#ffffff ".. tresc, gracze, 255, 255, 255, true) elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "PF" ) ) then outputChatBox("#ffffff[ #FFEE00Local #ffffff] ["..getElementData(source, "ID").."] #00FF00● #E47833 Policia Federal #00FF00● #E47833"..getPlayerName(source).."#ffffff » :#ffffff ".. tresc, gracze, 255, 255, 255, true) elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "PETO" ) ) then outputChatBox("#ffffff[ #FFEE00Local #ffffff] ["..getElementData(source, "ID").."] #00FF00● #000000 PETO #00FF00● #000000"..getPlayerName(source).."#ffffff » :#ffffff ".. tresc, gracze, 255, 255, 255, true) elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "ROCAM" ) ) then outputChatBox("#ffffff[ #FFEE00Local #ffffff] ["..getElementData(source, "ID").."] #00FF00● #Ff0000 ROCAM #00FF00● #Ff0000"..getPlayerName(source).."#ffffff » :#ffffff ".. tresc, gracze, 255, 255, 255, true) elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "CBV" ) ) then outputChatBox("#ffffff[ #FFEE00Local #ffffff] ["..getElementData(source, "ID").."] #00FF00● #Ff0000 Comando Bala Voa #00FF00● #Ff0000"..getPlayerName(source).."#ffffff » :#ffffff "..tresc, gracze, 255, 255, 255, true) elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "CV" ) ) then outputChatBox("#ffffff[ #FFEE00Local #ffffff] ["..getElementData(source, "ID").."] #00FF00● #Ff0000 Comando Vermelho #00FF00● #Ff0000"..getPlayerName(source).."#ffffff » :#ffffff "..tresc, gracze, 255, 255, 255, true) elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "TCP" ) ) then outputChatBox("#ffffff[ #FFEE00Local #ffffff] ["..getElementData(source, "ID").."] #00FF00● #FFFF00Terceiro Comando Puro #00FF00● #FFFF00"..getPlayerName(source).."#ffffff » :#ffffff "..tresc, gracze, 255, 255, 255, true) elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "ANS" ) ) then outputChatBox("#ffffff[ #FFEE00Local #ffffff] ["..getElementData(source, "ID").."] #00FF00● #000000 Anonymous #00FF00● #000000"..getPlayerName(source).."#ffffff » :#ffffff "..tresc, gracze, 255, 255, 255, true) elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "OG" ) ) then outputChatBox("#ffffff[ #FFEE00Local #ffffff] ["..getElementData(source, "ID").."] #00FF00● #8A2BE2 Os Guri #00FF00● #8A2BE2"..getPlayerName(source).."#ffffff » :#ffffff "..tresc, gracze, 255, 255, 255, true) elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "Designer" ) ) then outputChatBox("#ffffff[ #FFEE00Local #ffffff] ["..getElementData(source, "ID").."] #0000FF● Designer ● #FFFFFF"..getPlayerName(source).."#ffffff » :#ffffff "..tresc, gracze, 255, 255, 255, true) elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "Moderador" ) ) then outputChatBox("#ffffff[ #FFEE00Local #ffffff] ["..getElementData(source, "ID").."] #FFFFFF● Vereador ● #FFFFFF"..getPlayerName(source).."#ffffff » :#ffffff "..tresc, gracze, 255, 255, 255, true) ---------------------------------------------------------------------------------------- elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "Omega" ) ) then outputChatBox("#ffffff[ #FFEE00Local #ffffff] ["..getElementData(source, "ID").."] #00FF00● #00FF00 VIP OMEGA #00FF00● #00FF00"..getPlayerName(source).."#ffffff » :#ffffff ".. tresc, gracze, 255, 255, 255, true) elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "Sigma" ) ) then outputChatBox("#ffffff[ #FFEE00Local #ffffff] ["..getElementData(source, "ID").."] #00FF00● #00FF00 VIP SIGMA #00FF00● #00FF00"..getPlayerName(source).."#ffffff » :#ffffff ".. tresc, gracze, 255, 255, 255, true) elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "Epsylon" ) ) then outputChatBox("#ffffff[ #FFEE00Local #ffffff] ["..getElementData(source, "ID").."] #00FF00● #00FF00 VIP EPSYLON #00FF00● #00FF00"..getPlayerName(source).."#ffffff » :#ffffff ".. tresc, gracze, 255, 255, 255, true) elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "Alpha" ) ) then outputChatBox("#ffffff[ #FFEE00Local #ffffff] ["..getElementData(source, "ID").."] #00FF00● #00FF00 VIP ALPHA #00FF00● #00FF00"..getPlayerName(source).."#ffffff » :#ffffff ".. tresc, gracze, 255, 255, 255, true) ---------------------------------------------------------------------------------------- elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "VIP" ) ) then outputChatBox("#ffffff[ #FFEE00Local #ffffff] ["..getElementData(source, "ID").."] #00FF00● #00FF00 VIP #00FF00● #00FF00"..getPlayerName(source).."#ffffff » :#ffffff ".. tresc, gracze, 255, 255, 255, true) elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "UBER" ) ) then outputChatBox("#ffffff[ #FFEE00Local #ffffff] ["..getElementData(source, "ID").."] #00FF00● #838B83 UBER #00FF00● #838B83"..getPlayerName(source).."#ffffff » :#ffffff ".. tresc, gracze, 255, 255, 255, true) elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "Mecanico" ) ) then outputChatBox("#ffffff[ #FFEE00Local #ffffff] ["..getElementData(source, "ID").."] #00FF00● #228B22 Mecanico #00FF00● #228B22".. getPlayerName(source).."#ffffff » :#ffffff ".. tresc, gracze, 255, 255, 255, true) elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "SAMU" ) ) then outputChatBox("#ffffff[ #FFEE00Local #ffffff] ["..getElementData(source, "ID").."] #00FF00● #Ff0000 SAMU #00FF00● #Ff0000"..getPlayerName(source).."#ffffff » :#ffffff ".. tresc, gracze, 255, 255, 255, true) elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "GIRL" ) ) then outputChatBox("#ffffff[ #FFEE00Local #ffffff] ["..getElementData(source, "ID").."] #00FF00● #FF00F6 Garotas De Programa #00FF00● #FF00F6"..getPlayerName(source).."#ffffff » :#ffffff ".. tresc, gracze, 255, 255, 255, true) elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "Ajudante" ) ) then outputChatBox("#ffffff[ #FFEE00Local #ffffff] ["..getElementData(source, "ID").."] #00FF00● #FFEE00 Ajudante #00FF00● #FFEE00"..getPlayerName(source).."#ffffff » :#ffffff ".. tresc, gracze, 255, 255, 255, true) elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "Everyone" ) ) then outputChatBox("#ffffff[ #FFEE00Local #ffffff] ["..getElementData(source, "ID").."] #00FF00● #05FF00 Cidadão #00FF00● #05FF00"..getPlayerName(source).."#ffffff » :#FFFFFF "..tresc, gracze, 255, 255, 255, true) end end end end end -- setElementData (source, "ChatLocal:Delay",true) --setTimer (setElementData, 2000, 1, source, "ChatLocal:Delay", false) end)
  9. preciso q bloqueie a tecla - (menos) e a tecla +(mais) na hora de digita o valor de sacar e depositar alguém consegue me ajudar por gentileza ? --outputChatBox --setElementData(localPlayer,"Extract.Bank","Extrato financeiro:") myFontBold10 = guiCreateFont( "bold.ttf", 10 ) myFontBold15 = guiCreateFont( "bold.ttf", 15 ) myFontAlphaMaleModern10 = guiCreateFont( "AlphaMaleModern.ttf", 13 ) function atualihoras() id="teste" time = getRealTime() local meses = {"01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12"} local meses2 = {"janeiro", "fevereiro", "março", "abril", "maio", "junho", "julho", "agosto", "setembro", "outubro", "novembro", "dezembro"} local day = {"Domingo", "Segunda-feira", "Terça-feira", "Quarta-feira", "Quinta-feira", "Sexta-feira", "Sábado"} dia = ("%02d"):format(time.monthday) mes = meses[time.month + 1] local mes2 = meses2[time.month + 1] ano = ("%02d"):format(time.year + 1900) local diaSemana = day[time.weekday + 1] hours = time.hour minutes = time.minute local seconds = time.second if (hours >= 0 and hours < 10) then hours = "0"..time.hour end if (minutes >= 0 and minutes < 10) then minutes = "0"..time.minute end end setTimer(atualihoras,50, 0) function start() atmfundo = guiCreateStaticImage(0.00, 0.00, 1, 1, "imgs/atm.png", true) showhome() end addEvent("ShowGUI.Bank.Caixa", true) addEventHandler("ShowGUI.Bank.Caixa", getLocalPlayer(), start) function destroyerromsg() setTimer(function() if wt then destroyElement(wt) end end,2000,1) end function destroyall() if killh then destroyElement(killh) end if extratoreg then destroyElement(extratoreg) end if opc8 then destroyElement(opc8) end if bt6 then destroyElement(bt6) end if fk then destroyElement(fk) end if oplb2 then destroyElement(oplb2) destroyElement(transmoney) destroyElement(transplr) destroyElement(trs) destroyElement(oplb3) end if sac then destroyElement(sac) end if saquemoneyedit then destroyElement(saquemoneyedit) end if dep then destroyElement(dep) end if money then destroyElement(money) end if progressBar then destroyElement(progressBar) end if wt then destroyElement(wt) end if vl8 then destroyElement(vl8) destroyElement(opc8) end if vl7 then destroyElement(vl7) destroyElement(opc7) end if vl6 then destroyElement(vl6) destroyElement(opc6) end if otrvlr then destroyElement(otrvlr) destroyElement(opc4) end if vl3 then destroyElement(vl3) destroyElement(opc3) end if vl1 then destroyElement(vl1) destroyElement(opc1) end if vl2 then destroyElement(vl2) destroyElement(opc2) end if moneyedit then destroyElement(moneyedit) end if oplb1 then destroyElement(oplb1) end if infolb then destroyElement(infolb) end if bt1 then destroyElement(bt1) destroyElement(opc1) end if bt2 then destroyElement(bt2) destroyElement(opc2) end if bt3 then destroyElement(bt3) destroyElement(opc3) end if bt4 then destroyElement(bt4) destroyElement(opc4) end if bt5 then destroyElement(bt5) destroyElement(opc5) end if bt6 then destroyElement(bt6) destroyElement(opc6) end if bt7 then destroyElement(bt7) destroyElement(opc7) end if bt8 then destroyElement(bt8) destroyElement(opc8) end end function moneyfunc() local bankmoney = tonumber(getElementData(localPlayer,"bankbalance")) local handmoney = tonumber(getPlayerMoney(localPlayer)) guiBringToFront(fk) showhome() removeEventHandler("onClientGUIClick",money,moneyfunc) local fun = tonumber(sqvl) setElementData(localPlayer,"bankbalance",bankmoney-fun) local add = handmoney+fun triggerServerEvent("Bank.movimenttake", getRootElement(), localPlayer,add) local text = getElementData(localPlayer,"Extract.Bank") setElementData(localPlayer,"Extract.Bank",text.."\n\nSaque||"..hours..":"..minutes.."("..dia.."/"..mes.."/"..ano..")\nValor:"..sqvl) triggerServerEvent("Bank.moviment", getRootElement(), localPlayer) end function imprimirmoney(text,mnvl) destroyall() infolb = guiCreateLabel(0.25, 0.224, 0.5, 0.9, text, true, atmfundo) guiLabelSetHorizontalAlign(infolb, "center", false) guiSetFont(infolb, myFontBold15) oplb1 = guiCreateLabel(0.35, 0.65, 0.297, 0.3, "Contando cédulas...", true, atmfundo) scaner = playSound("scanner.mp3") guiLabelSetHorizontalAlign(oplb1, "center", false) guiSetFont(oplb1, myFontBold10) progressBar = guiCreateProgressBar(0.35, 0.68, 0.297, 0.03, true, nil) pro = setTimer(function() progress = guiProgressBarGetProgress(progressBar) guiProgressBarSetProgress(progressBar, progress+5) end,750,20) pro2 = setTimer(function() destroyElement(progressBar) killTimer(pro) destroyall() oplb1 = guiCreateLabel(0.35, 0.65, 0.297, 0.3, "Retire o dinheiro abaixo\nV V V V V V V V V V V V V V V", true, atmfundo) guiLabelSetHorizontalAlign(oplb1, "center", false) guiSetFont(oplb1, myFontBold10) stopSound(scaner) destroyElement(scaner) infolb = guiCreateLabel(0.25, 0.224, 0.5, 0.9, text, true, atmfundo) guiLabelSetHorizontalAlign(infolb, "center", false) guiSetFont(infolb, myFontBold15) local x=0.824 local y=0.950 money = guiCreateStaticImage(0.395, y, 0.21, 0.09, "imgs/money.png", true, atmfundo) fk = guiCreateStaticImage(0.351, 0.91, 0.2911, 0.09, "fk.png", true, atmfundo) setTimer(function() if y ~= 0.824 then if money then destroyElement(money) y=y-0.002 money = guiCreateStaticImage(0.395, y, 0.21, 0.09, "imgs/money.png", true, atmfundo) guiBringToFront(fk) if y <= 0.824 then y=0.824 destroyElement(money) money = guiCreateStaticImage(0.395, y, 0.21, 0.09, "imgs/money.png", true, atmfundo) guiBringToFront(fk) addEventHandler("onClientGUIClick",money,moneyfunc) end end end end,50,100) end,15000,1) end function wating(text,mnvl) destroyall() infolb = guiCreateLabel(0.25, 0.224, 0.5, 0.9, text, true, atmfundo) guiLabelSetHorizontalAlign(infolb, "center", false) guiSetFont(infolb, myFontBold15) wt = guiCreateLabel(0.25, 0.53, 0.5, 0.5, "Aguarde um momento", true, atmfundo) guiLabelSetHorizontalAlign(wt, "center", false) guiSetFont(wt, myFontBold15) setTimer(function () oplb1 = guiCreateLabel(0.25, 0.565, 0.5, 0.5, "Checando banco de dados...", true, atmfundo) guiLabelSetHorizontalAlign(oplb1, "center", false) guiSetFont(oplb1, myFontBold10) end,2000,1) setTimer(function () imprimirmoney("Saque",mnvl) end,4000,1) end function watingfk(text,minitexto) destroyall() infolb = guiCreateLabel(0.25, 0.224, 0.5, 0.9, text, true, atmfundo) guiLabelSetHorizontalAlign(infolb, "center", false) guiSetFont(infolb, myFontBold15) wt = guiCreateLabel(0.25, 0.53, 0.5, 0.5, "Aguarde um momento", true, atmfundo) guiLabelSetHorizontalAlign(wt, "center", false) guiSetFont(wt, myFontBold15) setTimer(function () oplb1 = guiCreateLabel(0.25, 0.565, 0.5, 0.5, minitexto, true, atmfundo) guiSetFont(oplb1, myFontBold10) guiLabelSetHorizontalAlign(oplb1, "center", false) end,2000,1) setTimer(function () showhome() end,4000,1) end function extrato() destroyall() gui="extrato" local text = getElementData(localPlayer,"Extract.Bank") or "Extrato financeiro:" infolb = guiCreateLabel(0.25, 0.224, 0.5, 0.9, "Extrato", true, atmfundo) guiLabelSetHorizontalAlign(infolb, "center", false) guiSetFont(infolb, myFontBold15) oplb1 = guiCreateLabel(0.35, 0.42, 0.5, 0.05, "Veja aqui seu extrato financeiro:", true, atmfundo) guiSetFont(oplb1, myFontBold10) opc4 = guiCreateStaticImage(0.336, 0.68, 0.161, 0.04, "imgs/fundocinza.png", true, atmfundo) tranferencia = guiCreateLabel(0, 0, 1, 1, "Apagar Extrato", true, opc4) guiSetFont(tranferencia, myFontBold10) guiLabelSetHorizontalAlign(tranferencia, "center", false) guiLabelSetVerticalAlign(tranferencia,"center",false) killh = guiCreateStaticImage(0.296, 0.68, 0.03, 0.04, "imgs/fundo-ret.png", true, atmfundo) guiSetAlpha(killh,0) opc5 = guiCreateStaticImage(0.511, 0.68, 0.15, 0.04, "imgs/fundocinza.png", true, atmfundo) sair = guiCreateLabel(0, 0, 1, 1, "Sair", true, opc5) guiSetFont(sair, myFontBold10) guiLabelSetHorizontalAlign(sair, "center", false) guiLabelSetVerticalAlign(sair,"center",false) bt5 = guiCreateStaticImage(0.67, 0.68, 0.03, 0.04, "imgs/fundo-ret.png", true, atmfundo) guiSetAlpha(bt5,0) extratoreg = guiCreateMemo(0.35, 0.47, 0.3, 0.17, text, true, atmfundo) guiMemoSetReadOnly(extratoreg, true) end function showhome() gui="home" destroyall() showCursor(true) infolb = guiCreateLabel(0.25, 0.224, 0.5, 0.9, "Bem Vindo", true, atmfundo) guiLabelSetHorizontalAlign(infolb, "center", false) guiSetFont(infolb, myFontBold15) opc1 = guiCreateStaticImage(0.34, 0.54, 0.157, 0.04, "imgs/fundocinza.png", true, atmfundo) saque = guiCreateLabel(0, 0, 1, 1, "Saque", true, opc1) guiSetFont(saque, myFontBold10) guiLabelSetHorizontalAlign(saque, "center", false) guiLabelSetVerticalAlign(saque,"center",false) opc2 = guiCreateStaticImage(0.34, 0.586, 0.157, 0.04, "imgs/fundocinza.png", true, atmfundo) deposito = guiCreateLabel(0, 0, 1, 1, "Depósito", true, opc2) guiSetFont(deposito, myFontBold10) guiLabelSetHorizontalAlign(deposito, "center", false) guiLabelSetVerticalAlign(deposito,"center",false) opc3 = guiCreateStaticImage(0.337, 0.634, 0.16, 0.04, "imgs/fundocinza.png", true, atmfundo) saldo = guiCreateLabel(0, 0, 1, 1, "Saldo", true, opc3) guiSetFont(saldo, myFontBold10) guiLabelSetHorizontalAlign(saldo, "center", false) guiLabelSetVerticalAlign(saldo,"center",false) opc4 = guiCreateStaticImage(0.336, 0.68, 0.161, 0.04, "imgs/fundocinza.png", true, atmfundo) tranferencia = guiCreateLabel(0, 0, 1, 1, "Transferência", true, opc4) guiSetFont(tranferencia, myFontBold10) guiLabelSetHorizontalAlign(tranferencia, "center", false) guiLabelSetVerticalAlign(tranferencia,"center",false) opc5 = guiCreateStaticImage(0.511, 0.68, 0.15, 0.04, "imgs/fundocinza.png", true, atmfundo) sair = guiCreateLabel(0, 0, 1, 1, "Sair", true, opc5) guiSetFont(sair, myFontBold10) guiLabelSetHorizontalAlign(sair, "center", false) guiLabelSetVerticalAlign(sair,"center",false) opc8 = guiCreateStaticImage(0.511, 0.54, 0.15, 0.04, "imgs/fundocinza.png", true, atmfundo) saqd3 = guiCreateLabel(0, 0, 1, 1, "Extrato", true, opc8) guiSetFont(saqd3, myFontBold10) guiLabelSetHorizontalAlign(saqd3, "center", false) guiLabelSetVerticalAlign(saqd3,"center",false) bt1 = guiCreateStaticImage(0.305, 0.54, 0.03, 0.04, "imgs/fundo-ret.png", true, atmfundo) bt2 = guiCreateStaticImage(0.302, 0.586, 0.03, 0.04, "imgs/fundo-ret.png", true, atmfundo) bt3 = guiCreateStaticImage(0.299, 0.634, 0.03, 0.04, "imgs/fundo-ret.png", true, atmfundo) bt4 = guiCreateStaticImage(0.296, 0.68, 0.03, 0.04, "imgs/fundo-ret.png", true, atmfundo) bt5 = guiCreateStaticImage(0.67, 0.68, 0.03, 0.04, "imgs/fundo-ret.png", true, atmfundo) bt6 = guiCreateStaticImage(0.669, 0.54, 0.03, 0.04, "imgs/fundo-ret.png", true, atmfundo) guiSetAlpha(bt1,0) guiSetAlpha(bt2,0) guiSetAlpha(bt3,0) guiSetAlpha(bt4,0) guiSetAlpha(bt5,0) guiSetAlpha(bt6,0) end function Saldofun() destroyall() local money = tonumber(getElementData(localPlayer,"bankbalance")) or 0 oplb1 = guiCreateLabel(0.35, 0.42, 0.5, 0.3, " ---------------------------------\n Saldo: \n"..money.." C\n\n\n\n----------------------------------", true, atmfundo) guiSetFont(oplb1, myFontAlphaMaleModern10) infolb = guiCreateLabel(0.25, 0.224, 0.5, 0.9, "Saldo", true, atmfundo) guiLabelSetHorizontalAlign(infolb, "center", false) guiSetFont(infolb, myFontBold15) gui="saldo" opc5 = guiCreateStaticImage(0.511, 0.68, 0.15, 0.04, "imgs/fundocinza.png", true, atmfundo) sair = guiCreateLabel(0, 0, 1, 1, "Sair", true, opc5) guiSetFont(sair, myFontBold10) guiLabelSetHorizontalAlign(sair, "center", false) guiLabelSetVerticalAlign(sair,"center",false) bt5 = guiCreateStaticImage(0.67, 0.68, 0.03, 0.04, "imgs/fundo-ret.png", true, atmfundo) guiSetAlpha(bt5,0) end function Depositofun() destroyall() oplb1 = guiCreateLabel(0.35, 0.42, 0.5, 0.3, "Digite o valor do depósito:\nEx: 5000", true, atmfundo) guiSetFont(oplb1, myFontBold10) infolb = guiCreateLabel(0.25, 0.224, 0.5, 0.9, "Depósito", true, atmfundo) guiLabelSetHorizontalAlign(infolb, "center", false) guiSetFont(infolb, myFontBold15) gui="deposito" moneyedit = guiCreateEdit(0.35, 0.48, 0.292, 0.045, "$$", true, atmfundo) opc4 = guiCreateStaticImage(0.336, 0.68, 0.161, 0.04, "imgs/fundocinza.png", true, atmfundo) tranferencia = guiCreateLabel(0, 0, 1, 1, "Depositar", true, opc4) guiSetFont(tranferencia, myFontBold10) guiLabelSetHorizontalAlign(tranferencia, "center", false) guiLabelSetVerticalAlign(tranferencia,"center",false) dep = guiCreateStaticImage(0.296, 0.68, 0.03, 0.04, "imgs/fundo-ret.png", true, atmfundo) guiSetAlpha(dep,0) opc5 = guiCreateStaticImage(0.511, 0.68, 0.15, 0.04, "imgs/fundocinza.png", true, atmfundo) sair = guiCreateLabel(0, 0, 1, 1, "Sair", true, opc5) guiSetFont(sair, myFontBold10) guiLabelSetHorizontalAlign(sair, "center", false) guiLabelSetVerticalAlign(sair,"center",false) bt5 = guiCreateStaticImage(0.67, 0.68, 0.03, 0.04, "imgs/fundo-ret.png", true, atmfundo) guiSetAlpha(bt5,0) end function Transf() destroyall() gui="Transferência" infolb = guiCreateLabel(0.25, 0.224, 0.5, 0.9, "Transferência", true, atmfundo) guiLabelSetHorizontalAlign(infolb, "center", false) guiSetFont(infolb, myFontBold15) oplb1 = guiCreateLabel(0.35, 0.42, 0.5, 0.3, "Digite o valor de transferência:", true, atmfundo) guiSetFont(oplb1, myFontBold10) oplb2 = guiCreateLabel(0.35, 0.485, 0.5, 0.3, "Digite o nome do jogador:", true, atmfundo) guiSetFont(oplb2, myFontBold10) oplb3 = guiCreateLabel(0.35, 0.55, 0.5, 0.3, "", true, atmfundo) guiSetFont(oplb3, myFontBold10) guiLabelSetColor(oplb3, 0, 0, 0) transmoney = guiCreateEdit(0.35, 0.45, 0.292, 0.033, "Ex: 5000", true, atmfundo) transplr = guiCreateEdit(0.35, 0.515, 0.292, 0.035, "Nome do jogador", true, atmfundo) opc4 = guiCreateStaticImage(0.336, 0.68, 0.161, 0.04, "imgs/fundocinza.png", true, atmfundo) tranferencia = guiCreateLabel(0, 0, 1, 1, "Transferir", true, opc4) guiSetFont(tranferencia, myFontBold10) guiLabelSetHorizontalAlign(tranferencia, "center", false) guiLabelSetVerticalAlign(tranferencia,"center",false) trs = guiCreateStaticImage(0.296, 0.68, 0.03, 0.04, "imgs/fundo-ret.png", true, atmfundo) guiSetAlpha(trs,0) opc5 = guiCreateStaticImage(0.511, 0.68, 0.15, 0.04, "imgs/fundocinza.png", true, atmfundo) sair = guiCreateLabel(0, 0, 1, 1, "Sair", true, opc5) guiSetFont(sair, myFontBold10) guiLabelSetHorizontalAlign(sair, "center", false) guiLabelSetVerticalAlign(sair,"center",false) bt5 = guiCreateStaticImage(0.67, 0.68, 0.03, 0.04, "imgs/fundo-ret.png", true, atmfundo) guiSetAlpha(bt5,0) end function Saqueotr() destroyall() oplb1 = guiCreateLabel(0.35, 0.42, 0.5, 0.3, "Digite o valor do Saque:\nEx: 5000", true, atmfundo) guiSetFont(oplb1, myFontBold10) infolb = guiCreateLabel(0.25, 0.224, 0.5, 0.9, "Saque", true, atmfundo) guiLabelSetHorizontalAlign(infolb, "center", false) guiSetFont(infolb, myFontBold15) gui="Saque" saquemoneyedit = guiCreateEdit(0.35, 0.48, 0.292, 0.045, "$$", true, atmfundo) opc4 = guiCreateStaticImage(0.336, 0.68, 0.161, 0.04, "imgs/fundocinza.png", true, atmfundo) tranferencia = guiCreateLabel(0, 0, 1, 1, "Sacar", true, opc4) guiSetFont(tranferencia, myFontBold10) sac = guiCreateStaticImage(0.296, 0.68, 0.03, 0.04, "imgs/fundo-ret.png", true, atmfundo) guiSetAlpha(sac,0) guiLabelSetHorizontalAlign(tranferencia, "center", false) guiLabelSetVerticalAlign(tranferencia,"center",false) opc5 = guiCreateStaticImage(0.511, 0.68, 0.15, 0.04, "imgs/fundocinza.png", true, atmfundo) sair = guiCreateLabel(0, 0, 1, 1, "Sair", true, opc5) guiSetFont(sair, myFontBold10) guiLabelSetHorizontalAlign(sair, "center", false) guiLabelSetVerticalAlign(sair,"center",false) bt5 = guiCreateStaticImage(0.67, 0.68, 0.03, 0.04, "imgs/fundo-ret.png", true, atmfundo) guiSetAlpha(bt5,0) end function Saquefun() destroyall() oplb1 = guiCreateLabel(0.35, 0.42, 0.5, 0.3, "Quanto deseja sacar?", true, atmfundo) guiSetFont(oplb1, myFontBold10) gui="saque" showCursor(true) infolb = guiCreateLabel(0.25, 0.224, 0.5, 0.9, "Saque", true, atmfundo) guiLabelSetHorizontalAlign(infolb, "center", false) guiSetFont(infolb, myFontBold15) opc1 = guiCreateStaticImage(0.34, 0.54, 0.157, 0.04, "imgs/fundocinza.png", true, atmfundo) saque = guiCreateLabel(0, 0, 1, 1, "R$1000", true, opc1) guiSetFont(saque, myFontBold10) guiLabelSetHorizontalAlign(saque, "center", false) guiLabelSetVerticalAlign(saque,"center",false) opc2 = guiCreateStaticImage(0.34, 0.586, 0.157, 0.04, "imgs/fundocinza.png", true, atmfundo) deposito = guiCreateLabel(0, 0, 1, 1, "R$2000", true, opc2) guiSetFont(deposito, myFontBold10) guiLabelSetHorizontalAlign(deposito, "center", false) guiLabelSetVerticalAlign(deposito,"center",false) opc3 = guiCreateStaticImage(0.337, 0.634, 0.16, 0.04, "imgs/fundocinza.png", true, atmfundo) saldo = guiCreateLabel(0, 0, 1, 1, "R$3000", true, opc3) guiSetFont(saldo, myFontBold10) guiLabelSetHorizontalAlign(saldo, "center", false) guiLabelSetVerticalAlign(saldo,"center",false) opc4 = guiCreateStaticImage(0.336, 0.68, 0.161, 0.04, "imgs/fundocinza.png", true, atmfundo) tranferencia = guiCreateLabel(0, 0, 1, 1, "Outro valor", true, opc4) guiSetFont(tranferencia, myFontBold10) guiLabelSetHorizontalAlign(tranferencia, "center", false) guiLabelSetVerticalAlign(tranferencia,"center",false) opc5 = guiCreateStaticImage(0.511, 0.68, 0.15, 0.04, "imgs/fundocinza.png", true, atmfundo) sair = guiCreateLabel(0, 0, 1, 1, "Sair", true, opc5) guiSetFont(sair, myFontBold10) guiLabelSetHorizontalAlign(sair, "center", false) guiLabelSetVerticalAlign(sair,"center",false) opc6 = guiCreateStaticImage(0.511, 0.634, 0.15, 0.04, "imgs/fundocinza.png", true, atmfundo) saqd1 = guiCreateLabel(0, 0, 1, 1, "R$6000", true, opc6) guiSetFont(saqd1, myFontBold10) guiLabelSetHorizontalAlign(saqd1, "center", false) guiLabelSetVerticalAlign(saqd1,"center",false) opc7 = guiCreateStaticImage(0.511, 0.586, 0.15, 0.04, "imgs/fundocinza.png", true, atmfundo) saqd2 = guiCreateLabel(0, 0, 1, 1, "R$5000", true, opc7) guiSetFont(saqd2, myFontBold10) guiLabelSetHorizontalAlign(saqd2, "center", false) guiLabelSetVerticalAlign(saqd2,"center",false) opc8 = guiCreateStaticImage(0.511, 0.54, 0.15, 0.04, "imgs/fundocinza.png", true, atmfundo) saqd3 = guiCreateLabel(0, 0, 1, 1, "R$4000", true, opc8) guiSetFont(saqd3, myFontBold10) guiLabelSetHorizontalAlign(saqd3, "center", false) guiLabelSetVerticalAlign(saqd3,"center",false) vl1 = guiCreateStaticImage(0.305, 0.54, 0.03, 0.04, "imgs/fundo-ret.png", true, atmfundo) vl2 = guiCreateStaticImage(0.302, 0.586, 0.03, 0.04, "imgs/fundo-ret.png", true, atmfundo) vl3 = guiCreateStaticImage(0.299, 0.634, 0.03, 0.04, "imgs/fundo-ret.png", true, atmfundo) otrvlr = guiCreateStaticImage(0.296, 0.68, 0.03, 0.04, "imgs/fundo-ret.png", true, atmfundo) bt5 = guiCreateStaticImage(0.67, 0.68, 0.03, 0.04, "imgs/fundo-ret.png", true, atmfundo) vl6 = guiCreateStaticImage(0.67, 0.634, 0.03, 0.04, "imgs/fundo-ret.png", true, atmfundo) vl7 = guiCreateStaticImage(0.67, 0.586, 0.03, 0.04, "imgs/fundo-ret.png", true, atmfundo) vl8 = guiCreateStaticImage(0.669, 0.54, 0.03, 0.04, "imgs/fundo-ret.png", true, atmfundo) guiSetAlpha(vl1,0) guiSetAlpha(vl2,0) guiSetAlpha(vl3,0) guiSetAlpha(otrvlr,0) guiSetAlpha(bt5,0) guiSetAlpha(vl6,0) guiSetAlpha(vl7,0) guiSetAlpha(vl8,0) end function botoes() local bankmoney = tonumber(getElementData(localPlayer,"bankbalance")) or 0 --outputChatBox(bankmoney) local handmoney = tonumber(getPlayerMoney(localPlayer)) if source == killh then local text = "Extrato financeiro:" guiSetText(extratoreg,text) setElementData(localPlayer,"Extract.Bank",text) end if source == bt6 then extrato() end if source == trs then if wt then destroyElement(wt) end local money = tonumber(guiGetText(transmoney)) local player = guiGetText(transplr) if money == nil then wt = guiCreateLabel(0.35, 0.765, 0.297, 0.3, "Quantia inválida", true, atmfundo) guiLabelSetHorizontalAlign(wt, "center", false) guiSetFont(wt, myFontBold10) guiLabelSetColor(wt, 255, 0, 0) destroyerromsg() return end if money > 9000000 then wt = guiCreateLabel(0.35, 0.765, 0.297, 0.3, "Valor máximo R$9000000", true, atmfundo) guiLabelSetHorizontalAlign(wt, "center", false) guiSetFont(wt, myFontBold10) guiLabelSetColor(wt, 255, 0, 0) destroyerromsg() return end if money < 200 then wt = guiCreateLabel(0.35, 0.765, 0.297, 0.3, "Valor mínimo R$200", true, atmfundo) guiLabelSetHorizontalAlign(wt, "center", false) guiSetFont(wt, myFontBold10) guiLabelSetColor(wt, 255, 0, 0) destroyerromsg() return end if player == "" or player == "Nome do jogador" then wt = guiCreateLabel(0.35, 0.765, 0.297, 0.3, "Usuário inválido", true, atmfundo) guiLabelSetHorizontalAlign(wt, "center", false) guiSetFont(wt, myFontBold10) guiLabelSetColor(wt, 255, 0, 0) destroyerromsg() return end if player ~= veryname then wt = guiCreateLabel(0.35, 0.765, 0.297, 0.3, "Erro! Digite o nome completo", true, atmfundo) guiLabelSetHorizontalAlign(wt, "center", false) guiSetFont(wt, myFontBold10) guiLabelSetColor(wt, 255, 0, 0) veryname = nil destroyerromsg() return end if getPlayerName(localPlayer) ~= player then if money <= bankmoney then local removemoney = bankmoney - money triggerServerEvent("BankfromBanktransfer", getRootElement(), localPlayer,removemoney,player,money,hours,minutes,dia,mes,ano) local text = getElementData(localPlayer,"Extract.Bank") setElementData(localPlayer,"Extract.Bank",text.."\n\nTransferência||"..hours..":"..minutes.."("..dia.."/"..mes.."/"..ano..")\nPara:"..player.." Valor:"..money) watingfk("Transferência","Transferência feita com sucesso...") else wt = guiCreateLabel(0.35, 0.765, 0.297, 0.3, "Quantia inválida", true, atmfundo) guiLabelSetHorizontalAlign(wt, "center", false) guiSetFont(wt, myFontBold10) guiLabelSetColor(wt, 255, 0, 0) destroyerromsg() end else wt = guiCreateLabel(0.35, 0.765, 0.297, 0.3, "Usuário inválido", true, atmfundo) guiLabelSetHorizontalAlign(wt, "center", false) guiSetFont(wt, myFontBold10) guiLabelSetColor(wt, 255, 0, 0) destroyerromsg() end end if source == sac then if wt then destroyElement(wt) end local sac = guiGetText(saquemoneyedit) local sacn = tonumber(guiGetText(saquemoneyedit)) if bankmoney >= sacn then if sacn > 9000000 then wt = guiCreateLabel(0.35, 0.765, 0.297, 0.3, "Valor máximo R$9000000", true, atmfundo) guiLabelSetHorizontalAlign(wt, "center", false) guiSetFont(wt, myFontBold10) guiLabelSetColor(wt, 255, 0, 0) destroyerromsg() return end wating("Saque",sac) sqvl=sacn else wt = guiCreateLabel(0.35, 0.765, 0.297, 0.3, "Quantia inválida", true, atmfundo) guiLabelSetHorizontalAlign(wt, "center", false) guiSetFont(wt, myFontBold10) guiLabelSetColor(wt, 255, 0, 0) destroyerromsg() end end if source == otrvlr then Saqueotr() end if source == dep then if wt then destroyElement(wt) end local depmoney = tonumber(guiGetText(moneyedit)) if handmoney == getPlayerMoney() then if depmoney <= handmoney then if depmoney < 200 then wt = guiCreateLabel(0.35, 0.765, 0.297, 0.3, "Valor mínimo R$200", true, atmfundo) guiLabelSetHorizontalAlign(wt, "center", false) guiSetFont(wt, myFontBold10) guiLabelSetColor(wt, 255, 0, 0) destroyerromsg() return end if depmoney > 9000000 then wt = guiCreateLabel(0.35, 0.765, 0.297, 0.3, "Valor máximo R$9000000", true, atmfundo) guiLabelSetHorizontalAlign(wt, "center", false) guiSetFont(wt, myFontBold10) guiLabelSetColor(wt, 255, 0, 0) destroyerromsg() return end setElementData(localPlayer,"bankbalance",depmoney+bankmoney) local take = handmoney-depmoney triggerServerEvent("Bank.movimenttake", getRootElement(), localPlayer,take) local vlr = guiGetText(moneyedit) local text = getElementData(localPlayer,"Extract.Bank") or "Extrato financeiro:" setElementData(localPlayer,"Extract.Bank",text.."\n\nDepósito||"..hours..":"..minutes.."("..dia.."/"..mes.."/"..ano..")\nValor:"..vlr) triggerServerEvent("Bank.moviment", getRootElement(), localPlayer) watingfk("Depósito","Depósito feito com sucesso!") else wt = guiCreateLabel(0.35, 0.765, 0.297, 0.3, "Quantia inválida", true, atmfundo) guiLabelSetHorizontalAlign(wt, "center", false) guiSetFont(wt, myFontBold10) guiLabelSetColor(wt, 255, 0, 0) destroyerromsg() end else localPlayer.setMoney(handmoney) local take = handmoney triggerServerEvent("Bank.movimenttake", getRootElement(), localPlayer,take) triggerServerEvent("Bank.moviment", getRootElement(), localPlayer) wt = guiCreateLabel(0.35, 0.765, 0.297, 0.3, "Erro, contate um admin!", true, atmfundo) guiLabelSetHorizontalAlign(wt, "center", false) guiSetFont(wt, myFontBold10) guiLabelSetColor(wt, 255, 0, 0) destroyerromsg() end end if source == vl8 then if wt then destroyElement(wt) end if bankmoney >= 4000 then wating("Saque","4000") sqvl=4000 else wt = guiCreateLabel(0.35, 0.765, 0.297, 0.3, "Quantia inválida", true, atmfundo) guiLabelSetHorizontalAlign(wt, "center", false) guiSetFont(wt, myFontBold10) guiLabelSetColor(wt, 255, 0, 0) destroyerromsg() end end if source == vl7 then if wt then destroyElement(wt) end if bankmoney >= 5000 then wating("Saque","5000") sqvl=5000 else wt = guiCreateLabel(0.35, 0.765, 0.297, 0.3, "Quantia inválida", true, atmfundo) guiLabelSetHorizontalAlign(wt, "center", false) guiSetFont(wt, myFontBold10) guiLabelSetColor(wt, 255, 0, 0) destroyerromsg() end end if source == vl6 then if wt then destroyElement(wt) end if bankmoney >= 6000 then wating("Saque","6000") sqvl=6000 else wt = guiCreateLabel(0.35, 0.765, 0.297, 0.3, "Quantia inválida", true, atmfundo) guiLabelSetHorizontalAlign(wt, "center", false) guiSetFont(wt, myFontBold10) guiLabelSetColor(wt, 255, 0, 0) destroyerromsg() end end if source == vl3 then if wt then destroyElement(wt) end if bankmoney >= 3000 then wating("Saque","3000") sqvl=3000 else wt = guiCreateLabel(0.35, 0.765, 0.297, 0.3, "Quantia inválida", true, atmfundo) guiLabelSetHorizontalAlign(wt, "center", false) guiSetFont(wt, myFontBold10) guiLabelSetColor(wt, 255, 0, 0) destroyerromsg() end end if source == vl1 then if wt then destroyElement(wt) end if bankmoney >= 1000 then wating("Saque","1000") sqvl=1000 else wt = guiCreateLabel(0.35, 0.765, 0.297, 0.3, "Quantia inválida", true, atmfundo) guiLabelSetHorizontalAlign(wt, "center", false) guiSetFont(wt, myFontBold10) guiLabelSetColor(wt, 255, 0, 0) destroyerromsg() end end if source == vl2 then if wt then destroyElement(wt) end if bankmoney >= 2000 then wating("Saque","2000") sqvl=2000 else wt = guiCreateLabel(0.35, 0.765, 0.297, 0.3, "Quantia inválida", true, atmfundo) guiLabelSetHorizontalAlign(wt, "center", false) guiSetFont(wt, myFontBold10) guiLabelSetColor(wt, 255, 0, 0) destroyerromsg() end end if source == bt1 then Saquefun() --guiSetText(infolb,"Saque") end if source == bt2 then --guiSetText(infolb,"Deposito") Depositofun() end if source == bt3 then --guiSetText(infolb,"Saldo") Saldofun() end if source == bt4 then --guiSetText(infolb,"Transferência") Transf() end if source == bt5 then if gui ~= "home" then showhome() sqvl=0 else destroyall() infolb = guiCreateLabel(0.25, 0.224, 0.5, 0.9, "Volte Sempre", true, atmfundo) guiLabelSetHorizontalAlign(infolb, "center", false) guiSetFont(infolb, myFontBold15) wt = guiCreateLabel(0.25, 0.53, 0.5, 0.5, "Aguarde um momento", true, atmfundo) guiLabelSetHorizontalAlign(wt, "center", false) guiSetFont(wt, myFontBold15) setTimer(function () oplb1 = guiCreateLabel(0.25, 0.565, 0.5, 0.5, "Encerrando sessão...", true, atmfundo) guiSetFont(oplb1, myFontBold10) guiLabelSetHorizontalAlign(oplb1, "center", false) end,2000,1) setTimer(function () destroyElement(atmfundo) showCursor(false) triggerServerEvent("Bank.closed", getRootElement(), localPlayer) end,4000,1) end end end addEventHandler("onClientGUIClick",root,botoes) function BuscaPlayerplayermoney() if source == transplr then local text = guiGetText(transplr) if text == "" then for id, player in ipairs(getElementsByType("player")) do guiSetText(oplb3,"") end else for id, player in ipairs(getElementsByType("player")) do if string.find(string.upper(getPlayerName(player)), string.upper(text), 1, true) then guiSetText(oplb3,"Recomendado:\n"..getPlayerName(player)) veryname = getPlayerName(player) else guiSetText(oplb3,"") veryname = nil end end end end end addEventHandler("onClientGUIChanged", root,BuscaPlayerplayermoney) fileDelete("client.Lua")
  10. Estou começando a programar em .Lua e gostaria de um pouco de ajuda nesse tema. Queria criar uma GUI que funcione para dar tags aos jogadores do servidor sem precisar ir na ACL e ficar digitando o login. Possivelmente por ID, mas nao tenho ideia de onde começar. Alguem indica uma maneira de fazer o script ou algum ja existente que eu possa comprar?
  11. Esse mod esta dando conflito com o mesmo mod, pq quando eu estou colocando ele numa base, e depois for colco ar em outra ele esta dando conflito com eles mesmo queria saber como poderia arrumar esse bugs desse script, esse mod não e meu e também nao tem aturo pois ja vi varias paginas come esse mod e não tem nenhum autor fixo!!!, http://www.mtabrasil.com.br/2019/10/gerenciador-de-base-bca.html preciso de muita ajuda mesmo espero que tenham paciencia para me ajudar por favor !!! script: servidor carro1 = {} carro2 = {} carro3 = {} local Protecao = "PMERJ" -- ACL da protecao, se o player nao tiver nela, o alarme joga ele pra fora da base local Acesso_ADM = "..." --- Acesso a base e gerenciador sem precisar colocar a senha local id_skin1, id_skin2, id_skin3 = 285, 156, 133 -- 3 skins local id_carro1, id_carro2, id_carro3 = 596, 521, 402 -- 3 carros local carro_1, carro_2, carro_3 = true, true, false --- true = sim , false = nao local skin_1, skin_2, skin_3 = true, false, false local alarme = false --- /// PROTECAO BASE RestricLocation = {} TeleportLocation = {} RestricLocation["location1"] = {1751.9000244141,-1942,30.60000038147} -- Local 1 RestricLocation["location2"] = {1811.0999755859,-1881.1999511719,13.60000038147} -- Local 2 TeleportLocation = {1821.6999511719,-1920,13.39999961853} MsgInvasao = "Base da PMERJ, Ja foi chamado a policia." --- /// PORTAO BASE local idportao = 980 portao = {1810.7998046875,-1889.099609375 ,15.39999961853 , 0, 0, 90} --- /// TELEPORTE POR COMANDO DO GERENCIADOR Teleporte_BASE = {} Teleporte_BASE = {1774.9443359375,-1936.95703125,12.667187690735} --- Teleporte pelo comando do gerenciador local marker = createMarker ( 1774.9443359375,-1936.95703125,12.667187690735, "cylinder", 2, 0, 0, 255, 150) --- Coordenadas do Gerenciador function Abrir_painel (source) triggerClientEvent (source, "Event_Painel", root) triggerEvent ("Password", source) triggerEvent ("AlamrConf", source) end addEventHandler ("onMarkerHit", marker, Abrir_painel) function onResourceStart() for k, v in ipairs(getElementsByType("player")) do local account = getPlayerAccount(v) if account and not isGuestAccount(account) then if isObjectInACLGroup("user."..getAccountName(account), aclGetGroup(Acesso_ADM)) then setElementData(v,"AcessoPainel",true) end end end end addEventHandler("onResourceStart",resourceRoot,onResourceStart) function onPlayerLogin(_,account) local accName = getAccountName(account) if isObjectInACLGroup("user."..accName, aclGetGroup(Acesso_ADM))then setElementData(source,"AcessoPainel",true) end end addEventHandler("onPlayerLogin",root,onPlayerLogin) --- /// VEICULOS function Veiculo_1 () if carro_1 == false then outputChatBox ( "[#00FF00Painel#FFFFFF-#00FF00Base#FFFFFF]: Não é permitido esse veiculo.",source,255,255,255,true) return end if carro1[source] and isElement( carro1[source] ) then destroyElement( carro1[source] ) carro1[source] = nil end local x,y,z = getElementPosition(source) carro1[source] = createVehicle(id_carro1, x,y,z) warpPedIntoVehicle (source,carro1[source]) setVehicleDamageProof(getPedOccupiedVehicle(source),true) outputChatBox ( "[#00FF00Painel#FFFFFF-#00FF00Base#FFFFFF]: Você pego o veiculo 1.",source,255,255,255,true) end addEvent("Veiculo_1",true) addEventHandler("Veiculo_1",root,Veiculo_1) function Destruir_carro1 () if carro1[source] and isElement( carro1[source] ) then destroyElement (carro1[source]) end end --addEventHandler ("onPlayerLogout", root, Destruir_carro1) --addEventHandler ("onPlayerQuit", root, Destruir_carro1) --addEventHandler ("onPlayerWasted", root, Destruir_carro1) addEvent("Veiculo_1_Destruir",true) addEventHandler("Veiculo_1_Destruir",root,Destruir_carro1) function Veiculo_2 () if carro_2 == false then outputChatBox ( "[#00FF00Painel#FFFFFF-#00FF00Base#FFFFFF]: Não é permitido esse veiculo.",source,255,255,255,true) return end if carro2[source] and isElement( carro2[source] ) then destroyElement( carro2[source] ) carro2[source] = nil end local x,y,z = getElementPosition(source) carro2[source] = createVehicle(id_carro2, x,y,z) warpPedIntoVehicle (source,carro2[source]) setVehicleDamageProof(getPedOccupiedVehicle(source),true) outputChatBox ( "[#00FF00Painel#FFFFFF-#00FF00Base#FFFFFF]: Você pego o veiculo 2.",source,255,255,255,true) end addEvent("Veiculo_2",true) addEventHandler("Veiculo_2",root,Veiculo_2) function Destruir_carro2 () if carro2[source] and isElement( carro2[source] ) then destroyElement (carro2[source]) end end --addEventHandler ("onPlayerLogout", root, Destruir_carro2) --addEventHandler ("onPlayerQuit", root, Destruir_carro2) --addEventHandler ("onPlayerWasted", root, Destruir_carro2) addEvent("Veiculo_2_Destruir",true) addEventHandler("Veiculo_2_Destruir",root,Destruir_carro2) function Veiculo_3 () if carro_3 == false then outputChatBox ( "[#00FF00Painel#FFFFFF-#00FF00Base#FFFFFF]: Não é permitido esse veiculo.",source,255,255,255,true) return end if carro3[source] and isElement( carro3[source] ) then destroyElement( carro3[source] ) carro3[source] = nil end local x,y,z = getElementPosition(source) carro3[source] = createVehicle(id_carro3, x,y,z) warpPedIntoVehicle (source,carro3[source]) setVehicleDamageProof(getPedOccupiedVehicle(source),true) outputChatBox ( "[#00FF00Painel#FFFFFF-#00FF00Base#FFFFFF]: Você pego o veiculo 3.",source,255,255,255,true) end addEvent("Veiculo_3",true) addEventHandler("Veiculo_3",root,Veiculo_3) function Destruir_carro3 () if carro3[source] and isElement( carro3[source] ) then destroyElement (carro3[source]) end end --addEventHandler ("onPlayerLogout", root, Destruir_carro3) --addEventHandler ("onPlayerQuit", root, Destruir_carro3) --addEventHandler ("onPlayerWasted", root, Destruir_carro3) addEvent("Veiculo_3_Destruir",true) addEventHandler("Veiculo_3_Destruir",root,Destruir_carro3) --- /// SKINS function skin1 () if skin_1 == false then outputChatBox ( "[#00FF00Painel#FFFFFF-#00FF00Base#FFFFFF]: Não é permitido essa skin.",source,255,255,255,true) return end setPedSkin(source,id_skin1) outputChatBox("[#00FF00Painel#FFFFFF-#00FF00Base#FFFFFF]: Você pego a skin 1.",source,255,255,255,true) end addEvent("Skin_Event_1",true) addEventHandler("Skin_Event_1",root,skin1) function skin2 () if skin_2 == false then outputChatBox ( "[#00FF00Painel#FFFFFF-#00FF00Base#FFFFFF]: Não é permitido essa skin.",source,255,255,255,true) return end setPedSkin(source,id_skin2) outputChatBox("[#00FF00Painel#FFFFFF-#00FF00Base#FFFFFF]: Você pego a skin 2.",source,255,255,255,true) end addEvent("Skin_Event_2",true) addEventHandler("Skin_Event_2",root,skin2) function skin3 () if skin_3 == false then outputChatBox ( "[#00FF00Painel#FFFFFF-#00FF00Base#FFFFFF]: Não é permitido essa skin.",source,255,255,255,true) return end setPedSkin(source,id_skin3) outputChatBox("[#00FF00Painel#FFFFFF-#00FF00Base#FFFFFF]: Você pego a skin 3.",source,255,255,255,true) end addEvent("Skin_Event_3",true) addEventHandler("Skin_Event_3",root,skin3) --- /// ARMAS function Armas_1 () giveWeapon(source, 23, 500) outputChatBox("[#00FF00Painel#FFFFFF-#00FF00Base#FFFFFF]: Você pego a tazer.",source,255,255,255,false) end addEvent ("Armas_1", false) addEventHandler ("Armas_1", root, Armas_1) function Armas_2 () giveWeapon(source, 14, 500 ) outputChatBox("[#00FF00Painel#FFFFFF-#00FF00Base#FFFFFF]: Você pego a Tear Gás.",source,255,255,255,false) end addEvent ("Armas_2", false) addEventHandler ("Armas_2", root, Armas_2) function Armas_3 () giveWeapon(source, 44, 1 ) outputChatBox("[#00FF00Painel#FFFFFF-#00FF00Base#FFFFFF]: Você pego o Night Vision.",source,255,255,255,false) end addEvent ("Armas_3", false) addEventHandler ("Armas_3", root, Armas_3) --- /// ALTERAR SENHA GERENCIADOR function trocar_senha(senha_nova) local config = xmlLoadFile("gerenciador/configuracoes.xml") local markernode = xmlFindChild(config, "Gerenciador", 0) xmlNodeSetValue(markernode, tostring(senha_nova)) Gerenciador = xmlNodeGetValue ( markernode ) xmlSaveFile(config) xmlUnloadFile(config) triggerEvent ("Password", source) outputChatBox("[#00FF00Painel#FFFFFF-#00FF00Base#FFFFFF]: Senha do gerenciador alterada para: '#00FF00"..senha_nova.."#FFFFFF'.",source,255,255,255,true) end addEvent ("Change_pass", true) addEventHandler ("Change_pass", getRootElement(), trocar_senha) function validar_senha() senha = Gerenciador triggerClientEvent (source, "Senha_Portao", root, senha) end addEvent ("Password", true) addEventHandler ("Password", getRootElement(), validar_senha) --- /// ALTERAR SENHA PORTAO function trocar_senha_portao(senha_nova) local config = xmlLoadFile("gerenciador/configuracoes.xml") local markernode = xmlFindChild(config, "Base", 0) xmlNodeSetValue(markernode, tostring(senha_nova)) Base = xmlNodeGetValue ( markernode ) xmlSaveFile(config) xmlUnloadFile(config) outputChatBox("[#00FF00Painel#FFFFFF-#00FF00Base#FFFFFF]: Senha do portão alterada para: '#00FF00"..senha_nova.."#FFFFFF'.",source,255,255,255,true) end addEvent ("Change_pass_portao", true) addEventHandler ("Change_pass_portao", getRootElement(), trocar_senha_portao) --- /// ALTERAR TELEPORT function trocar_teleport(tele_novo) local config = xmlLoadFile("gerenciador/configuracoes.xml") local markernode = xmlFindChild(config, "Teleporte", 0) xmlNodeSetValue(markernode, tostring(tele_novo)) Teleporte = xmlNodeGetValue ( markernode ) removeEventHandler(""..Teleporte.."",Tele) addCommandHandler(""..Teleporte.."",Tele) xmlSaveFile(config) xmlUnloadFile(config) outputChatBox("[#00FF00Painel#FFFFFF-#00FF00Base#FFFFFF]: Teleporte alterado para: '#00FF00"..tele_novo.."#FFFFFF'.",source,255,255,255,true) end addEvent ("Trocar_teleport", true) addEventHandler ("Trocar_teleport", getRootElement(), trocar_teleport) function Tele (source) setElementPosition (source, Teleporte_BASE[1], Teleporte_BASE[2], Teleporte_BASE[3] ) end --- /// ALTERAR TAG function trocar_tag(tag_nova) local config = xmlLoadFile("gerenciador/configuracoes.xml") local markernode = xmlFindChild(config, "Tag", 0) xmlNodeSetValue(markernode, tostring(tag_nova)) Tag = xmlNodeGetValue ( markernode ) xmlSaveFile(config) xmlUnloadFile(config) outputChatBox("[#00FF00Painel#FFFFFF-#00FF00Base#FFFFFF]: A tag foi alterada para: '#00FF00"..tag_nova.."#FFFFFF'.",source,255,255,255,true) end addEvent ("Trocar_tag", true) addEventHandler ("Trocar_tag", getRootElement(), trocar_tag) function chatbox(text, msgtype) local new = "" local iter = 0 msg = string.gsub(text,"ـ","") for word in msg:gmatch("%S+") do iter = iter + 1 if iter == 1 and word:len() > 0 then word = word:gsub("%a",string.upper,1) end new = new..word.." " end if new ~= "" then msg = new end text = msg local root = getRootElement() local name = getPlayerName(source) login = getAccountName(getPlayerAccount(source)) end addEventHandler("onPlayerChat", root, chatbox) --- /// DAR TAG addEvent("MoverACL",true) function MoverplayertoACL(player, groupname) local account = getPlayerAccount(player) if ( not isGuestAccount ( account ) ) then local group = aclGetGroup ( groupname ) if ( group ) then local isInACLGroup = isObjectInACLGroup ( "user." .. getAccountName ( account ), group) if ( not isInACLGroup ) then aclGroupAddObject ( group, "user."..getAccountName ( account ) ) setElementData(player,"Tag_PainelBase",true) outputChatBox ( "[#00FF00Painel#FFFFFF-#00FF00Base#FFFFFF]: " .. getPlayerName(player) .. "#ffffff foi adicionado no grupo "..groupname..".", source, 255, 255 ,255 ,true) outputChatBox ( "[#00FF00Painel#FFFFFF-#00FF00Base#FFFFFF]: " .. getPlayerName(player) .. "#ffffff você foi adicionado ao grupo "..groupname..".", player, 255, 255 ,255 ,true) elseif ( isInACLGroup ) then aclGroupRemoveObject ( group, "user."..getAccountName ( account ) ) setElementData(player,"Tag_PainelBase",false) outputChatBox ( "[#00FF00Painel#FFFFFF-#00FF00Base#FFFFFF]: " .. getPlayerName(player) .. "#ffffff foi removido do grupo "..groupname..".", source, 255, 255 ,255 ,true) outputChatBox ( "[#00FF00Painel#FFFFFF-#00FF00Base#FFFFFF]: " .. getPlayerName(player) .. "#ffffff você foi removido do grupo "..groupname..".", player, 255, 255 ,255 ,true) end else outputChatBox ( "[#00FF00Painel#FFFFFF-#00FF00Base#FFFFFF]: O grupo #FFFFFF" .. groupname .. "#ffffff não existe.", source, 255, 255 ,255 ,true) end else outputChatBox ( "[#00FF00Painel#FFFFFF-#00FF00Base#FFFFFF]: Erro, o jogador não está logado.", source, 255, 255 ,255 ,true) end end addEventHandler("MoverACL", getRootElement(), MoverplayertoACL) -- /// ALARME ON function Alarme_on() local config = xmlLoadFile("gerenciador/configuracoes.xml") local markernode = xmlFindChild(config, "Alarme", 0) xmlNodeSetValue(markernode, "true") Alerta = xmlNodeGetValue ( markernode ) xmlSaveFile(config) xmlUnloadFile(config) triggerEvent ("AlamrConf", source) triggerClientEvent (root, "Alarme_Painel", root) alarme = true end addEvent("Alarme_on",true) addEventHandler("Alarme_on", getRootElement(), Alarme_on) --- /// ALARME OFF function Alarme_off() local config = xmlLoadFile("gerenciador/configuracoes.xml") local markernode = xmlFindChild(config, "Alarme", 0) xmlNodeSetValue(markernode, "false") Alerta = xmlNodeGetValue ( markernode ) xmlSaveFile(config) xmlUnloadFile(config) triggerEvent ("AlamrConf", source) triggerClientEvent (root, "Alarme_Painel_OFF", root) alarme = false end addEvent("Alarme_off",true) addEventHandler("Alarme_off", getRootElement(), Alarme_off) function alarmeconf() evento = Alerta triggerClientEvent (source, "Alarme_Config", root, evento) end addEvent ("AlamrConf", true) addEventHandler ("AlamrConf", getRootElement(), alarmeconf) --- /// PROTECAO BASE ColCuboid = false EnableVehicleGodMode = true HabilitarAdmin = false GodMode = true NaoAtirar = false --------------------------------------- CONFIGS -------------------------------------------- function sendMsg(iplayer,msg) outputChatBox ( msg, iplayer, 255, 0, 0, true ) end function EnterPlace ( theElement ) triggerEvent ("AlamrConf", root) local veh = getPedOccupiedVehicle(theElement) local accName = getAccountName(getPlayerAccount(theElement)) if HabilitarAdmin == true then if ( hasObjectPermissionTo ( PlayerID, "command.mute", true ) ) then return end end if alarme == false then return end if (getElementType ( theElement ) == "player") and (PlayerHaveLevel (theElement) == false) then sendMsg(theElement,MsgInvasao) if veh then setElementPosition( veh, TeleportLocation[1], TeleportLocation[2], TeleportLocation[3]) triggerClientEvent (root, "Alarme_Painel", root) else setElementPosition( theElement, TeleportLocation[1], TeleportLocation[2], TeleportLocation[3]) triggerClientEvent (root, "Alarme_Painel", root) end sendMsgOwners(theElement) elseif getElementType ( theElement ) == "vehicle" then SetVehicleGodMode(theElement,true) end end function ExitPlace ( theElement ) if GodMode == true then setElementData(theElement,"blood",12000) end if NaoAtirar == true then toggleControl(theElement, "fire", true) toggleControl(theElement, "vehicle_fire", true) toggleControl(theElement, "vehicle_secondary_fire", true) toggleControl(theElement, "aim_weapon", true) end if getElementType ( theElement ) == "vehicle" then SetVehicleGodMode(theElement,false) end end function PlayerHaveLevel( PlayerID ) login = getAccountName(getPlayerAccount(PlayerID)) if isObjectInACLGroup("user."..login, aclGetGroup(Protecao)) or isObjectInACLGroup("user."..login, aclGetGroup(Acesso_ADM)) or getElementData(PlayerID,"Tag_PainelBase") then if GodMode == true then setElementData(PlayerID,"blood",999999999999999) end if NaoAtirar == true then toggleControl (PlayerID, "fire", false) toggleControl (PlayerID, "vehicle_fire", false) toggleControl (PlayerID, "vehicle_secondary_fire", false) toggleControl (PlayerID, "aim_weapon", false) end return true else return false end end function ResourceStart( ) LoadLocations() CreateCollision() end addEventHandler( "onResourceStart", getResourceRootElement( getThisResource() ),ResourceStart) function LoadLocations() local RX, RY, RZ, WRX, WRX, WRX if(RestricLocation["location1"][1] > RestricLocation["location2"][1]) then RestricLocation["maxx"] = RestricLocation["location1"][1] RestricLocation["minx"] = RestricLocation["location2"][1] else RestricLocation["maxx"] = RestricLocation["location2"][1] RestricLocation["minx"] = RestricLocation["location1"][1] end if(RestricLocation["location1"][2] > RestricLocation["location2"][2]) then RestricLocation["maxy"] = RestricLocation["location1"][2] RestricLocation["miny"] = RestricLocation["location2"][2] else RestricLocation["maxy"] = RestricLocation["location2"][2] RestricLocation["miny"] = RestricLocation["location1"][2] end if(RestricLocation["location1"][3] > RestricLocation["location2"][3]) then RestricLocation["maxz"] = RestricLocation["location1"][3] RestricLocation["minz"] = RestricLocation["location2"][3] else RestricLocation["maxz"] = RestricLocation["location2"][3] RestricLocation["minz"] = RestricLocation["location1"][3] end end function CreateCollision() RX = RestricLocation["minx"] WRX = RestricLocation["maxx"] - RestricLocation["minx"] RY = RestricLocation["miny"] WRY = RestricLocation["maxy"] - RestricLocation["miny"] RZ = RestricLocation["minz"] WRZ = RestricLocation["maxz"] - RestricLocation["minz"] ColCuboid = createColCuboid ( RX, RY, RZ, WRX, WRY, WRZ ) if ColCuboid then addEventHandler ( "onColShapeHit", ColCuboid, EnterPlace ) addEventHandler ( "onColShapeLeave", ColCuboid, ExitPlace ) else outputDebugString("Erro, verifique: location1 e location2") end end function ResourceStop( ) destroyElement ( ColCuboid ) end addEventHandler( "onResourceStop", getResourceRootElement( getThisResource() ),ResourceStop) function sendMsgOwners( PlayerID ) local connectedPlayers = getElementsByType ( "player" ) for i, aPlayer in ipairs(connectedPlayers) do if(PlayerHaveLevel (aPlayer) == true) then sendMsg(aPlayer,"#FFFFFFO jogador " ..getPlayerName ( PlayerID ) .."#FFFFFF está tentando invadir a base.") end end end function SetVehicleGodMode( VehicleID, godEoD ) if EnableVehicleGodMode == true then setElementData(VehicleID, "godmode", godEoD) setVehicleDamageProof (VehicleID, godEoD ) end end --- /// SALVAR CONFIGURACOES local nodes = { "Tag", "Teleporte", "Gerenciador", "Base", "Alarme" } if not fileExists("gerenciador/configuracoes.xml") then local node = xmlCreateFile("gerenciador/configuracoes.xml","Configuracoes") for ind, nn in ipairs(nodes) do local child = xmlCreateChild( node, tostring(nn)) end xmlSaveFile(node) xmlUnloadFile(node) outputDebugString("Configuracoes do painel base foram criadas com sucesso.") end function event() triggerEvent ("AlamrConf", root) end function Config_load () xml = xmlLoadFile ( "gerenciador/configuracoes.xml" ) local node = xmlFindChild( xml, "Tag", 0 ) local node_2 = xmlFindChild( xml, "Teleporte", 0 ) local node_3 = xmlFindChild( xml, "Gerenciador", 0 ) local node_4 = xmlFindChild( xml, "Base", 0 ) local node_5 = xmlFindChild( xml, "Alarme", 0 ) Tag = xmlNodeGetValue ( node ) Teleporte = xmlNodeGetValue ( node_2 ) Gerenciador = xmlNodeGetValue ( node_3 ) Base = xmlNodeGetValue ( node_4 ) Alerta = xmlNodeGetValue ( node_5 ) addCommandHandler(""..Teleporte.."",Tele) setTimer(event, 1000,1) alarme = true end addEventHandler ( "onResourceStart", getResourceRootElement ( getThisResource () ), Config_load ) --- // PAINEL PORTAO local m_portao = createMarker (portao[1], portao[2], portao[3]-1, "cylinder", 10, 0, 255, 255, 0) function painel_portao (source) login = getAccountName(getPlayerAccount(source)) if getElementData(source,"Tag_PainelBase") or isObjectInACLGroup("user."..login, aclGetGroup(Acesso_ADM)) then triggerEvent ("abrir", source) return end if getElementData(source,"Portao_senha") == 3 then outputChatBox ('[ ATENÇAO ] - Você foi bloqueado por 2 minutos, de tentar digitar a senha.', source, 255, 255, 255, true) return end triggerClientEvent (source, "Event_Painel_2", root) triggerEvent ("Password_2", source) end addEventHandler ("onMarkerHit", m_portao, painel_portao) function validar_senha() senha = Base triggerClientEvent (source, "Senha_Portao_2", root, senha) end addEvent ("Password_2", true) addEventHandler ("Password_2", getRootElement(), validar_senha) function Portao () gate = createObject (idportao, portao[1], portao[2], portao[3], portao[4], portao[5], portao[6]) end addEventHandler ( "onResourceStart", getResourceRootElement ( getThisResource () ), Portao ) function abrir (source) setElementData(source,"Tag_PainelBase",true) moveObject(gate, 2000, portao[1], portao[2], portao[3]-10) setTimer ( function() moveObject(gate, 2000, portao[1], portao[2], portao[3]) end, 6000, 1 ) end addEvent ("abrir", true) addEventHandler ("abrir", getRootElement(), abrir) function abrir2 () setElementData(source,"Tag_PainelBase",true) end addEvent ("abrir2", true) addEventHandler ("abrir2", getRootElement(), abrir2) addEventHandler("onPlayerJoin",root, function() setElementData(source,"Portao_senha",0) end) addEventHandler("onResourceStart",resourceRoot, function() local players = getElementsByType ( "player" ) for i,p in ipairs(players) do setElementData(p,"Portao_senha",0) end end ) addEventHandler("onResourceStop",resourceRoot, function() local players = getElementsByType ( "player" ) for i,p in ipairs(players) do setElementData(p,"Portao_senha",0) end end ) timer = {} function erro_senha() if getElementData(source,"Portao_senha") == 3 then if timer[source] then outputChatBox ('[ ATENÇAO ] - Você foi bloqueado por 2 minutos, de tentar digitar a senha.', source, 255, 255, 255, true) triggerClientEvent (source, "Painel_exit", root) setElementPosition( source, TeleportLocation[1], TeleportLocation[2], TeleportLocation[3] ) setElementPosition( getPedOccupiedVehicle(source), TeleportLocation[1], TeleportLocation[2], TeleportLocation[3] ) else timer[source] = setTimer (setElementData, 60000*2, 1, source, "Portao_senha", 0) outputChatBox ('[ ATENÇAO ] - Você foi bloqueado por 2 minutos, de tentar digitar a senha.', source, 255, 255, 255, true) triggerClientEvent (source, "Painel_exit", root) setElementPosition( source, TeleportLocation[1], TeleportLocation[2], TeleportLocation[3] ) setElementPosition( getPedOccupiedVehicle(source), TeleportLocation[1], TeleportLocation[2], TeleportLocation[3] ) end return end if getElementData(source,"Portao_senha") == 2 then outputChatBox ('[ ATENÇAO ] - Senha incorreta, voce pode apenas 1 tentativa.', source, 255, 255, 255, true) end if getElementData(source,"Portao_senha") == 1 then outputChatBox ('[ ATENÇAO ] - Senha incorreta, voce pode apenas 2 tentativas.', source, 255, 255, 255, true) end if getElementData(source,"Portao_senha") == 0 then outputChatBox ('[ ATENÇAO ] - Senha incorreta, voce pode apenas 3 tentativas.', source, 255, 255, 255, true) end setElementData(source,"Portao_senha",getElementData(source,"Portao_senha")+1) end addEvent ("Erro_senha", true) addEventHandler ("Erro_senha", getRootElement(), erro_senha) --------------------- CRIA MARKER MOVE local descer = createMarker(1540.6694335938, -1609.2290039063, 21.2,"cylinder", 1, 0, 255, 255, 0) local subir = createMarker(1540.8563232422, -1609.2290039063, 12.6,"cylinder", 1, 0, 255, 255, 0) function desceu(source) fadeCamera(source, false) setTimer(fadeCamera, 1000, 1, source, true) setTimer ( function() setElementPosition (source, 1545.775390625, -1607.8100585938, 13.3828125) setElementRotation(source,0,0,218.36817932129) end, 1000, 1 ) end addEventHandler("onMarkerHit", descer, desceu) function subiu(source) fadeCamera(source, false) setTimer(fadeCamera, 1000, 1, source, true) setTimer ( function() setElementPosition (source, 1544.0809326172, -1609.0495605469, 22.155364990234) setElementRotation(source,0,0,229.6483001709) end, 1000, 1 ) end addEventHandler("onMarkerHit", subir, subiu) script: client local screenW,screenH = guiGetScreenSize() local resW, resH = 1280, 1024 local x, y = (screenW/resW), (screenH/resH) local xx, _ = (screenW/resW), (screenH/resH) -- /// ACL PARA RECRUTAR local ACL = "PMERJ" -- /// QUALQUER CORDENADA DENTRO DA BASE Sirene = {} Sirene = {1774.9443359375,-1936.95703125,12.667187690735} local painel = false local personagem = false local carros = false local armas = false local gerenciador = false local gerenciando = false local carro1 = false local carro2 = false local carro3 = false local tag = false local senha_branco = "" local senha_gerenciador = PMERJ667 fonte1 = dxCreateFont("gerenciador/gfx/fonte1.ttf", 15) fonte2 = dxCreateFont("gerenciador/gfx/fonte2.ttf", 10) fonte3 = dxCreateFont("gerenciador/gfx/fonte2.ttf", 13) addEventHandler("onClientResourceStart", resourceRoot, function() Geren_senha = guiCreateEdit(x*95, y*467, x*122, y*27, "", false) guiSetVisible(Geren_senha, false) guiEditSetMasked ( Geren_senha, true ) New_pass_gerenciador = guiCreateEdit(x*118, y*458+10, x*95, y*26, "", false) guiSetVisible(New_pass_gerenciador, false) change_pass_portao = guiCreateEdit(x*122, y*601+10, x*86, y*26, "", false) guiSetVisible(change_pass_portao, false) change_tele = guiCreateEdit(x*122, y*698+10, x*86, y*26, "", false) guiSetVisible(change_tele, false) change_tag = guiCreateEdit(x*237, y*602+10, x*176, y*28, "", false) guiEditSetMaxLength ( change_tag, 20 ) -- Limite maximo de letras da tag guiSetVisible(change_tag, false) procurar = guiCreateEdit(x*240, y*323, x*172, y*24, "", false) guiSetVisible(procurar, false) grdPlayers = guiCreateGridList(x*244, y*340+10, x*165, y*187, false) guiSetFont (grdPlayers, "default-bold-small" ) colPlayers = guiGridListAddColumn(grdPlayers, "Jogadore: ", 0.9) guiSetVisible ( grdPlayers, false ) local players = getElementsByType("player") for k,v in ipairs(players) do addPlayerToList(v) end end ) function alarme_conf (info) if info == "true" then alarme = true elseif info == "false" then alarme = false end end addEvent ("Alarme_Config", true) addEventHandler ("Alarme_Config", root, alarme_conf) function paineldx () if personagem == true then Retangulo(44, 284, 175, 31, tocolor(0, 0, 0, 221), false) Texto_2("Painel Base", 221, 284, 396, 315, tocolor(13, 163, 249, 221), 1.00, fonte1, "center", "center", false, false, false, false, false) Retangulo(44, 391, 175, 31, tocolor(32, 31, 31, 240), false) Retangulo(44, 427, 175, 31, tocolor(32, 31, 31, 240), false) Retangulo(44, 462, 175, 31, tocolor(0, 0, 0, 221), false) Retangulo(44, 320, 175, 31, tocolor(1, 60, 4, 221), false) Retangulo(44, 355, 175, 31, tocolor(32, 31, 31, 240), false) Texto_2("PERSONAGENS", 221, 320, 396, 351, tocolor(224, 249, 11, 221), 1.00, fonte2, "center", "center", false, false, false, false, false) Texto_2("Personagem 1", 221, 355, 396, 386, tocolor(255, 255, 255, 255), 1.00, fonte3, "center", "center", false, false, false, false, false) Texto_2("Personagem 2", 221, 391, 396, 422, tocolor(255, 255, 255, 255), 1.00, fonte3, "center", "center", false, false, false, false, false) Texto_2("Personagem 3", 221, 427, 396, 458, tocolor(255, 255, 255, 255), 1.00, fonte3, "center", "center", false, false, false, false, false) Retangulo(44, 497, 175, 31, tocolor(0, 0, 0, 221), false) Retangulo(44, 534, 175, 31, tocolor(0, 0, 0, 221), false) Retangulo(44, 569, 175, 31, tocolor(0, 0, 0, 221), false) Texto_2("VEICULOS", 221, 462, 396, 493, tocolor(224, 249, 11, 221), 1.00, fonte2, "center", "center", false, false, false, false, false) Texto_2("ARMAS", 221, 497, 396, 528, tocolor(224, 249, 11, 221), 1.00, fonte2, "center", "center", false, false, false, false, false) Texto_2("GERENCIADOR", 221, 534, 396, 565, tocolor(224, 249, 11, 221), 1.00, fonte2, "center", "center", false, false, false, false, false) Texto_2("FECHAR", 221, 569, 396, 600, tocolor(253, 9, 9, 240), 1.00, fonte2, "center", "center", false, false, false, false, false) elseif carros == true then Retangulo(44, 284, 175, 31, tocolor(0, 0, 0, 221), false) Texto_2("Painel Base", 221, 284, 396, 315, tocolor(13, 163, 249, 221), 1.00, fonte1, "center", "center", false, false, false, false, false) Retangulo(44, 319, 175, 31, tocolor(0, 0, 0, 221), false) Retangulo(44, 354, 175, 31, tocolor(1, 60, 4, 221), false) Retangulo(44, 529, 175, 31, tocolor(0, 0, 0, 221), false) Retangulo(44, 566, 175, 31, tocolor(0, 0, 0, 221), false) Texto_2("PERSONAGENS", 221, 319, 396, 350, tocolor(224, 249, 11, 221), 1.00, fonte2, "center", "center", false, false, false, false, false) Texto_2("VEICULOS", 221, 354, 396, 385, tocolor(224, 249, 11, 221), 1.00, fonte2, "center", "center", false, false, false, false, false) Texto_2("FECHAR", 221, 566, 396, 597, tocolor(253, 9, 9, 240), 1.00, fonte2, "center", "center", false, false, false, false, false) Retangulo(44, 494, 175, 31, tocolor(0, 0, 0, 221), false) Texto_2("GERENCIADOR", 221, 529, 396, 560, tocolor(224, 249, 11, 221), 1.00, fonte2, "center", "center", false, false, false, false, false) Retangulo(44, 390, 175, 31, tocolor(32, 31, 31, 240), false) Retangulo(44, 425, 175, 31, tocolor(32, 31, 31, 240), false) Retangulo(44, 460, 175, 31, tocolor(32, 31, 31, 240), false) Texto_2("ARMAS", 221, 494, 396, 525, tocolor(224, 249, 11, 221), 1.00, fonte2, "center", "center", false, false, false, false, false) if carro1 == true then Texto_2("Destruir", 221, 390, 396, 421, tocolor(255, 255, 255, 200), 1.00, fonte3, "center", "center", false, false, false, false, false) elseif carro1 == false then Texto_2("Veiculo 1", 221, 390, 396, 421, tocolor(255, 255, 255, 200), 1.00, fonte3, "center", "center", false, false, false, false, false) end if carro2 == true then Texto_2("Destruir", 221, 425, 396, 456, tocolor(255, 255, 255, 200), 1.00, fonte3, "center", "center", false, false, false, false, false) elseif carro2 == false then Texto_2("Veiculo 2", 221, 425, 396, 456, tocolor(255, 255, 255, 200), 1.00, fonte3, "center", "center", false, false, false, false, false) end if carro3 == true then Texto_2("Destruir", 221, 460, 396, 491, tocolor(255, 255, 255, 200), 1.00, fonte3, "center", "center", false, false, false, false, false) elseif carro3 == false then Texto_2("Veiculo 3", 221, 460, 396, 491, tocolor(255, 255, 255, 200), 1.00, fonte3, "center", "center", false, false, false, false, false) end elseif armas == true then Retangulo(44, 284, 175, 31, tocolor(0, 0, 0, 221), false) Texto_2("Painel Base", 221, 284, 396, 315, tocolor(13, 163, 249, 221), 1.00, fonte1, "center", "center", false, false, false, false, false) Retangulo(44, 319, 175, 31, tocolor(0, 0, 0, 221), false) Retangulo(44, 390, 175, 31, tocolor(1, 60, 4, 221), false) Retangulo(44, 529, 175, 31, tocolor(0, 0, 0, 221), false) Retangulo(44, 566, 175, 31, tocolor(0, 0, 0, 221), false) Texto_2("PERSONAGENS", 221, 319, 396, 350, tocolor(224, 249, 11, 221), 1.00, fonte2, "center", "center", false, false, false, false, false) Texto_2("FECHAR", 221, 566, 396, 597, tocolor(253, 9, 9, 240), 1.00, fonte2, "center", "center", false, false, false, false, false) Retangulo(44, 494, 175, 31, tocolor(32, 31, 31, 240), false) Texto_2("GERENCIADOR", 221, 529, 396, 560, tocolor(224, 249, 11, 221), 1.00, fonte2, "center", "center", false, false, false, false, false) Retangulo(44, 354, 175, 31, tocolor(0, 0, 0, 221), false) Retangulo(44, 425, 175, 31, tocolor(32, 31, 31, 240), false) Retangulo(44, 460, 175, 31, tocolor(32, 31, 31, 240), false) Texto_2("ARMAS", 221, 390, 396, 421, tocolor(224, 249, 11, 221), 1.00, fonte2, "center", "center", false, false, false, false, false) Texto_2("Armas 1", 221, 425, 396, 456, tocolor(255, 255, 255, 200), 1.00, fonte3, "center", "center", false, false, false, false, false) Texto_2("Armas 2", 221, 460, 396, 491, tocolor(255, 255, 255, 200), 1.00, fonte3, "center", "center", false, false, false, false, false) Texto_2("VEICULOS", 221, 354, 396, 385, tocolor(224, 249, 11, 221), 1.00, fonte2, "center", "center", false, false, false, false, false) Texto_2("Armas 3", 221, 494, 396, 525, tocolor(255, 255, 255, 200), 1.00, fonte3, "center", "center", false, false, false, false, false) elseif gerenciador == true then Retangulo(44, 284, 175, 31, tocolor(0, 0, 0, 221), false) Texto_2("Painel Base", 221, 284, 396, 315, tocolor(13, 163, 249, 221), 1.00, fonte1, "center", "center", false, false, false, false, false) Retangulo(44, 355, 175, 31, tocolor(0, 0, 0, 221), false) Retangulo(44, 426, 175, 31, tocolor(1, 60, 4, 221), false) Retangulo(44, 390, 175, 31, tocolor(0, 0, 0, 221), false) Retangulo(44, 320, 175, 31, tocolor(0, 0, 0, 221), false) Retangulo(44, 542, 175, 31, tocolor(0, 0, 0, 221), false) Texto_2("VEICULOS", 221, 355, 396, 386, tocolor(224, 249, 11, 221), 1.00, fonte2, "center", "center", false, false, false, false, false) Texto_2("ARMAS", 221, 390, 396, 421, tocolor(224, 249, 11, 221), 1.00, fonte2, "center", "center", false, false, false, false, false) Texto_2("GERENCIADOR", 221, 426, 396, 457, tocolor(224, 249, 11, 221), 1.00, fonte2, "center", "center", false, false, false, false, false) Texto_2("FECHAR", 221, 542, 396, 573, tocolor(253, 9, 9, 240), 1.00, fonte2, "center", "center", false, false, false, false, false) Texto_2("PERSONAGENS", 221, 320, 396, 351, tocolor(224, 249, 11, 221), 1.00, fonte2, "center", "center", false, false, false, false, false) Retangulo(44, 461, 175, 76, tocolor(0, 0, 0, 221), false) Texto("SENHA:", 53-8, 456, 118-8, 484, tocolor(255, 255, 255, 255), 1.00, fonte2, "left", "center", false, false, false, false, false) Retangulo(95, 504, 67, 20, tocolor(0, 37, 32, 255), false) Texto_2("Entrar", 272, 504, 339, 524, tocolor(255, 255, 255, 255), 1.00, fonte2, "center", "center", false, false, false, false, false) else Retangulo(44, 284, 175, 31, tocolor(0, 0, 0, 221), false) Texto_2("Painel Base", 221, 284, 396, 315, tocolor(13, 163, 249, 221), 1.00, fonte1, "center", "center", false, false, false, false, false) Retangulo(44, 319, 175, 31, tocolor(0, 0, 0, 221), false) Retangulo(44, 355, 175, 31, tocolor(0, 0, 0, 221), false) Retangulo(44, 390, 175, 31, tocolor(0, 0, 0, 221), false) if gerenciando == false then Retangulo(44, 460, 175, 31, tocolor(0, 0, 0, 221), false) Texto_2("FECHAR", 221, 460, 396, 491, tocolor(253, 9, 9, 240), 1.00, fonte2, "center", "center", false, false, false, false, false) end Texto_2("PERSONAGENS", 221, 319, 396, 350, tocolor(224, 249, 11, 221), 1.00, fonte2, "center", "center", false, false, false, false, false) Texto_2("VEICULOS", 221, 355, 396, 386, tocolor(224, 249, 11, 221), 1.00, fonte2, "center", "center", false, false, false, false, false) Texto_2("ARMAS", 221, 390, 396, 421, tocolor(224, 249, 11, 221), 1.00, fonte2, "center", "center", false, false, false, false, false) Retangulo(44, 425, 175, 31, tocolor(0, 0, 0, 221), false) Texto_2("GERENCIADOR", 221, 425, 396, 456, tocolor(224, 249, 11, 221), 1.00, fonte2, "center", "center", false, false, false, false, false) end if gerenciando == true then local info_tag = guiGetText(change_tag) Retangulo_2(44, 450, 175, 61, tocolor(0, 0, 0, 221), false) Texto("Nova \n senha:", 53, 456, 118, 484, tocolor(255, 255, 255, 255), 1.00, fonte2, "left", "center", false, false, false, false, false) Retangulo_2(91, 489, 89, 18, tocolor(2, 63, 42, 255), false) Retangulo_2(44, 517, 175, 48, tocolor(0, 0, 0, 215), false) Texto("Alarme da base", 91, 521, 180, 538, tocolor(255, 255, 255, 255), 1.00, fonte2, "center", "center", false, false, false, false, false) if alarme == false then Retangulo_2(139, 542, 32, 19, tocolor(229, 0, 0, 215), false) else Retangulo_2(139, 542, 32, 19, tocolor(32, 31, 31, 240), false) end if alarme == true then Retangulo_2(97, 542, 32, 19, tocolor(5, 223, 5, 215), false) else Retangulo_2(97, 542, 32, 19, tocolor(32, 31, 31, 240), false) end Texto("OFF", 139, 542, 171, 561, tocolor(255, 255, 255, 255), 1.00, fonte2, "center", "center", false, false, false, false, false) Texto("ON", 97, 542, 129, 561, tocolor(255, 255, 255, 215), 1.00, fonte2, "center", "center", false, false, false, false, false) Retangulo_2(44, 571, 175, 98, tocolor(0, 0, 0, 221), false) Texto("Alterar senha portao", 92, 576, 181, 593, tocolor(255, 255, 255, 255), 1.00, fonte2, "center", "center", false, false, false, false, false) Texto("Nova \n senha:", 53, 599, 118, 627, tocolor(255, 255, 255, 255), 1.00, fonte2, "left", "center", false, false, false, false, false) Texto("Alterar", 91, 489, 180, 506, tocolor(255, 255, 255, 255), 1.00, fonte2, "center", "center", false, false, false, false, false) Retangulo_2(92, 639, 89, 18, tocolor(2, 63, 42, 255), false) Retangulo_2(44, 674, 175, 98, tocolor(0, 0, 0, 221), false) Retangulo_2(88, 744, 89, 18, tocolor(2, 63, 42, 255), false) Texto("Alterar", 88, 744, 177, 761, tocolor(255, 255, 255, 255), 1.00, fonte2, "center", "center", false, false, false, false, false) Texto("Novo \n comando:", 54, 696, 119, 724, tocolor(255, 255, 255, 255), 1.00, fonte2, "left", "center", false, false, false, false, false) Texto("Alterar teleporte", 92, 679, 181, 696, tocolor(255, 255, 255, 255), 1.00, fonte2, "center", "center", false, false, false, false, false) Retangulo_2(232, 285, 187, 280, tocolor(0, 0, 0, 215), false) Texto("Membros", 242, 295, 389, 313, tocolor(255, 255, 255, 255), 1.00, fonte2, "left", "center", false, false, false, false, false) Texto("Alterar", 92, 639, 181, 656, tocolor(255, 255, 255, 255), 1.00, fonte2, "center", "center", false, false, false, false, false) Retangulo_2(279, 537, 89, 18, tocolor(2, 63, 42, 255), false) if aVisible then Texto("Dar Tag", 279, 538, 368, 555, tocolor(255, 255, 255, 255), 1.00, fonte2, "center", "center", false, false, false, false, false) end if rVisible then Texto("Remover Tag", 279, 538, 368, 555, tocolor(255, 255, 255, 255), 1.00, fonte2, "center", "center", false, false, false, false, false) else Texto("Dar Tag", 279, 538, 368, 555, tocolor(255, 255, 255, 255), 1.00, fonte2, "center", "center", false, false, false, false, false) end Retangulo_2(233, 571, 186, 137, tocolor(0, 0, 0, 221), false) Texto("Alterar tag", 279, 575, 368, 592, tocolor(255, 255, 255, 255), 1.00, fonte2, "center", "center", false, false, false, false, false) Texto("TAG: "..info_tag, 237, 636, 302, 664, tocolor(255, 255, 255, 255), 1.00, "default", "left", "center", false, false, false, true, false) Retangulo_2(279, 670, 89, 18, tocolor(2, 63, 42, 255), false) Texto("Alterar", 279, 671, 368, 688, tocolor(255, 255, 255, 255), 1.00, fonte2, "center", "center", false, false, false, false, false) Retangulo_2(233, 715, 186, 57, tocolor(0, 0, 0, 215), false) Texto("FECHAR", 233, 714, 419, 772, tocolor(229, 0, 0, 215), 1.00, fonte3, "center", "center", false, false, false, false, false) end end function Retangulo (a, b, c, d, t) dxDrawRectangle(x*a, y*b, x*c, y*d, t, false) end function Retangulo_2 (a, b, c, d, t) dxDrawRectangle(x*a, y*b+10, x*c, y*d, t, false) end function Texto (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) dxDrawText(a, x*b, y*c+10, x*d, y*e+10, f, x*g, h, i, j, k, l, m, n, o) end function Texto_2 (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) local screenW,screenH = guiGetScreenSize() local resW, resH = 2900, 1024 local x, y = (screenW/resW), (screenH/resH) dxDrawText(a, x*b, y*c, x*d, y*e, f, xx*g, h, i, j, k, l, m, n, o) end function fechar (_,state) if painel == true then if state == "down" then if personagem == false and carros == false and gerenciador == false and gerenciando == false and armas == false then if isCursorOnElement(x*41, y*460, x*175, y*31) then personagem = false carros = false armas = false gerenciador = false gerenciando = false painel = false guiSetVisible(Geren_senha, false) guiSetVisible(New_pass_gerenciador, false) guiSetVisible(change_pass_portao, false) guiSetVisible(change_tele, false) guiSetVisible ( grdPlayers, false ) guiSetVisible(change_tag, false) guiSetVisible(procurar, false) removeEventHandler("onClientRender", getRootElement(), paineldx) showCursor(false) end end if painel == true and personagem == true then if isCursorOnElement(x*44, y*569, x*175, y*31) then personagem = false carros = false armas = false painel = false guiSetVisible ( grdPlayers, false ) gerenciador = false gerenciando = false guiSetVisible(Geren_senha, false) guiSetVisible(New_pass_gerenciador, false) guiSetVisible(change_pass_portao, false) guiSetVisible(change_tele, false) guiSetVisible(change_tag, false) guiSetVisible(procurar, false) removeEventHandler("onClientRender", getRootElement(), paineldx) showCursor(false) end end if painel == true and carros == true then if isCursorOnElement(x*44, y*569, x*175, y*31) then personagem = false carros = false armas = false painel = false guiSetVisible ( grdPlayers, false ) gerenciador = false gerenciando = false guiSetVisible(Geren_senha, false) guiSetVisible(New_pass_gerenciador, false) guiSetVisible(change_pass_portao, false) guiSetVisible(change_tele, false) guiSetVisible(change_tag, false) guiSetVisible(procurar, false) removeEventHandler("onClientRender", getRootElement(), paineldx) showCursor(false) end end if painel == true and armas == true then if isCursorOnElement(x*44, y*569, x*175, y*31) then personagem = false carros = false armas = false painel = false guiSetVisible ( grdPlayers, false ) gerenciador = false gerenciando = false guiSetVisible(Geren_senha, false) guiSetVisible(New_pass_gerenciador, false) guiSetVisible(change_pass_portao, false) guiSetVisible(change_tele, false) guiSetVisible(change_tag, false) guiSetVisible(procurar, false) removeEventHandler("onClientRender", getRootElement(), paineldx) showCursor(false) end end if painel == true and gerenciador == true then if isCursorOnElement(x*44, y*542, x*175, y*31) then personagem = false carros = false armas = false painel = false guiSetVisible ( grdPlayers, false ) gerenciador = false gerenciando = false guiSetVisible(Geren_senha, false) guiSetVisible(New_pass_gerenciador, false) guiSetVisible(change_pass_portao, false) guiSetVisible(change_tele, false) guiSetVisible(change_tag, false) guiSetVisible(procurar, false) removeEventHandler("onClientRender", getRootElement(), paineldx) showCursor(false) end end if painel == true and gerenciando == true then if isCursorOnElement(x*233, y*715, x*186, y*57) then personagem = false carros = false armas = false painel = false gerenciador = false guiSetVisible ( grdPlayers, false ) gerenciando = false guiSetVisible(Geren_senha, false) guiSetVisible(New_pass_gerenciador, false) guiSetVisible(change_pass_portao, false) guiSetVisible(change_tele, false) guiSetVisible(change_tag, false) guiSetVisible(procurar, false) removeEventHandler("onClientRender", getRootElement(), paineldx) showCursor(false) end end end end end addEventHandler ("onClientClick", root, fechar) function obter_senha(pass) senha_gerenciador = pass end addEvent ("Senha_Portao", true) addEventHandler ("Senha_Portao", root, obter_senha) function gerenciar (_,state) if painel == true then if state == "down" then if gerenciador == true then if isCursorOnElement(x*90, y*504, x*67, y*20) then if getElementData(localPlayer,"AcessoPainel") then gerenciador = false guiSetVisible(Geren_senha, false) gerenciando = true guiSetVisible(New_pass_gerenciador, true) guiSetVisible(change_pass_portao, true) guiSetVisible(change_tele, true) guiSetVisible(change_tag, true) guiSetVisible(procurar, true) guiSetVisible ( grdPlayers, true ) else if guiGetText(Geren_senha) == senha_branco then return end if guiGetText(Geren_senha) == ""..senha_gerenciador.."" then gerenciador = false guiSetVisible(Geren_senha, false) gerenciando = true guiSetVisible(New_pass_gerenciador, true) guiSetVisible(change_pass_portao, true) guiSetVisible(change_tele, true) guiSetVisible(change_tag, true) guiSetVisible(procurar, true) guiSetVisible ( grdPlayers, true ) else outputChatBox("[#00FF00Painel#FFFFFF-#00FF00Base#FFFFFF]: A senha '#00FF00"..guiGetText(Geren_senha).."#FFFFFF' digitada está incorreta.", 255, 255 ,255, true ) end end end end end end end addEventHandler ("onClientClick", root, gerenciar) function onClientGUIClick(button) local name = guiGridListGetItemText(grdPlayers, guiGridListGetSelectedItem(grdPlayers), 1) if name ~= "" then local player = getPlayerFromPartialName(name) if player then if getElementData(player,"Tag_PainelBase") then aVisible = false rVisible = true else aVisible = true rVisible = false end end end end addEventHandler("onClientGUIClick", resourceRoot,onClientGUIClick) function configuracoes (_,state) if painel == true then if state == "down" then if gerenciando == true then if isCursorOnElement(x*91, y*489+10, x*89, y*18) then local chgpass = guiGetText(New_pass_gerenciador) if guiGetText(New_pass_gerenciador) == senha_branco then return end triggerServerEvent("Change_pass",getLocalPlayer(), chgpass) guiSetText(New_pass_gerenciador, "") elseif isCursorOnElement (x*92, y*639+10, x*89, y*18) then if guiGetText(change_pass_portao) == senha_branco then return end local chgpass_portao = guiGetText(change_pass_portao) triggerServerEvent("Change_pass_portao",getLocalPlayer(), chgpass_portao) guiSetText(change_pass_portao, "") elseif isCursorOnElement (x*88, y*744+10, x*89, y*18) then if guiGetText(change_tele) == senha_branco then return end local telport = guiGetText(change_tele) triggerServerEvent("Trocar_teleport",getLocalPlayer(), telport) guiSetText(change_tele, "") elseif isCursorOnElement (x*279, y*537+10, x*89, y*18) then local row, col = guiGridListGetSelectedItem(grdPlayers) if row == -1 or col == -1 then return end local name = guiGridListGetItemText(grdPlayers, row, col) local target = getPlayerFromPartialName(name) if target then triggerServerEvent("MoverACL", getLocalPlayer(), target, ACL) end guiGridListClear(grdPlayers) --- LISTA JOGADORES for id, players in ipairs (getElementsByType("player")) do local row = guiGridListAddRow(grdPlayers) guiGridListSetItemText(grdPlayers, row, 1, getPlayerName(players):gsub('#%x%x%x%x%x%x', ''), false, false) end elseif isCursorOnElement (x*279, y*670+10, x*89, y*18) then if guiGetText(change_tag) == senha_branco then return end local tag = guiGetText(change_tag) triggerServerEvent("Trocar_tag",getLocalPlayer(), tag) elseif isCursorOnElement (x*97, y*542+10, x*32, y*19) then alarme = true triggerServerEvent("Alarme_on",getLocalPlayer()) elseif isCursorOnElement (x*139, y*542+10, x*32, y*19) then alarme = false triggerServerEvent("Alarme_off",getLocalPlayer()) elseif isCursorOnElement (x*44, y*319, x*175, y*31) then personagem = true gerenciando = false carro = false armas = false gerenciador = false guiSetVisible ( grdPlayers, false ) removeEventHandler("onClientClick", root, botoes_veiculos) addEventHandler ("onClientClick", root, botoes_jogador) guiSetVisible(Geren_senha, false) guiSetVisible(New_pass_gerenciador, false) guiSetVisible(change_pass_portao, false) guiSetVisible(change_tele, false) guiSetVisible(change_tag, false) guiSetVisible(procurar, false) elseif isCursorOnElement (x*44, y*355, x*175, y*31) then carros = true armas = false guiSetVisible ( grdPlayers, false ) personagem = false gerenciador = false gerenciando = false removeEventHandler("onClientClick", root, botoes_jogador) removeEventHandler("onClientClick", root, botoes_armas) addEventHandler ("onClientClick", root, botoes_veiculos) guiSetVisible(Geren_senha, false) guiSetVisible(New_pass_gerenciador, false) guiSetVisible(change_pass_portao, false) guiSetVisible(change_tele, false) guiSetVisible(change_tag, false) guiSetVisible(procurar, false) elseif isCursorOnElement (x*44, y*425, x*175, y*31) then carros = false armas = false personagem = false gerenciador = true guiSetVisible ( grdPlayers, false ) gerenciando = false guiSetVisible(Geren_senha, true) guiSetVisible(New_pass_gerenciador, false) guiSetVisible(change_pass_portao, false) guiSetVisible(change_tele, false) guiSetVisible(change_tag, false) guiSetVisible(procurar, false) removeEventHandler("onClientClick", root, botoes_jogador) removeEventHandler("onClientClick", root, botoes_veiculos) removeEventHandler("onClientClick", root, botoes_armas) removeEventHandler("onClientClick", root, botoes_gerenciamento) addEventHandler ("onClientClick", root, botoes_inicial) elseif isCursorOnElement (x*44, y*390, x*175, y*31) then carros = false armas = true personagem = false gerenciador = false guiSetVisible ( grdPlayers, false ) gerenciando = false guiSetVisible(Geren_senha, false) guiSetVisible(New_pass_gerenciador, false) guiSetVisible(change_pass_portao, false) guiSetVisible(change_tele, false) guiSetVisible(change_tag, false) guiSetVisible(procurar, false) removeEventHandler("onClientClick", root, botoes_jogador) removeEventHandler("onClientClick", root, botoes_veiculos) removeEventHandler("onClientClick", root, botoes_gerenciamento) addEventHandler ("onClientClick", root, botoes_armas) end end end end end addEventHandler ("onClientClick", root, configuracoes) function botoes_jogador(_,state) if painel == true then if state == "down" then if personagem == true then if isCursorOnElement (x*44, y*319, x*175, y*31) then personagem = false removeEventHandler("onClientClick", root, botoes_jogador) addEventHandler ("onClientClick", root, botoes_inicial) guiSetVisible(Geren_senha, false) elseif isCursorOnElement (x*44, y*355, x*175, y*31) then triggerServerEvent("Skin_Event_1",getLocalPlayer()) elseif isCursorOnElement (x*44, y*391, x*175, y*31) then triggerServerEvent("Skin_Event_2",getLocalPlayer()) elseif isCursorOnElement (x*44, y*427, x*175, y*31) then triggerServerEvent("Skin_Event_3",getLocalPlayer()) elseif isCursorOnElement (x*44, y*462, x*175, y*31) then carros = true armas = false personagem = false guiSetVisible ( grdPlayers, false ) gerenciador = false removeEventHandler("onClientClick", root, botoes_jogador) removeEventHandler("onClientClick", root, botoes_armas) addEventHandler ("onClientClick", root, botoes_veiculos) guiSetVisible(Geren_senha, false) elseif isCursorOnElement (x*44, y*497, x*175, y*31) then carros = false armas = true personagem = false guiSetVisible ( grdPlayers, false ) gerenciador = false removeEventHandler("onClientClick", root, botoes_jogador) removeEventHandler("onClientClick", root, botoes_veiculos) addEventHandler ("onClientClick", root, botoes_armas) guiSetVisible(Geren_senha, false) elseif isCursorOnElement (x*44, y*534, x*175, y*31) then carros = false armas = false personagem = false guiSetVisible ( grdPlayers, false ) gerenciador = true removeEventHandler("onClientClick", root, botoes_jogador) removeEventHandler("onClientClick", root, botoes_veiculos) removeEventHandler("onClientClick", root, botoes_armas) addEventHandler ("onClientClick", root, botoes_gerenciamento) guiSetVisible(Geren_senha, true) end end end end end function botoes_veiculos(_,state) if painel == true then if state == "down" then if carros == true then if isCursorOnElement (x*44, y*355, x*175, y*31) then carros = false removeEventHandler("onClientClick", root, botoes_veiculos) addEventHandler ("onClientClick", root, botoes_inicial) elseif isCursorOnElement (x*44, y*390, x*175, y*31) then if carro1 == false then carro1 = true triggerServerEvent("Veiculo_1",getLocalPlayer()) else triggerServerEvent("Veiculo_1_Destruir",getLocalPlayer()) carro1 = false end elseif isCursorOnElement (x*44, y*425, x*175, y*31) then if carro2 == false then carro2 = true triggerServerEvent("Veiculo_2",getLocalPlayer()) else triggerServerEvent("Veiculo_2_Destruir",getLocalPlayer()) carro2 = false end elseif isCursorOnElement (x*44, y*460, x*175, y*31) then if carro3 == false then carro3 = true triggerServerEvent("Veiculo_3",getLocalPlayer()) else triggerServerEvent("Veiculo_3_Destruir",getLocalPlayer()) carro3 = false end elseif isCursorOnElement (x*44, y*497, x*175, y*31) then carros = false armas = true personagem = false gerenciador = false guiSetVisible ( grdPlayers, false ) removeEventHandler("onClientClick", root, botoes_jogador) removeEventHandler("onClientClick", root, botoes_veiculos) addEventHandler ("onClientClick", root, botoes_armas) guiSetVisible(Geren_senha, false) elseif isCursorOnElement (x*44, y*319, x*175, y*31) then personagem = true carros = false armas = false gerenciador = false guiSetVisible ( grdPlayers, false ) removeEventHandler("onClientClick", root, botoes_veiculos) addEventHandler ("onClientClick", root, botoes_jogador) guiSetVisible(Geren_senha, false) elseif isCursorOnElement (x*44, y*534, x*175, y*31) then carros = false armas = false personagem = false gerenciador = true guiSetVisible ( grdPlayers, false ) removeEventHandler("onClientClick", root, botoes_jogador) removeEventHandler("onClientClick", root, botoes_veiculos) removeEventHandler("onClientClick", root, botoes_armas) addEventHandler ("onClientClick", root, botoes_gerenciamento) guiSetVisible(Geren_senha, true) end end end end end function botoes_armas(_,state) if painel == true then if state == "down" then if armas == true then if isCursorOnElement (x*44, y*390, x*175, y*31) then armas = false removeEventHandler("onClientClick", root, botoes_armas) addEventHandler ("onClientClick", root, botoes_inicial) elseif isCursorOnElement (x*44, y*425, x*175, y*31) then triggerServerEvent("Armas_1",getLocalPlayer()) elseif isCursorOnElement (x*44, y*460, x*175, y*31) then triggerServerEvent("Armas_2",getLocalPlayer()) elseif isCursorOnElement (x*44, y*494, x*175, y*31) then triggerServerEvent("Armas_3",getLocalPlayer()) elseif isCursorOnElement (x*44, y*319, x*175, y*31) then personagem = true carro = false armas = false gerenciador = false guiSetVisible ( grdPlayers, false ) removeEventHandler("onClientClick", root, botoes_gerenciamento) removeEventHandler("onClientClick", root, botoes_veiculos) removeEventHandler("onClientClick", root, botoes_armas) addEventHandler ("onClientClick", root, botoes_jogador) guiSetVisible(Geren_senha, false) elseif isCursorOnElement (x*44, y*355, x*175, y*31) then carros = true armas = false personagem = false gerenciador = false guiSetVisible ( grdPlayers, false ) removeEventHandler("onClientClick", root, botoes_jogador) removeEventHandler("onClientClick", root, botoes_armas) addEventHandler ("onClientClick", root, botoes_veiculos) guiSetVisible(Geren_senha, false) elseif isCursorOnElement (x*44, y*534, x*175, y*31) then carros = false armas = false personagem = false gerenciador = true guiSetVisible ( grdPlayers, false ) removeEventHandler("onClientClick", root, botoes_jogador) removeEventHandler("onClientClick", root, botoes_veiculos) removeEventHandler("onClientClick", root, botoes_armas) addEventHandler ("onClientClick", root, botoes_gerenciamento) guiSetVisible(Geren_senha, true) end end end end end function botoes_gerenciamento(_,state) if painel == true then if state == "down" then if gerenciador == true then if isCursorOnElement (x*44, y*425, x*175, y*31) then gerenciador = false guiSetVisible(Geren_senha, false) removeEventHandler("onClientClick", root, botoes_gerenciamento) addEventHandler ("onClientClick", root, botoes_inicial) elseif isCursorOnElement (x*44, y*390, x*175, y*31) then carros = false armas = true guiSetVisible ( grdPlayers, false ) personagem = false gerenciador = false removeEventHandler("onClientClick", root, botoes_jogador) removeEventHandler("onClientClick", root, botoes_gerenciamento) removeEventHandler("onClientClick", root, botoes_veiculos) addEventHandler ("onClientClick", root, botoes_armas) guiSetVisible(Geren_senha, false) elseif isCursorOnElement (x*44, y*319, x*175, y*31) then personagem = true carro = false armas = false guiSetVisible ( grdPlayers, false ) gerenciador = false removeEventHandler("onClientClick", root, botoes_veiculos) addEventHandler ("onClientClick", root, botoes_jogador) guiSetVisible(Geren_senha, false) elseif isCursorOnElement (x*44, y*355, x*175, y*31) then carros = true armas = false personagem = false guiSetVisible ( grdPlayers, false ) gerenciador = false removeEventHandler("onClientClick", root, botoes_jogador) removeEventHandler("onClientClick", root, botoes_armas) addEventHandler ("onClientClick", root, botoes_veiculos) guiSetVisible(Geren_senha, false) end end end end end function botoes_inicial(_,state) if painel == true then if state == "down" then if isCursorOnElement (x*44, y*319, x*175, y*31) then if personagem == false then personagem = true addEventHandler ("onClientClick", root, botoes_jogador) carros = false armas = false gerenciando = false gerenciador = false guiSetVisible ( grdPlayers, false ) guiSetVisible(Geren_senha, false) guiSetVisible(New_pass_gerenciador, false) guiSetVisible(change_pass_portao, false) guiSetVisible(change_tele, false) guiSetVisible(change_tag, false) guiSetVisible(procurar, false) removeEventHandler("onClientClick", root, botoes_inicial) else personagem = false end elseif isCursorOnElement (x*44, y*355, x*175, y*31) then if carros == false then carros = true personagem = false gerenciador = false armas = false guiSetVisible ( grdPlayers, false ) gerenciando = false addEventHandler ("onClientClick", root, botoes_veiculos) guiSetVisible(Geren_senha, false) guiSetVisible(New_pass_gerenciador, false) guiSetVisible(change_pass_portao, false) guiSetVisible(change_tele, false) guiSetVisible(change_tag, false) guiSetVisible(procurar, false) removeEventHandler("onClientClick", root, botoes_inicial) else carros = false end elseif isCursorOnElement (x*44, y*390, x*175, y*31) then if armas == false then personagem = false carros = false armas = true gerenciador = false guiSetVisible ( grdPlayers, false ) gerenciando = false guiSetVisible(Geren_senha, false) addEventHandler ("onClientClick", root, botoes_armas) guiSetVisible(New_pass_gerenciador, false) guiSetVisible(change_pass_portao, false) guiSetVisible(change_tele, false) guiSetVisible(change_tag, false) guiSetVisible(procurar, false) removeEventHandler("onClientClick", root, botoes_inicial) else armas = false end elseif isCursorOnElement (x*44, y*425, x*175, y*31) then if gerenciador == false then personagem = false carros = false armas = false gerenciador = true guiSetVisible ( grdPlayers, false ) gerenciando = false addEventHandler ("onClientClick", root, botoes_gerenciamento) guiSetVisible(Geren_senha, true) guiSetVisible(New_pass_gerenciador, false) guiSetVisible(change_pass_portao, false) guiSetVisible(change_tele, false) guiSetVisible(change_tag, false) guiSetVisible(procurar, false) removeEventHandler("onClientClick", root, botoes_inicial) else gerenciador = false guiSetVisible(Geren_senha, false) end end end end end function Alarme() if alarme == true then if isElement( sound ) then stopSound( sound ) end sound = playSound3D( 'gerenciador/gfx/alarme.mp3', Sirene[1], Sirene[2], Sirene[3], false) setSoundMaxDistance( sound, 250 ) end end addEvent ("Alarme_Painel", true) addEventHandler ("Alarme_Painel", root, Alarme) function Alarme_off() if isElement( sound ) then stopSound( sound ) end end addEvent ("Alarme_Painel_OFF", true) addEventHandler ("Alarme_Painel_OFF", root, Alarme_off) function addPlayerToList(ply) local row = guiGridListAddRow(grdPlayers) local name = getPlayerName(ply) guiGridListSetItemText(grdPlayers,row, colPlayers, name:gsub('#%x%x%x%x%x%x', ''), false, false) guiGridListSetItemColor(grdPlayers, row, colPlayers, 255,255,255 ) end function onClientGUIChanged() if source == procurar then guiGridListClear(grdPlayers) for i, v in ipairs(getElementsByType("player")) do if string.find(string.lower(getPlayerName(v):gsub('#%x%x%x%x%x%x', '')), string.lower(guiGetText(source))) then local row = guiGridListAddRow(grdPlayers) guiGridListSetItemText(grdPlayers, row, colPlayers, getPlayerName(v):gsub('#%x%x%x%x%x%x', ''), false, false) guiGridListSetItemColor (grdPlayers, row, colPlayers, 255,255,255 ) end end end end addEventHandler("onClientGUIChanged", root,onClientGUIChanged) event_player_join = function() addPlayerToList(source) end addEventHandler("onClientPlayerJoin", getRootElement(), event_player_join) function removePlayerFromList(ply) local name=getPlayerName(ply) for row=0,guiGridListGetRowCount(grdPlayers) do if guiGridListGetItemText(grdPlayers, row, colPlayers) == name then guiGridListRemoveRow(grdPlayers, row) end end end addEventHandler("onClientPlayerQuit", getRootElement(), removePlayerFromList) function atualizarlista() guiGridListClear(grdPlayers) for id, players in ipairs (getElementsByType("player")) do local row = guiGridListAddRow(grdPlayers) local name = getPlayerName(players) guiGridListSetItemText(grdPlayers,row, colPlayers, name:gsub('#%x%x%x%x%x%x', ''), false, false) guiGridListSetItemColor ( grdPlayers, row, colPlayers, 255,255,255 ) end end addEventHandler("onClientPlayerChangeNick", getRootElement(), atualizarlista) function Painel_open () if painel == false then addEventHandler ("onClientRender", root, paineldx) addEventHandler ("onClientClick", root, botoes_inicial) guiSetInputMode("no_binds_when_editing") showCursor (true) painel = true end end addEvent ("Event_Painel", true) addEventHandler ("Event_Painel", root, Painel_open) function getPlayerFromPartialName(name) local name = name and name:gsub("#%x%x%x%x%x%x", ""):lower() or nil if name then for _, player in ipairs(getElementsByType("player")) do local name_ = getPlayerName(player):gsub("#%x%x%x%x%x%x", ""):lower() if name_:find(name, 1, true) then return player end end end end --- // PAINEL PORTAO local painel_p = false local senha = Cps69 addEventHandler("onClientResourceStart", resourceRoot, function() password = guiCreateEdit(x*362, y*369, x*171, y*29, "", false) guiEditSetMasked ( password, true ) guiSetVisible(password, false) end ) function paineldx_portao() local px,py,pz= interpolateBetween(0, 0, 0, 255, 185, 1, ((getTickCount() - bot) / 2000), "Linear") local tentativas = getElementData(localPlayer,"Portao_senha") guiSetAlpha(password, pz) dxDrawRectangle(x*328, y*266, x*245, y*204, tocolor(0, 0, 0, py), false) dxDrawRectangle(x*328, y*266, x*245, y*37, tocolor(255, 255, 255, px), false) dxDrawText("Digite a senha do portão", x*327, y*266, x*535, y*303, tocolor(0, 0, 0, px), x*1.00, "default-bold", "center", "center", false, false, false, false, false) if isCursorOnElement(x*383, y*415, x*128, y*31) then dxDrawRectangle(x*383, y*415, x*128, y*31, tocolor(0, 0, 0, px), false) dxDrawText("Abrir", x*383, y*415, x*511, y*446, tocolor(255, 255, 255, px), 1.00, "default-bold", "center", "center", false, false, false, false, false) else dxDrawRectangle(x*383, y*415, x*128, y*31, tocolor(255, 255, 255, px), false) dxDrawText("Abrir", x*383, y*415, x*511, y*446, tocolor(0, 0, 0, px), 1.00, "default-bold", "center", "center", false, false, false, false, false) end dxDrawText("Digite a senha no quadrado abaixo", x*328, y*313, x*573, y*331, tocolor(255, 255, 255, px), x*1.00, "default-bold", "center", "center", false, false, false, false, false) if tentativas == 0 then dxDrawText("Tentavivas: 3 restantes.", x*365, y*341, x*533, y*359, tocolor(255, 255, 255, px), x*1.00, "default-bold", "center", "center", false, false, false, false, false) elseif tentativas == 1 then dxDrawText("Tentavivas: 2 restantes.", x*365, y*341, x*533, y*359, tocolor(255, 255, 255, px), x*1.00, "default-bold", "center", "center", false, false, false, false, false) elseif tentativas == 2 then dxDrawText("Tentavivas: 1 restantes.", x*365, y*341, x*533, y*359, tocolor(255, 255, 255, px), x*1.00, "default-bold", "center", "center", false, false, false, false, false) elseif tentativas == 3 then dxDrawText("Tentavivas: Ultima tentaiva.", x*365, y*341, x*533, y*359, tocolor(255, 255, 255, px), x*1.00, "default-bold", "center", "center", false, false, false, false, false) end if isCursorOnElement(x*535, y*266, x*38, y*37) then dxDrawRectangle(x*535, y*266, x*38, y*37, tocolor(255, 255, 255, px), false) dxDrawText("X", x*535, y*266, x*573, y*303, tocolor(0, 0, 0, px), x*1.00, "default-bold", "center", "center", false, false, false, false, false) else dxDrawRectangle(x*535, y*266, x*38, y*37, tocolor(0, 0, 0, px), false) dxDrawText("X", x*535, y*266, x*573, y*303, tocolor(255, 255, 255, px), x*1.00, "default-bold", "center", "center", false, false, false, false, false) end end function abrirpainel () if painel_p == false then addEventHandler ("onClientRender", root, paineldx_portao) guiSetInputMode("no_binds_when_editing") showCursor (true) painel_p = true guiSetVisible(password, true) bot = getTickCount() end end addEvent ("Event_Painel_2", true) addEventHandler ("Event_Painel_2", root, abrirpainel) function exitpainel () removeEventHandler ("onClientRender", root, paineldx_portao) showCursor (false) painel_p = false guiSetVisible(password, false) end addEvent ("Painel_exit", true) addEventHandler ("Painel_exit", root, exitpainel) function fecharpainel (_,state) if painel_p == true then if state == "down" then if isCursorOnElement (x*535, y*266, x*38, y*37) then removeEventHandler ("onClientRender", root, paineldx_portao) showCursor (false) painel_p = false guiSetVisible(password, false) end end end end addEventHandler ("onClientClick", root, fecharpainel) function obter_senha_2(pass) senha = pass end addEvent ("Senha_Portao_2", true) addEventHandler ("Senha_Portao_2", root, obter_senha_2) function abrir (_,state) if painel_p == true then if state == "down" then if isCursorOnElement(x*383, y*415, x*128, y*31) then if guiGetText(password) == ""..senha.."" then triggerServerEvent ("abrir", localPlayer) triggerServerEvent ("abrir2", localPlayer) removeEventHandler ("onClientRender", root, paineldx_portao) showCursor (false) painel_p = false guiSetVisible(password, false) else triggerServerEvent ("Erro_senha", localPlayer) end end end end end addEventHandler ("onClientClick", root, abrir) 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
  12. redditing

    Inventory

    Hi, I would like to make an inventory system, could anyone give me commands to create this work? and I don't mean ready scripts or anything because I want to do it myself, I just don't know where to start here. I would like to ask for all the commands that I will definitely need.
  13. how can i implement voice chat phone and radio in mta? ( for roleplay server )
  14. I made this: -- All other functions and GUI creation. -- [...] -- Created button called "fbumper". local function setFBumper() local theVeh7 = getPedOccupiedVehicle(localPlayer) if theVeh7 then setVehicleComponentVisible(theVeh7, "bump_front_dummy", false) end end addEventHandler("onClientGUIClick", fbumper, setFBumper, false) -- Everything else... It works. Then I wanted to have the button switch between true to false when clicked. Something like: local function setFBumper() local theVeh7 = getPedOccupiedVehicle(localPlayer) if theVeh7 then setVehicleComponentVisible(theVeh7, "bump_front_dummy", false) elseif getVehicleComponentVisible(theVeh7) == "false" then setVehicleComponentVisible(theVeh7, "bump_front_dummy", true) end end addEventHandler("onClientGUIClick", fbumper, setFBumper, false) guiSetVisible (vehmod, false) It doesn't work correctly. It sets it invisible, but it doesn't return the state to visible. I also thought about using the setVehicleComponentVisible (not setVehicleComponentVisible) to make it a little bit more compact. I'm using a setEngineState script to help myself, but I don't know how to use it with these arguments. DB 3 throws nothing. What am I doing wrong?
  15. Hello, I would like to know how to set npc rotation towards the player (To NPC just look at the player) preferably using the command "getElementPosition" (client resource)
  16. Thisdp's DirectX Graphical User Interface System ( MTASA 2D+3D DxLIB ) This dxlib provide dx gui functions and events to make it easier to use and alternative to change the style more flexibly. Warning: DGS Version Lower than 3.4 is no longer supported. Final Version: 3.99 Features: 1. Update Check(DGS will notice you if there is a higher version, and you can choose to ignore it or disable it in the config file) Update Command: "updatedgs" 2. Dx GUI Types: Window Edit Box Button Grid List Image Scroll Bar Scroll Pane Text Label Tab Panel Ellipse Detect Area (EDA) Detect Area Radio Button Combo Box Check Box Memo 3D Interface 3D Text Media Browser Browser 3. Edit/Memo rewrite ( You can no longer find the problems in dgs, the problems which exist in cegui) 4. Detect Area is efficient when checking whether your cursor is in a complicated shape. 5. Debug Mode , Command: "debugdgs" 6. You can apply shader to the dxgui ( Compatible with some resources like Objec tPreview ). 7. Include CMD, Command: "cmd" ( For more help, please input "help" in the CMD ) 8. Memo rewritten. 9. OOP Class. 10. Render Target Failure Check ( Warns when there's no enough video memory to create render target ). 11. DGS assembles cegui, you can find the similar feeling when scripting with dgs. 12. 48-hour-response service, your suggestions and bug report will be dealt with in 48 hours ( or less, like 12 hours ? ) 13. Custom Style system 14. Built-in shader plugin 15. More properties 16. Built in multi-language support Notice:Do not close your server or stop the script when it is updating. Wiki: https://wiki.multitheftauto.com/wiki/Dgs ( Still Working In Process ) Auto Completion For N++ (Thanks To Ahmed Ly): http://www.mediafire.com/file/m6dm7815d5dihax/Lua.zip Discord Server: https://discord.gg/QEs8q6W Download DGS : https://github.com/thisdp/dgs Notice: Need acl rights to call fetchRemote. To Contact Me , Get into the discord server. I have abandoned skype. My server is based on DGS , if you want to see the exact effect of dgs ( not best, my design is bad ). Please have a look. IP: lfd.thisdp.com If you want to sell your script which involves DGS, please exclude DGS from your price. HurtWorld Backpack Panel(Example) DGS Network Monitor(Built-in)
  17. Hey guys was just wondering if there are any mods out there that let you store weapons in base. for instance, in the server i play only gang members can craft guns, so civilians can only get guns if they buy them from gang members, problem is, any weapon takes 3 minutes to craft, and you can't carry more than 1 gun for example if i have 2 civilians wanting ak 47's i would've to go to the warehouse craft an ak, ride to the pedestrian, go back to the warehouse and back to the other player, a process that would take about ~15 min, so i came up with a solution that we could stack guns in our bases but i havent found any mod around the web, anyone knows anything like this ?
  18. I created a youtube player, and i want to remove the event handler, when the music ends, but i dont know how to get the song length from web browser... anyone can help?
  19. Opa pessoal, sou novo na criação de servidores e tava procurando criar um servidor de roleplay, tava indo tudo bem ... os mods e tudo direitinho, só quando eu fecho o servidor, ou reinicio pelo host tudo alguns, os IDs redefinem, os niveis, o dinheiro e tudo. isso não sei se é porque ele deixou o servidor on-line, ou os mods se juntaram ao servidor, ou algum mod que deixa essas coisas, me ajuda nisso ai por favor!
  20. I decided to dive into the world of rotations. I know this might be incomplete and even incorrect: function openCapo() local theVeh = getPedOccupiedVehicle(localPlayer) local value1 = guiScrollBarGetScrollPosition(caposcroll) if theVeh and value1 then setVehicleComponentRotation (theVeh, bonnet_dummy, value1, rY, rZ) end end I've a GUI already created, and the visibility key bound. The first scrollbar (caposcroll) should affect the bonnet_dummy. This was made with absolute basic thinking process: "if I want doors to open, I need to get the position of the scrollbar". However, I know I still need to tell the game what's the math.min, what's the math.max, and, I think, to also give the order to respond only when the scrollbar is moved. I would appreciate a finger to point me in the right direction.
  21. Hello, everybody! I'm following this tutorial to make a GUI with a car spawning function. Copy/pasting everything works up until the gridlist. The click doesn't. Could there be a mistake? I recreated the script on my own following step by step: - Client-side - And here is the problematic part: The GUI elements are the same. The only thing that changes are the names. Naturally, it should work by simply replacing the names. However, I believe there might be a mistake on the original script. With everything as it is, I can show and hide the GUI, and click on any vehicle. If I purposely trigger an output, nothing happens. So, waddaya think?
  22. Não consigo colocar um painel de dj q eu uso pra funcionar no interior 3 dimensão 0 Audio = {} local abrirpainel = createMarker(-2660.5710449219, 1408.1665039063, 4.3,"cylinder", 2, 0, 255, 0, 100) -- Local do marker function mostrarpainel(thePlayer) triggerClientEvent(thePlayer, "Dj", getRootElement() ) end addEventHandler("onMarkerHit", abrirpainel, mostrarpainel) addEvent ( "CrioDJ", true ) addEventHandler ( "CrioDJ", root, function ( Link ) if ( Link ) then if ( isElement ( Audio [ source ] ) ) then local x, y, z = getElementPosition ( Audio [ source ] ) destroyElement ( Audio [ source ] ) end local x, y, z = getElementPosition ( source ) Audio [ source ] = createMarker(x-0.5, y+0.5, z - 1,"cylinder", 1, 0, 255, 255, 0) triggerClientEvent ( root, "CrioDJ", source, source, Link ) triggerClientEvent(root, "Djay", root, getPlayerName( source ) ) end end) addEvent ( "VolumealteradoDJ", true ) addEventHandler ( "VolumealteradoDJ", root, function ( to ) triggerClientEvent ( root, "VolumeDJ", source, source, to ) end ) addEvent ( "DestruiDJ", true ) addEventHandler ( "DestruiDJ", root, function ( ) if ( isElement ( Audio [ source ] ) ) then destroyElement ( Audio [ source ] ) triggerClientEvent ( root, "DestruiDJ", source, source ) end end ) client.Lua local screenW,screenH = guiGetScreenSize() local resW, resH = 1280, 1024 local x, y = (screenW/resW), (screenH/resH) local root = getRootElement() local volume_menos = 0.1 local volume_mais = 0.1 stream = {} dj = false animON = false info = false addEventHandler("onClientResourceStart", resourceRoot, function() Link = guiCreateEdit(x*411, y*374, x*408, y*46, "Cole o link aqui...", false) guiSetVisible ( Link, false ) end ) function dx () local alpha,alpha2,alpha3= interpolateBetween(0, 0, 0, 255, 136, 200, ((getTickCount() - djt) / 2000), "Linear") local meta = getSoundMetaTags(stream) dxDrawRectangle(x*346, y*198, x*537, y*550, tocolor(0, 0, 0, alpha2), false) dxDrawRectangle(x*346, y*198, x*537, y*74, tocolor(5, 239, 5, alpha2), false) dxDrawText("PAINEL DJ", x*500, y*220, x*732, y*252, tocolor(255, 255, 255, alpha), x*2.00, "default-bold", "center", "top", false, false, false, false, false) dxDrawText("X", x*831, y*220, x*864, y*252, tocolor(255, 255, 255, alpha), 2.00, "default-bold", "center", "center", false, false, false, false, false) if ismouseinposition (x*411, y*435, x*88, y*35) then dxDrawRectangle(x*411, y*435, x*88, y*35, tocolor(5, 239, 5, alpha3), false) else dxDrawRectangle(x*411, y*435, x*88, y*35, tocolor(5, 239, 5, alpha2), false) end if ismouseinposition (x*518, y*435, x*88, y*35) then dxDrawRectangle(x*518, y*435, x*88, y*35, tocolor(5, 239, 5, alpha3), false) else dxDrawRectangle(x*518, y*435, x*88, y*35, tocolor(5, 239, 5, alpha2), false) end if ismouseinposition (x*624, y*435, x*88, y*35) then dxDrawRectangle(x*624, y*435, x*88, y*35, tocolor(5, 239, 5, alpha3), false) else dxDrawRectangle(x*624, y*435, x*88, y*35, tocolor(5, 239, 5, alpha2), false) end if ismouseinposition (x*731, y*435, x*88, y*35) then dxDrawRectangle(x*731, y*435, x*88, y*35, tocolor(5, 239, 5, alpha3), false) else dxDrawRectangle(x*731, y*435, x*88, y*35, tocolor(5, 239, 5, alpha2), false) end dxDrawText("Volume -", x*411, y*435, x*499, y*470, tocolor(255, 255, 255, alpha), x*1.00, "default-bold", "center", "center", false, false, false, false, false) dxDrawText("Volume +", x*518, y*435, x*606, y*470, tocolor(255, 255, 255, alpha), x*1.00, "default-bold", "center", "center", false, false, false, false, false) dxDrawText("Tocar", x*624, y*435, x*712, y*470, tocolor(255, 255, 255, alpha), x*1.00, "default-bold", "center", "center", false, false, false, false, false) dxDrawText("Parar", x*731, y*435, x*819, y*470, tocolor(255, 255, 255, alpha), x*1.00, "default-bold", "center", "center", false, false, false, false, false) dxDrawRectangle(x*411, y*496, x*408, y*230, tocolor(0, 0, 0, alpha2), false) if not meta then dxDrawText("Duração: N/A", x*411, y*336, x*615, y*364, tocolor(255, 255, 255, alpha), x*1.00, "default-bold", "left", "center", false, false, false, false, false) dxDrawText("Tocando agora: N/A", x*411, y*283, x*819, y*308, tocolor(255, 255, 255, alpha), x*1.00, "default-bold", "left", "center", false, false, false, false, false) dxDrawText("Adicionado por: N/A", x*411, y*308, x*615, y*336, tocolor(255, 255, 255, alpha), x*1.00, "default-bold", "left", "center", false, false, false, false, false) dxDrawText("Volume: 00%", x*615, y*336, x*819, y*364, tocolor(255, 255, 255, alpha), x*1.00, "default-bold", "left", "center", false, false, false, false, false) end end function dx_2 () local meta = getSoundMetaTags(stream) if not meta then return end local duracao_musica = getSoundLength(stream) local anim = getSoundFFTData(stream, 8192, 30) local titulo = meta.title or meta.stream_title or "N/A" local msecs = duracao_musica*1000 local secs = msecs/1000 local duracao = string.format("%.2d:%.2d:%.2d",secs/(60*60),secs/60%60,secs%60) local volume = math.round ( getSoundVolume ( stream ), 2 ) if animON == true then dxDrawText("Tocando agora: "..titulo, x*411, y*283, x*819, y*308, tocolor(255, 255, 255, 255), x*1.00, "default-bold", "left", "center", true, false, false, false, false) dxDrawText("Duração: "..duracao, x*411, y*336, x*615, y*364, tocolor(255, 255, 255, 255), x*1.00, "default-bold", "left", "center", false, false, false, false, false) dxDrawText("Adicionado por: "..nome, x*411, y*308, x*615, y*336, tocolor(255, 255, 255, 255), x*1.00, "default-bold", "left", "center", false, false, false, true, false) dxDrawText("Volume: "..math.floor ( volume * 100 ).."%", x*615, y*336, x*819, y*364, tocolor(255, 255, 255, 255), x*1.00, "default-bold", "left", "center", false, false, false, false, false) for i,v in pairs(anim) do tamanho = math.round((v*320),0)>100 and 100 or math.round((v*320),0) largura = 13 dxDrawRectangle(x*418+(i*x*largura), y*720, x*largura-1, y*2*tamanho*-1, tocolor(5, 239, 5, 136), false) end end end -------------------------------- PLAYSOUND 3D addEvent ( "DestruiDJ", true ) addEventHandler ( "DestruiDJ", root, function ( who ) if ( isElement ( stream ) ) then destroyElement ( stream ) end end ) addEvent ( "VolumeDJ", true ) addEventHandler ( "VolumeDJ", root, function ( who, vol ) if ( isElement ( stream ) ) then setSoundVolume ( stream, tonumber ( vol ) ) end end ) addEvent ( "CrioDJ", true ) addEventHandler ( "CrioDJ", root, function ( who, Link, isCar ) if ( isElement ( stream ) ) then destroyElement ( stream ) end local x, y, z = getElementPosition ( who ) stream = playSound3D ( Link, x, y, z, true ) setSoundVolume ( stream, 1 ) setSoundMinDistance (stream, 50 ) setSoundMaxDistance ( stream, 50 ) end ) function tocar(_,estado) if dj == true then if estado == "down" then if ismouseinposition(x*624, y*435, x*88, y*35) then setTimer ( function() local meta = getSoundMetaTags(stream) local duracao_musica = getSoundLength(stream) local titulo = meta.title or meta.stream_title or "N/A" local msecs = duracao_musica*1000 local secs = msecs/1000 local duracao = string.format("%.2d:%.2d:%.2d",secs/(60*60),secs/60%60,secs%60) outputChatBox ( "#FFFFFF==> #00FF00Música#FFFFFF: "..titulo.." = #00FF00Duração: #FFFFFF"..duracao..".", 255, 255, 255 ,true) end, 2000, 1 ) triggerServerEvent ( "CrioDJ", localPlayer, guiGetText ( Link )) addEventHandler("onClientRender",root,dx_2) playSoundFrontEnd(1) isSound = true animON = true end end end end addEventHandler("onClientClick",root,tocar) function Parar(_,estado) if dj == true then if estado == "down" then if ismouseinposition(x*731, y*435, x*88, y*35) then triggerServerEvent ( "DestruiDJ", localPlayer ) outputChatBox ( "#FFFFFF==> #00FF00Você cancelo a repodrução da musica atual.", 255, 255, 255 ,true) removeEventHandler ("onClientRender", root, dx_2) playSoundFrontEnd(2) isSound = false animON = false end end end end addEventHandler("onClientClick",root,Parar) function Volumemenos(_,estado) if dj == true then if estado == "down" then if ismouseinposition(x*411, y*435, x*88, y*35) then playSoundFrontEnd(3) if ( isSound ) then local volume = math.round ( getSoundVolume ( stream ) - volume_menos, 2 ) if ( volume > 0.0 ) then triggerServerEvent ( "VolumealteradoDJ", localPlayer, volume ) --outputChatBox ( "#FFFFFF==> #00FF00Volume alterado para "..math.floor ( volume * 100 ).."%.", 0, 255, 255 ,true) else outputChatBox ( "#FFFFFF==> #00FF00DJ está no volume minimo.", 0, 255, 255 ,true) end end end end end end addEventHandler("onClientClick",root,Volumemenos) function Volumemais(_,estado) if dj == true then if estado == "down" then if ismouseinposition(x*518, y*435, x*88, y*35) then playSoundFrontEnd(3) if ( isSound ) then local volume = math.round ( getSoundVolume ( stream ) + volume_mais, 2 ) if ( volume < 1.1 ) then triggerServerEvent ( "VolumealteradoDJ", localPlayer, volume ) --outputChatBox ( "#FFFFFF==> #00FF00Volume alterado para "..math.floor ( volume * 100 ).."%.", 0, 255, 255 ,true) else outputChatBox ( "#FFFFFF==> #00FF00DJ está no volume maximo.", 0, 255, 255 ,true) end end end end end end addEventHandler("onClientClick",root,Volumemais) function fechar(_,estado) if dj == true then if estado == "down" then if ismouseinposition(x*831, y*220, x*53, y*37) then playSoundFrontEnd(5) showCursor(false) removeEventHandler("onClientRender",root,dx) removeEventHandler ("onClientRender", root, dx_2) guiSetVisible ( Link, false ) dj = false animON = false end end end end addEventHandler("onClientClick",root,fechar) function dj_add (djay_painel) nome=djay_painel; end addEvent ("Djay",true) addEventHandler ("Djay",root,dj_add) function mostrarpainelDJ () if dj == false then addEventHandler ("onClientRender", root, dx) djt = getTickCount() guiSetVisible ( Link, true ) addEventHandler("onClientRender",root,dx_2) animON = true showCursor (true) dj = true else removeEventHandler ("onClientRender", root, dx) guiSetVisible ( Link, false ) showCursor (false) dj = false animON = false end end addEvent ("Dj",true) addEventHandler ("Dj",root,mostrarpainelDJ) function math.round(number, decimals, method) decimals = decimals or 0 local factor = 10 ^ decimals if (method == "ceil" or method == "floor") then return math[method](number * factor) / factor else return tonumber(("%."..decimals.."f"):format(number)) end end function ismouseinposition ( x, y, width, height ) if ( not isCursorShowing ( ) ) then return false end local sx, sy = guiGetScreenSize ( ) local cx, cy = getCursorPosition ( ) local cx, cy = ( cx * sx ), ( cy * sy ) if ( cx >= x and cx <= x + width ) and ( cy >= y and cy <= y + height ) then return true else return false end end
  23. Eu queria saber se existe algum mod que define as handings dos veiculos automaticas exemplo eu tenho o painel b do handing o jogador aperta f1 abre o painel freeroam ele pega um carro e o carro que ele pegar a handing do proprio servidor ja carrega automatica naquele carro no caso sem ter q usar o painel b obs: queria colocar uma propria pra cada tipo de carro por ID
  24. I've made a server-type .Lua that should apply several 'setWeaponProperties' to the weapons. It works for some weapons, but not for others. For example, I've set the Deagle (replaced with a 6 bullet drum) to 'maxiumum_clip_ammo' = 6. This works correctly. However, with other weapons, it doesn't. Here's the script: function weaponProps () -- M9 -- setWeaponProperty(22, "pro", "maximum_clip_ammo", 14) -- Revolver -- setWeaponProperty(24, "pro", "maximum_clip_ammo", 6) -- Shotgun -- setWeaponProperty(25, "pro", "maximum_clip_ammo", 7) -- Uzi -- setWeaponProperty(28, "pro", "maximum_clip_ammo", 30) -- AKMS -- setWeaponProperty(30, "pro", "maximum_clip_ammo", 35) -- G36 -- setWeaponProperty(31, "pro", "maximum_clip_ammo", 40) -- Kar -- setWeaponProperty(33, "pro", "maximum_clip_ammo", 5) -- Mosin -- setWeaponProperty(34, "pro", "maximum_clip_ammo", 1) end addEventHandler ("onResourceStart", getRootElement(), weaponProps) Essentially, it runs as soon as the resource is started. As a beginner's test, I'm only modifying the max ammo clip. It works for: - Deagle (Revolver) - Shotgun - AK-47 (AKMS) - M4 (G36) - Rifle (Kar) - Sniper (Mosin) It doesn't work for: - Colt (M9) - UZI
  25. I recently dove into this simple thing called "scripting and building a server". Naturally —added to my already curious personality—, I always come up with a doubt, a question, or any sort of uncertainty. After a week of messing around with it, I noticed that 5 of the 10 last posts made in the Script section were from me. I was having so much fun —truthfully— that I just kept on finding new things to ask. I'm pretty sure they are common questions. I'm not asking to have a script from scratch, or to be taught absolutely everything. It is most commonly about errors and to help myself understand the colloquial language of the scripts. However, I can't help but think that maybe it's not the best approach. I always think to myself "try to find it on your own", but I frenquently find myself getting even more confused the more I tour into each command and function. Is there a certain tacit limit as to how many questions can be asked? Is there any way to get the necessary help without flooding the sections?