Search the Community

Showing results for tags 'dx'.



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 64 results

  1. Fala ai galera venho aqui para apresentar pra vocês um novo Servidor de MTA começando agora com novo estilo de jogo habilidade server sem Lag e com proposta boa para os player Vagas de Staff em aberta passa la e da uma conferida galera SERVIDOR: BRASIL NEW STYLE TS3: bns.ts3gamers.com IP: DO SERVIDOR: mtasa://149.56.175.198:22103 Nosso Grupo NO Facebook https://www.facebook.com/groups/492088228060653/?ref=bookmarks https://imgur.com/a/J7CSr0F
  2. 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: Old function name like dgsDxGUI*/dgsDx* are no longer supported after 3.4, please change your functions and events name 'dgsDxGUI*'/'dgsDx*' have been changed to 'dgs*' 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)
  3. Opa bom eu consigui fazer um sisteminha que identifica quando o player ativa o voice porem eu gostaria fazer quando ele ativar desabilitar o dxtext "desativado" , para que fique apenas o "ativado" local fala = dxDrawText("Desativado", x*500, y*100, x*1132, y*37, tocolor(255, 0, 0, 221), 1.00, font, "left", "top", false, false, false, true, false) if (getElementData(localPlayer, "falando")) then fala2 = dxDrawText("Ativado", x*500, y*100, x*1132, y*37, tocolor(0, 255, 0, 221), 1.00, font, "left", "top", false, false, false, true, false) end -------------- addEventHandler ( "onClientPlayerVoiceStart", root, function() if (source and isElement(source) and getElementType(source) == "player") and localPlayer == source then setElementData(source, "falando", true); end end ); addEventHandler ( "onClientPlayerVoiceStop", root,function() if (source and isElement(source) and getElementType(source) == "player") and localPlayer == source then setElementData(source, "falando", false); end end);
  4. Preciso que quando o player pegue determinada arma na mão o dx fica visible e quando ele coloca outra arma diferente daquela em sua mão o dx fica invisível, como posso fazer isso ? Se puderem me informar como consigo colocar apenas 2 linhas de escrito no canto direito da tela em qualquer resolução me ajudaria demais, desde já agradeço! PS: Nunca fiz um DX.
  5. Alguém tem ideia de como consigo fazer uma border line, como essa da imagem abaixo: https://bit.ly/2kvxg6I Desde já agradeço!
  6. Bom dia, estou fazendo meu sistema de porte de armas, com o botão em gui no alpha 0, mas, parece que o triggerServerEvent não funciona, fiz o sistema de fechar no client funcionou de boa, agora quando clico no adquirir porte, ele não faz simplesmente nada. (no script abaixo vou deixar com alpha) Client Side: local screenW,screenH = guiGetScreenSize() local resW, resH = 1366,768 local x, y = (screenW/resW), (screenH/resH) local render = false local Porte = createMarker(296.087, -38.088, 1001.516-1.1, "cylinder", 1.2, 20, 70, 230, 95) setElementInterior(Porte, 1) function botoes() local botonfechar = guiCreateButton(875, 152, 42, 37,"",false) guiSetAlpha(botonfechar,0) local porte = guiCreateButton(418, 467, 240, 103,"",false) guiSetAlpha(porte,0) local glock = guiCreateButton(668, 467, 240, 103,"",false) guiSetAlpha(glock,0) addEventHandler("onClientGUIClick",botonfechar, function() removeEventHandler("onClientRender",root,panel) guiSetVisible(botonfechar,false) guiSetVisible(porte,false) guiSetVisible(glock,false) showCursor(false) end) end addEventHandler("onClientGUIClick", porte, clickarporte) function clickarporte() triggerServerEvent ("porte",getLocalPlayer(),porte) end addEventHandler("onClientGUIClick", glock, glockear) function glockear() triggerServerEvent ("comprarglock",getLocalPlayer(),comprarglock) end function panel() dxDrawRectangle(395, 155, 523, 436, tocolor(0, 0, 0, 126), false) dxDrawLine(395 - 1, 152 - 1, 395 - 1, 189, tocolor(79, 0, 0, 208), 1, false) dxDrawLine(395 - 1, 189, 918, 189, tocolor(79, 0, 0, 208), 1, false) dxDrawLine(918, 189, 918, 152 - 1, tocolor(79, 0, 0, 208), 1, false) dxDrawRectangle(395, 152, 523, 37, tocolor(0, 0, 0, 208), false) dxDrawText("PORTE DE ARMAS", 393, 148, 918, 189, tocolor(255, 255, 255, 255), 1.20, "sans", "center", "center", false, false, false, false, false) dxDrawRectangle(413, 199, 489, 245, tocolor(0, 0, 0, 69), false) dxDrawText("LEMBRANDO, O PORTE DE ARMAS APENAS COBRE A GLOCK, E PARA ADQUIRIR A MESMA, TÉRA QUE A COMPRAR, A GLOCK CUSTA 100K POR SER LEGAL.", 416, 197, 902, 444, tocolor(255, 255, 255, 255), 1.50, "default", "center", "center", false, true, false, false, false) dxDrawRectangle(875, 152, 42, 37, tocolor(0, 0, 0, 186), false) dxDrawText("ADQUIRIR PORTE", 418, 463, 658, 570, tocolor(255, 255, 255, 255), 2.00, "default", "center", "center", false, false, false, false, false) dxDrawText("ADQUIRIR GLOCK", 669, 465, 908, 570, tocolor(255, 255, 255, 255), 2.00, "default", "center", "center", false, false, false, false, false) dxDrawText("X", 876, 148, 916, 188, tocolor(255, 255, 255, 255), 1.30, "default", "center", "center", false, false, false, false, false) end function markerPanel (hitPlayer, matchingDimension) if (hitPlayer == localPlayer) then addEventHandler("onClientRender", root, panel) render = true showCursor(true) botoes() end end addEventHandler ("onClientMarkerHit", Porte, markerPanel) Server Side: local Entrar = createMarker (1310.129, -1368.674, 13.552-1, "cylinder", 1.2, 20, 70, 230, 95 ) local EntradaBlip = createBlipAttachedTo ( Entrar, 23 ) setBlipVisibleDistance ( EntradaBlip, 150 ) local Sair = createMarker(285.418, -40.954, 1001.516-1.1, "cylinder", 1.2, 20, 70, 230, 95) setElementInterior ( Sair, 1 ) local Porte2 = createMarker(296.087, -38.088, 1001.516-1.1, "cylinder", 1.2, 20, 70, 230, 95) setElementInterior(Porte2, 1) thePed = createPed(120, 296.103, -40.216, 1001.516) setElementInterior ( thePed, 1 )-- Creates a ped function cancelPedDamage() cancelEvent() -- Cancels the onClientPedDamage event end addEventHandler("onClientPedDamage", thePed, cancelPedDamage) function onmarker(marker,md) if (md) then if marker == Entrar then setTimer ( setElementInterior, 400, 1, source, 1 ) setTimer ( setElementPosition, 400, 1, source, 286.067, -39.416, 1001.516 ) setTimer ( setElementRotation, 900, 1, source, 0, 0, 358 ) fadeCamera ( source, false, 0.1, 0, 0, 0 ) setTimer ( fadeCamera, 900, 1, source , true, 0.5 ) end if marker == Sair then setTimer ( setElementInterior, 400, 1, source, 0 ) setTimer ( setElementDimension, 400, 1, source, 0 ) setTimer ( setElementPosition, 400, 1, source, 1310.116, -1371.456, 13.589 ) setTimer ( setElementRotation, 900, 1, source, 0, 0, 177 ) fadeCamera ( source, false, 0.1, 0, 0, 0 ) setTimer ( fadeCamera, 900, 1, source , true, 0.5 ) end end end addEventHandler("onPlayerMarkerHit",getRootElement(),onmarker) --------------------------- CODE ------------------------------------ addEvent("porte", true, porte3) addEventHandler("porte", getRootElement(), porte3) function porte3(source) if ( getPlayerMoney (source) >= 100000 ) then if getElementData(source, "Porte3") == false then takePlayerMoney(source, 300000) setElementData(source, "Porte3", true) outputChatBox("#727272[Porte]#ff0000Voce adquiriu o porte de arma", source, 255, 255, 255, true) else outputChatBox("#727272[Porte]#ff0000Voce já tem um porte de arma", source, 255, 255, 255, true) end end end
  7. This is in 1440x900 (in my resolution): This is in 1920x1080: I calculate the dx elements position with this: local sx_, sy_ = guiGetScreenSize() local sx, sy = sx_/1440, sy_/900 And i draw dx elements like this: dxDrawRectangle(sx / 2 + 290, sy / 2 +240,850,65,tocolor(0,0,0,200)) What wrong??? How can i fix this problem??
  8. oi sou eu denovo então alguns scripts que usam painel dx ou sei la o nome desse painel estao bugados no meu srv eles estao aparecendo assim quando passado o cursor em cima nao e so script em varios que usao esse msm metodo alguem pode me ajudar http://prntscr.com/o9bz9e http://prntscr.com/o9bzjn
  9. Olá, gostaria de uma ajudinha... Sou iniciante com MTA e estou tentando criar um servidor, porém estou tendo problemas com alguns scripts/mods em que eles não mostram as mensagens de quando usa eles e tals... Aquelas mensagens conhecidas como DX.
  10. [TUT] Scaling DX The reason why I am creating this topic, is because there are a lot of people asking this question: And to be honest there is no best practice for. But here you have my recommendation as guidance for display them the ~s~a~m~e~ for all screen formats. There are two important factors while dealing with screen formats 1. Pixel density Indication: PPI(Pixels Per Inch) and some also use the term DPI(Dots Per Inch) They do not have to be the same while talking about printing stuff. This indication tells us about how many pixels are used per inch. Which more or less tells us how sharp/smooth things like text can be looking. PPI doesn't really play a big role, but to display something nicely you need enough pixels to display it. Else it will be either too small or too crispy. So be careful to not scale things (especially text) too small. 2. Display aspect ratio Wiki The difference between resolution X and resolution Y as a ratio. A list of common ratios: 4:3 5:4 3:2 16:10 16:9 So for example if we take: fHD: 1920x1080 Which has the ratio 16:9 that is calculated like this: 1920 / 16 = 120 120 * 9 = 1080 Scaling without ratio Before I am going to explain any of this, I am going to ask you an important question: Like this: (vertical) ▮ Or horizontal? ▅ I assume most people would agree to play MTA horizontal, else you are probably reading a book or document. p.s If you play MTA on a vertical screen, then we developers do not like you at all, sorry. So what does this tell us? You can assume that the X-resolution is never going to be smaller than the Y-resolution. Useful? You will figure it out. Doing the scaling Note: This part is ABOUT SCALING and not positioning. So what we are going to do is: Calculating a scale which can display the same DX on multiple screen formats > without messing with the ratio. Example: A computer runs MTA at a resolution of 1920 x 1080. Lets define that! local devScreenX = 1920 local devScreenY = 1080 If this code is used by a different pc, we also need to know on which resolution it is running: local screenX, screenY = guiGetScreenSize() For the next step we have to look at this screenshot: I have cut out of the wide-screen format a square. Squares have the ratio 1:1, which means that we have removed our ratio difference from this screen resolution. It is very easy to do, as our Y * Y resolution makes exactly that beautiful square! The next thing we have to do is creating our scaling value. This value is required for adjust our resolution values so that they match to every screen format. So to use our ratio 1:1, we use the Y resolution to achieve that: local scaleValue = screenY / devScreenY And as last we can create a rectangle shape that is displayed at the center of every screen format, perfectly! local devScreenX = 1920 local devScreenY = 1080 local screenX, screenY = guiGetScreenSize() local scaleValue = screenY / devScreenY addEventHandler("onClientRender", root, function () -- create a scaled size local sizeX = scaleValue * 300 -- 300px local sizeY = scaleValue * 50 -- 50px -- get the center of the screen local centerX = screenX / 2 local centerY = screenY / 2 -- calculate the starting point of the rectangle local startRectangleX = centerX - (sizeX / 2) local startRectangleY = centerY - (sizeY / 2) dxDrawRectangle ( startRectangleX, startRectangleY, sizeX, sizeY, tocolor ( 255, 255, 255, 255 ) ) end) Lower limit What if we have a resolution of 800x600? And the text is getting too small? Making sure that the pixel density is OK, is very important. So to counter that we have to make sure that the text is not getting too small. Our development Y resolution is 1080 pixels. And we are dealing with an Y resolution 600 pixels. The first thing we are going to look at, is what the scale is going to be at that point. 600 / 1080 = 0.55555555555555555555555555555556 It is not very nice to have your text scaled to 55.5% of the original size, when having low resolution already. But without scaling, the DX stuff might fill up the entire screen and that is just as bad. So what we now need is a limit, in this case a lower limit. scaleValue = math.max(scaleValue, 0.65) The math.max function returns the highest value of all the arguments you put in to it. In this case it contains the: scaleValue: 0.555 And the lower limit of: 0.65 This will make sure that the DX stuff is not getting smaller than 65%. This might make text read able for a 800x600 resolution.
  11. I want draw a dxdrawtext to a object, but how can i do it this?
  12. local x,y = guiGetScreenSize() local px,py = 1280,720 local x,y = (sx/px), (sy/py) function hud () dxDrawImage(x*918, y*0, x*362, y*58, ":br_hud/shruk.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawText("$", x*955, y*19, x*1089, x*68, tocolor(0, 177, 142, 255), 1.30, "default-bold", "left", "top", false, false, false, false, false) end addEventHandler("onClientRender", root, hud)
  13. Olá como faço para tirar os pixels ruins estou fazendo um circulo progresivo de acordo com o life do jogador, por isso optei por essa função. imagem : https://imgur.com/a/8p3A6Gk
  14. Hello! There are two separated onClientRender events in two different resources. Both show a window. (dx rectangle and text) My problem is that the second window is displayed under(!) the text of the first window. I want the second window to cover the text of the first window. Is this possible?
  15. local redcircle = dxCreateTexture("teszt.png") addEventHandler("onClientRender", root, function() dxDrawMaterialLine3D(-1989.73804, 214.91431, 50,-1989.73804, 214.91431,43.1096496582031, redcircle, 6, tocolor(255,255,255),0,5,6) end) I change numbers, but i cannot rotate the image... how to rotate the image? sorry for my bad english..
  16. سلام عليكم ورحمه الله وبركاته بدون مقدمات ندخل في الموضوع دايركت فيديو يوضح آلية عمل المود : المود بأختصار تحفظ الشخصية الي معك بأسم واذا كان سي جي تقدر تلبسه وتحفظ الملابس الي لبسته عليه وتقدر تحذف وتختار الشخصية من الجريد ليست وقابل ان يكون اكثر من مليون صفحة اعتماداً على الاكوانت داتا openSkins المود يفتح بأمر المود مافيه حقوق ولا هو مشفر سويته للي يبي يتعلم ماحلل الي يحط حقوقه ويقول انه مسويه ((: رابط التحميل: https://up.top4top.net/downloadf-8640t4o01-zip.html واتمنى من كل واحد يشوف الموضوع يدعي لي بالخير :)) الاهداء للكل دون استثناء @oscarhrb وتم عمل المود لأن فيه واحد طلبه معليش في الفيديو كنت شوي مفهي
  17. Estou com um poble,a não faço ideia do que usar para fzr a DX Sumir Junto com os button de login depois que logar.
  18. Alguem que saiba mexer com dx pode me ajudar a fazer as coisas igual do guiCreateEdit só que em dx? guiCreateEdit Exemplo:Botar para escrever algo no retangle do dx.
  19. I want create a dxdraw rectangle and text on the map. But how to make this possible?
  20. Hi, is there already a way to make the default gui editboxes transparent? It seems to always have a white background, which doesn't look so good if they are used within a dx environment. If not, then this might be a good way to make the default editboxes usable outside of an actual gui window. @ccw Bonsai
  21. dxلوسمحت عايز كود اخفاء لوحة مش لاقيه في الويكي وعايز معني ده dxGetVisible
  22. Vic_RattleHead!

    dxList

    Hola, estoy tratando de crear una 'dxList' en donde automáticamente se agreguen 'ROWS', usualmente usaba Dx combinado con GUI pero me dieron ganas de crear una especie de gridListDx sin usar DGS, por el momento solo he agregado jugadores a un solo row, como logro que se detecte que ya existe un jugador en esa row y se cree otra un poco mas abajo ? Y = 336 function DX() dxDrawRectangle(561, 326, 223, 320, tocolor(0, 0, 0, 180), false) dxDrawRectangle(561, 336, 223, 30, tocolor(42, 42, 42, 180), false) dxDrawRectangle(561, 296, 223, 30, tocolor(42, 42, 42, 180), false) for k, v in ipairs( getElementsByType( "player" ) ) do JUGADOR = getPlayerName( v ) if getPlayerName( v ) == JUGADOR then dxDrawText( JUGADOR, 561, Y, 784, 365, tocolor(255, 255, 255, 255), 1.00, "default", "center", "center", false, false, false, false, false) else end end end addEventHandler( "onClientRender", root, DX )
  23. I would apperciate it very much if you could give some advice on DGS.
  24. I want create this effect: Effect with a dx image. But i don't know, how to make this possible.. Anyone can help?
  25. Personally, I'm posting in this category, in case this post can not be here I remove. Well, I'm putting together a "Vip Panel" for my server. The problem I'm having is that when I set up the position with the DX for example: Skin 1 - Skin 2 Vehicle 1 - Vehicle 2 Life / Armor - Weapons Destroy vehicle Skins 1 and 2 work perfectly when you click Vehicles 1 and 2 are also working properly But when I click either on Life / Armor or on Guns he gives me the cars I set for the buttons on vehicles Can someone help me? Below are the codes server.lua function showPanel(thePlayer) accountname = getAccountName(getPlayerAccount(thePlayer)) if isObjectInACLGroup("user." .. accountname, aclGetGroup("hawk")) then triggerClientEvent(thePlayer, "STOP", getRootElement()) else end end function onResStart() for index, player in ipairs(getElementsByType("player")) do bindKey(player, "o", "down", showPanel) end end addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), onResStart) function onPlayerJoin() bindKey(source, "o", "down", showPanel) end addEventHandler("onPlayerJoin", getRootElement(), onPlayerJoin) function cleanAll(player) for index, player in ipairs(getElementsByType("player")) do unbindKey(player, "o", "down", showPanel) end end addEventHandler("onResourceStop", getResourceRootElement(getThisResource()), cleanAll) function skin1 () setPedSkin ( source, 1 ) end addEvent("skinns1",true) addEventHandler ( "skinns1", getRootElement(), skin1 ) function skin2 () setPedSkin ( source, 303 ) end addEvent("skinns2",true) addEventHandler ( "skinns2", getRootElement(), skin2 ) veh = {} function criarxx() if veh[source] and isElement( veh[source] ) then destroyElement( veh[source] ) veh[source] = nil end local x,y,z = getElementPosition(source) veh[source] = createVehicle(562, x,y,z + 2) warpPedIntoVehicle (source,veh[source]) end addEvent("carro1",true) addEventHandler("carro1",root,criarxx) veh = {} function criarxx() if veh[source] and isElement( veh[source] ) then destroyElement( veh[source] ) veh[source] = nil end local x,y,z = getElementPosition(source) veh[source] = createVehicle(413, x,y,z + 2) warpPedIntoVehicle (source,veh[source]) end addEvent("carro2",true) addEventHandler("carro2",root,criarxx) function vida() setElementHealth(source, 100) setPedArmor(source, 100) end addEvent("vida", true) addEventHandler("vida", root, vidas) function arms () giveWeapon ( source, 31, 9999 ) giveWeapon ( source, 34, 9999 ) giveWeapon ( source, 28, 9999 ) giveWeapon ( source, 27, 9999 ) giveWeapon ( source, 24, 9999 ) giveWeapon ( source, 23, 9999 ) end addEvent("arms",true) addEventHandler ( "arms", getRootElement(), arms ) function destruircarro () destroyElement ( veh[source] ) end addEvent ("destroy", true) addEventHandler ("destroy", getRootElement(), destruircarro) client.lua painel = false function abrir () dxDrawRectangle(24, 230, 450, 280, tocolor(0, 0, 0, 190), false) dxDrawRectangle(34, 245, 210, 50, tocolor(254, 254, 254, 150), false) dxDrawRectangle(254, 245, 210, 50, tocolor(254, 254, 254, 150), false) dxDrawRectangle(34, 305, 210, 50, tocolor(254, 254, 254, 150), false) dxDrawRectangle(254, 305, 210, 50, tocolor(254, 254, 254, 150), false) dxDrawRectangle(34, 365, 210, 50, tocolor(254, 254, 254, 150), false) dxDrawRectangle(254, 365, 210, 50, tocolor(254, 254, 254, 150), false) dxDrawRectangle(34, 425, 430, 50, tocolor(181, 15, 19, 169), false) dxDrawRectangle(24, 172, 450, 48, tocolor(0, 0, 0, 190), false) dxDrawText("PAINEL EXCLUSIVO [Hawk]", 24, 172, 474, 220, tocolor(255, 255, 255, 255), 0.90, "bankgothic", "center", "center", false, false, false, false, false) dxDrawText("SKIN 1", 34, 245, 244, 295, tocolor(255, 255, 255, 255), 0.90, "bankgothic", "center", "center", false, false, false, false, false) dxDrawText("SKIN 2", 254, 245, 464, 295, tocolor(255, 255, 255, 255), 0.90, "bankgothic", "center", "center", false, false, false, false, false) dxDrawText("VEÍCULO 1", 34, 305, 244, 355, tocolor(255, 255, 255, 255), 0.90, "bankgothic", "center", "center", false, false, false, false, false) dxDrawText("VEÍCULO 2", 254, 305, 464, 355, tocolor(255, 255, 255, 255), 0.90, "bankgothic", "center", "center", false, false, false, false, false) dxDrawText("VIDA/COLETE", 34, 365, 244, 415, tocolor(255, 255, 255, 255), 0.90, "bankgothic", "center", "center", false, false, false, false, false) dxDrawText("ARMAS", 254, 365, 464, 415, tocolor(255, 255, 255, 255), 0.90, "bankgothic", "center", "center", false, false, false, false, false) dxDrawText("DESTRUIR VEÍCULO", 34, 425, 464, 475, tocolor(255, 255, 255, 255), 0.90, "bankgothic", "center", "center", false, false, false, false, false) dxDrawText("Créditos: KingBC | Role Play Brasil", 24, 485, 474, 505, tocolor(255, 255, 255, 255), 1.00, "clear", "center", "center", false, false, false, false, false) end function abrirbind() if painel == false then showCursor (true) addEventHandler ("onClientRender", root,abrir) painel = true else if painel == true then showCursor(false) removeEventHandler("onClientRender",root,abrir) painel = false end end end addEvent("STOP", true) addEventHandler("STOP", getRootElement(), abrirbind) 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 function skin1 (_,state) if painel == true then if state == "down" then if isCursorOnElement(34, 245, 244, 295 ) then triggerServerEvent ("skinns1", localPlayer) end end end end addEventHandler ("onClientClick", root, skin1) function skin2 (_,state) if painel == true then if state == "down" then if isCursorOnElement(254, 245, 464, 295 ) then triggerServerEvent ("skinns2", localPlayer) end end end end addEventHandler ("onClientClick", root, skin2) function veiculo1 (_,state) if painel == true then if state == "down" then if isCursorOnElement(34, 305, 244, 355 ) then triggerServerEvent ("carro1", localPlayer) end end end end addEventHandler ("onClientClick", root, veiculo1) function veiculo2 (_,state) if painel == true then if state == "down" then if isCursorOnElement(254, 305, 464, 355 ) then triggerServerEvent ("carro2", localPlayer) end end end end addEventHandler ("onClientClick", root, veiculo2) function vidas(_,state) if painel == true then if state == "down" then if isCursorOnElement (34, 365, 244, 415) then triggerServerEvent ("vida", getLocalPlayer()) end end end end addEventHandler ("onClientClick", root, vidas) function arms (_,state) if painel == true then if state == "down" then if isCursorOnElement(254, 365, 464, 415 ) then triggerServerEvent ("arms", localPlayer) end end end end addEventHandler ("onClientClick", root, arms) function destroy (_,state) if painel == true then if ( isCursorOnElement (34, 425, 464, 475) ) then --- destruir triggerServerEvent ("destroy", localPlayer) end end end addEventHandler ("onClientClick", root, destroy)