Jump to content

MRXBBC

Members
  • Posts

    80
  • Joined

  • Last visited

Recent Profile Visitors

1,034 profile views

MRXBBC's Achievements

Transformer

Transformer (11/54)

12

Reputation

  1. addEventHandler ( 'onPlayerLogin', getRootElement ( ), function(source) local conta = getAccountName(getPlayerAccount(source)) if isObjectInACLGroup ("user."..conta, aclGetGroup ( "Admin") ) then local Nome = getPlayerName(source) local Pontstaff = getElementData(root, "Expediente_Staff1") or 0 setElementData(source, "Expediente_Staff1", "Sim") setElementData(root, "Qtd_Admin", Pontstaff + 1) elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "Policia") ) then local PontPM = getElementData(root, "Expediente_Policia1") or 0 setElementData(source, "Expediente_Policia1", "Sim") setElementData(root, "Qtd_Policia", PontPM + 1) elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "Samu") ) then local PontSoco = getElementData(root, "Expediente_Socorrista1") or 0 setElementData(source, "Expediente_Socorrista", "Sim") setElementData(root, "Qtd_Socorrista", PontSoco + 1) elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "Gang") ) then local PontGang = getElementData(root, "Expediente_Gang1") or 0 setElementData(source, "Expediente_Gang1", "Sim") setElementData(root, "Qtd_Gang", PontGang + 1) elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "Mecanico") ) then local PontMecanico = getElementData(root, "Expediente_Mecanico") or 0 setElementData(source, "Expediente_Mecanico1", "Sim") setElementData(root, "Qtd_Mecanico", PontMecanico + 1) end end ) function loggedOut(source) local conta = getAccountName(getPlayerAccount(source)) if isObjectInACLGroup ("user."..conta, aclGetGroup ( "Admin") ) then local Nome = getPlayerName(source) local Pontstaff = getElementData(root, "Expediente_Staff1") or 0 setElementData(source, "Expediente_Staff1", "Não") setElementData(root, "Qtd_Admin", Pontstaff - 1) elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "Policia") ) then local PontPM = getElementData(root, "Expediente_Policia1") or 0 setElementData(source, "Expediente_Policia1", "Não") setElementData(root, "Qtd_Policia", PontPM - 1) elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "Samu") ) then local PontSoco = getElementData(root, "Expediente_Socorrista1") or 0 setElementData(source, "Expediente_Socorrista", "Não") setElementData(root, "Qtd_Socorrista", PontSoco - 1) elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "Gang") ) then local PontGang = getElementData(root, "Expediente_Gang1") or 0 setElementData(source, "Expediente_Gang1", "Não") setElementData(root, "Qtd_Gang", PontGang - 1) elseif isObjectInACLGroup ("user."..conta, aclGetGroup ( "Mecanico") ) then local PontMecanico = getElementData(root, "Expediente_Mecanico") or 0 setElementData(source, "Expediente_Mecanico1", "Não") setElementData(root, "Qtd_Mecanico", PontMecanico - 1) end end addEventHandler("onPlayerLogout",getRootElement(),loggedOut) fiz desse jeito so que ta dando uns erros
  2. local screenW,screenH = guiGetScreenSize() local resW, resH = 1920,1080 local x, y = (screenW/resW), (screenH/resH) local font = dxCreateFont("font/font.ttf", 10) local ping = getPlayerPing(getLocalPlayer()) local bind = "F2" function MRX(localPlayer) if (not isPlayerMapVisible()) then local PlayerLoc = (localPlayer) local money = convertNumber(getPlayerMoney(getLocalPlayer())) local Emprego = getElementData(getLocalPlayer(), "Emprego") or "Desempregado" local fome = getElementData(getLocalPlayer(), "hunger") or 100 local ID = getElementData(getLocalPlayer(), "ID") or "N/A" local sede = getElementData(getLocalPlayer(), "sede") or 100 local vida = math.floor(getElementHealth(getLocalPlayer())) local colete = math.floor(getPedArmor(getLocalPlayer())) local Nome = getPlayerName(getLocalPlayer()) local players = getElementsByType( "player" ) dxDrawImage(x*700, y*300, x*555, y*460, "img/0.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawImage(x*720, y*361, x*30, y*30, "img/user.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawImage(x*720, y*402, x*30, y*30, "img/emp.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawImage(x*865, y*402, x*30, y*30, "img/level.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawImage(x*720, y*443, x*30, y*30, "img/mala.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawText(Nome, x*755, y*408, x*578, y*344, tocolor(255, 255, 255, 255), 1.00, font, "left", "center", false, false, false, false, false) dxDrawText(ID, x*755, y*495, x*578, y*344, tocolor(255, 255, 255, 255), 1.00, font, "left", "center", false, false, false, false, false) dxDrawText(ping, x*900, y*495, x*578, y*344, tocolor(255, 255, 255, 255), 1.00, font, "left", "center", false, false, false, false, false) dxDrawText(Emprego, x*780, y*576, x*578, y*344, tocolor(255, 255, 255, 255), 1.00, font, "left", "center", false, false, false, false, false) dxDrawImage(x*730, y*520, x*50, y*200, "img/rec.png", 0, 0, 0, tocolor(105, 105, 105, 255), false) dxDrawImage(x*790, y*520, x*50, y*200, "img/rec.png", 0, 0, 0, tocolor(105, 105, 105, 255), false) dxDrawImage(x*850, y*520, x*50, y*200, "img/rec.png", 0, 0, 0, tocolor(105, 105, 105, 255), false) dxDrawImage(x*910, y*520, x*50, y*200, "img/rec.png", 0, 0, 0, tocolor(105, 105, 105, 255), false) dxDrawImage(x*730, y*720, x*50, y*200/-100*vida, "img/rec.png", 0, 0, 0, tocolor(168, 54, 54, 255), false) dxDrawImage(x*790, y*720, x*50, y*200/-100*colete, "img/rec.png", 0, 0, 0, tocolor(199,21,133, 255), false) dxDrawImage(x*850, y*720, x*50, y*200/-100*fome, "img/rec.png", 0, 0, 0, tocolor(187, 93, 65, 255), false) dxDrawImage(x*910, y*720, x*50, y*200/-100*sede, "img/rec.png", 0, 0, 0, tocolor(65, 141, 158, 255), false) dxDrawImage(x*740, y*690, x*25, y*25, "img/hp.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawImage(x*802, y*690, x*25, y*25, "img/shield.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawImage(x*862, y*690, x*25, y*25, "img/fome.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawImage(x*922, y*690, x*25, y*25, "img/gota.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) end end bindKey (bind, "both", function() if isDXVisible then removeEventHandler( "onClientRender", root, MRX ) else addEventHandler( "onClientRender", root, MRX ) end isDXVisible = not isDXVisible end) function convertNumber ( number ) local formatted = number while true do formatted, k = string.gsub(formatted, "^(-?%d+)(%d%d%d)", '%1.%2') if ( k==0 ) then break end end return formatted end
  3. eu tava pensando em fazer um if se o player for pertencente a acl ele adiciona mais um a uma variavel function checkAccess(thePlayer) if isPlayerInACL(thePlayer, "Console") then p = p+1 end end
  4. estava vendo isso, já tive uma ideia aqui, se eu conseguir eu posto aqui de novo
  5. Alguém sabe como faço para mostrar o numero de staffs online por Acl. não o nome e sim quantos function MRX(localPlayer) if (not isPlayerMapVisible()) then local money = convertNumber(getPlayerMoney(getLocalPlayer())) local Emprego = getElementData(getLocalPlayer(), "Emprego") or "Desempregado" local fome = getElementData(getLocalPlayer(), "hunger") local sede = getElementData(getLocalPlayer(), "sede") local vida = math.floor(getElementHealth(getLocalPlayer())) local colete = math.floor(getPedArmor(getLocalPlayer())) local players = getElementsByType( "player" ) dxDrawImage(x*700, y*300, x*555, y*460, "img/0.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawImage(x*720, y*362, x*30, y*30, "img/user.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) end end
  6. Alguém sabe como eu adiciono um id para uma tabela? quero fazer um sistema de abastecimento por exemplo no local x que tem varias posições (x,y,z) esse local vai receber um id x posicoes = { {1938.35266, -1778.71985, 13.38281, 1940.72449, -1778.48633, 13.39060, 1938.35266, -1778.71985, 13.38281, 0, 1941.72046, -1778.48376, 14.39060, 1939.68616, -1780.47058, 13.39060}, -- Bomba 1 {1938.33154, -1767.38000, 13.38281, 1940.72351, -1767.32568, 13.39060, 1938.33154, -1767.38000, 13.38281, 0, 1941.72351, -1767.32568, 14.39060, 1939.66479, -1769.13367, 13.38281}, -- Bomba 2 {1944.55579, -1778.50830, 13.39060, 1942.60840, -1778.49207, 13.39060, 1944.55579, -1778.50830, 13.39060, 180, 1941.72046, -1778.48376, 14.39060, 1943.12683, -1777.12988, 13.39060}, -- Bomba 3 {1944.43140, -1767.24988, 13.38281, 1942.61975, -1767.30859, 13.39060, 1944.43140, -1767.24988, 13.38281, 180, 1941.72351, -1767.32568, 14.39060, 1942.98450, -1765.54785, 13.39060}, -- Bomba 4 {1007.95508, -939.53308, 42.17969, 1007.63916, -937.28809, 42.17969, 1007.95508, -939.53308, 42.17969, 90, 1007.53247, -936.54156, 43.32813, 1009.70935, -938.19427, 42.17969}, -- Bomba 5 {1000.30652, -940.79962, 42.17969, 999.94574, -938.33441, 42.17969, 1000.30652, -940.79962, 42.17969, 90, 999.83368, -937.65015, 42.32813, 1001.94476, -939.39429, 42.17969}, -- Bomba 6 {1006.94489, -933.30310, 42.17969, 1007.25824, -935.42303, 42.17969, 1006.94489, -933.30310, 42.17969, 270, 1007.53247, -936.54156, 43.32813, 1005.21942, -934.65991, 42.17969}, -- Bomba 7 {999.42529, -934.40009, 42.17969, 999.77362, -936.40533, 42.17969, 999.42529, -934.40009, 42.17969, 270, 999.83368, -937.65015, 42.32813, 997.68323, -935.75867, 42.17969}, -- Bomba 8 {2108.7233886719,928.56799316406,10.8203125, 2109.0913085938,926.48986816406,10.8203125, 2108.7233886719,928.56799316406,10.8203125, 272, 2109.0913085938,926.48986816406,10.8203125, 2107.3334960938,927.07470703125,10.8203125}, -- Bomba 9 {2120.5671386719,928.55401611328,10.8203125, 2120.7333984375,926.29040527344,10.8203125, 2120.5671386719,928.55401611328,10.8203125, 272, 2120.7333984375,926.29040527344,10.8203125, 2118.8334960938,927.06066894531,10.8203125}, -- Bomba 10 {2121.2634277344,922.31982421875,10.8203125, 2120.8745117188,924.77770996094,10.8203125, 2121.2634277344,922.31982421875,10.8203125, 89, 2120.8745117188,924.77770996094,10.8203125, 2122.587890625,923.97540283203,10.8203125}, -- Bomba 11 {2109.3947753906,922.3515625,10.8203125, 2109.0830078125,924.81390380859,10.943323135376, 2109.3947753906,922.3515625,10.8203125, 89, 2109.0830078125,924.81390380859,10.943323135376, 2110.9479980469,923.97796630859,10.8203125}, -- Bomba 12 {2199.976, 2470.197, 10.82, 2197.648, 2470.332, 10.995, 2199.976, 2470.197, 10.82, 181, 2197.648, 2470.332, 10.995, 2198.661, 2471.425, 10.82}, -- Bomba 13 {2199.669, 2480.564, 10.82, 2197.524, 2480.329, 10.995, 2199.669, 2480.564, 10.82, 181, 2197.524, 2480.329, 10.995, 2198.354, 2482.204, 10.82}, -- Bomba 14 {2205.198, 2480.27, 10.82, 2207.116, 2480.281, 10.995, 2205.198, 2480.27, 10.82, 0.14, 2207.116, 2480.281, 10.995, 2206.673, 2478.743, 10.82}, -- Bomba 15 {2204.912, 2470.237, 10.82, 2207.111, 2470.26, 10.995, 2204.912, 2470.237, 10.82, 0.14, 2207.111, 2470.26, 10.995, 2206.375, 2468.653, 10.82}, -- Bomba 16 {-2023.125, 159.376, 28.836, -2025.729, 159.067, 29.039, -2023.125, 159.376, 28.836, 182, -2025.729, 159.067, 29.039, -2024.625, 161.064, 28.836}, -- Bomba 17 {-2022.874, 153.091, 28.836, -2025.865, 154.423, 29.039, -2022.874, 153.091, 28.836, 182, -2025.865, 154.423, 29.039, -2024.335, 154.925, 28.836}, -- Bomba 18 {-2029.62, 154.267, 28.836, -2027.212, 154.322, 29.039, -2029.62, 154.267, 28.836, 2.022, -2027.212, 154.322, 29.039, -2028.142, 152.323, 28.836}, -- Bomba 19 {-2029.47, 159.005, 28.836, -2027.214, 159.07, 29.039, -2029.47, 159.005, 28.836, 2.022, -2027.214, 159.07, 29.039, -2027.964, 157.358, 28.836}, -- Bomba 20 {-2406.309, 981.981, 45.297, -2409.958, 981.538, 45.402, -2406.309, 981.981, 45.297, 181, -2409.958, 981.538, 45.402, -2407.791, 983.524, 45.297}, -- Bomba 21 {-2406.342, 971.37, 45.297, -2410.024, 970.807, 45.422, -2406.342, 971.37, 45.297, 181, -2410.024, 970.807, 45.422, -2407.796, 973.152, 45.297}, -- Bomba 22 {-2415.353, 970.581, 45.297, -2411.844, 970.861, 45.434, -2415.353, 970.581, 45.297, 359.642, -2411.844, 970.861, 45.434, -2413.939, 968.776, 45.297}, -- Bomba 23 {-2415.099, 981.033, 45.297, -2411.802, 981.546, 45.447, -2415.099, 981.033, 45.297, 359.642, -2411.802, 981.546, 45.447, -2413.656, 979.392, 45.297}, -- Bomba 24 {-1598.664, -2705.528, 48.539, -1600.196, -2707.168, 48.539, -1598.664, -2705.528, 48.539, 230.361, -1600.196, -2707.168, 48.539, -1600.859, -2705.596, 48.539}, -- Bomba 25 {-1602.305, -2709.998, 48.539, -1603.461, -2711.639, 48.533, -1602.305, -2709.998, 48.539, 230.361, -1603.461, -2711.639, 48.533, -1604.487, -2710.082, 48.533}, -- Bomba 26 {-1605.235, -2714.753, 48.533, -1606.785, -2716.029, 48.539, -1605.235, -2714.753, 48.533, 230.361, -1606.785, -2716.029, 48.539, -1607.583, -2714.617, 48.539}, -- Bomba 27 {-1608.65, -2719.327, 48.539, -1610.095, -2720.43, 48.539, -1608.65, -2719.327, 48.539, 230.361, -1610.095, -2720.43, 48.539, -1610.896, -2719.343, 48.539}, -- Bomba 28 {-1326.597, 2688.633, 50.063, -1326.945, 2686.39, 50.063, -1326.597, 2688.633, 50.063, 263.188, -1326.945, 2686.39, 50.063, -1328.41, 2687.231, 50.063}, -- Bomba 29 {-1326.996, 2682.932, 50.063, -1327.739, 2680.924, 50.063, -1326.996, 2682.932, 50.063, 263.188, -1327.739, 2680.924, 50.063, -1329.051, 2681.603, 50.063}, -- Bomba 30 {-1327.781, 2677.351, 50.063, -1328.437, 2675.479, 50.063, -1327.781, 2677.351, 50.063, 263.188, -1328.437, 2675.479, 50.063, -1329.833, 2676.023, 50.063}, -- Bomba 31 {-1328.286, 2672.056, 50.063, -1329.033, 2670.041, 50.063, -1328.286, 2672.056, 50.063, 263.188, -1329.033, 2670.041, 50.063, -1330.426, 2670.701, 50.063}, -- Bomba 32 }
  7. Pessoal alguem sabe como usa o shader pra trocar cor e rosto?
  8. eu já fiz só que ele para e não anda
  9. alguém sabe me dizer se tem alguma função que faça o player n correr, e sim ficar só no trote normal
  10. faça desta forma Ped = createPed(150,370.40481567383,-2038.2592773438,7.671875) function cancelPedDamage() cancelEvent() end addEventHandler("onClientPedDamage", Ped, cancelPedDamage)
  11. Gostaria de repassar a variavel do cliente para o server, n lembro muito bem como se faz esse processo //Cliente// function outputEditBox (buttom, state) local item = dgsComboBoxGetSelectedItem(qiw) if buttom == "left" and state == "down" then if item ~= -1 then text = dgsGetText ( editBox ) text2 = dgsComboBoxGetItemText(qiw, item) end end end addEventHandler ( "onDgsMouseClick", buttom, outputEditBox ) function Receber( text, text2) if ( hasObjectPermissionTo ( source, "function.mute", true ) ) then outputChatBox (text .. "" .. text2, source ) end end addEvent ("Receber>Dados", true) addEventHandler ("Receber>Dados", root, Receber)
  12. Gostaria de saber um meio para detectar se a window do dgs está fechada ou n, fiz um codigo mas n deu certo, alguem pode me dá uma luz? Edit1: To utilizando o botão que já vem nativo na window function tela( ) window = dgsCreateWindow(x*0.3,y*0.3,x*0.3,y*0.4,"Token - ServerName",true) editBox = dgsCreateEdit( x*0.35, y*0.4, x*0.3, y*0.05, "Digite Aqui", true, window ) qiw = dgsCreateComboBox(x*0.25, y*0.2, x*0.5, y*0.05, "Selecione seu atendimento" , true, window) button= dgsCreateButton( x*0.4, y*0.6, x*0.2, y*0.1, "Enviar", true,window ) dgsComboBoxAddItem(qiw, "Suporte") dgsComboBoxAddItem(qiw, "Denúncia") dgsComboBoxAddItem(qiw, "Bugs") dgsComboBoxAddItem(qiw, "Compras de Vip") dgsWindowSetSizable ( window, false ) end function abrir( ) state = dgsWindowGetCloseButtonEnabled(window) if state == true then showChat(false) showCursor(true) addEventHandler ( "onClientRender", root, tela ) else showChat(true) showCursor(false) removeEventHandler ( "onClientRender", root, tela ) end end addCommandHandler ( "denunciar", abrir)
  13. setVehicleColor crie as variaveis com o valor das cores em rgb e depois adicione elas toda vez que o player clicar no element https://celke.com.br/artigo/tabela-de-cores-html-nome-hexadecimal-rgb
  14. Alguem tem modelo ou parecida com essas para o mta? http://dev.prineside.com/gtasa_samp_model_id/model/1570-CJ_NOODLE_3/
×
×
  • Create New...