Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 26/04/21 in all areas

  1. I've been thinking of the easiest way to put this, but let's give it a shot. Your 'brother' (for my reply let's assume true.. true or not, you can imagine we often hear this) is a problem for MTA, because he is playing on a highly competitive server, CIT (in CIT LV which is even more competitive) and being part of a small group of people that you can find on any game where there is a high level of competition and serious stakes: cheaters. The thing is, on MTA the border for cheating is extremely high and most cheat devs already cannot even deliver a product, with AC being too strong. As MTA gets ahead of them, it gets to the point of sort of taking the kind of person of which most wouldn't be spending their time hacking games, but much bigger stuff in the real world. There is always someone out there that has the skills required, who can, after much grinding, discover a vulnerability (method) that allows them to write a cheat. The saying goes: nothing is ever fully secure. This group of people (3 to 4 CIT players - including "TucoS", another named "Kogar", and "Ammar" your 'brother') were so serious about their desire to cheat, that they resorted to hiring a private cheat developer, one that happens to also be skilled enough for the aformentioned. This small circle of cheaters is paying hundreds of dollars per working version, and they have already attracted & been supplied by this cheat developer a few years ago, including 2018 and 2019, getting banned and last chances multiple times. We caught up with them again, yesterday they all got banned. But this time, the ban is permanent, as they haven't learned from previous bans (when they got caught with custom cheats as well) and cannot be expected to ever change. We are now also making an example of them. It's obvious why MTA would want to ban this group of people for good. They are not welcome on MTA anymore after what happened several times. Their sweatiness when it comes to their desire and quest to cheat is also disgraceful, the example we are setting is mostly aimed at any of such niche groups at highly competitive servers, that would want to also hire a personal cheat dev to try and do something. It is to say that nothing is ever really undetected, undetectable and that anything leaves traces to AC, especially if it works. That we really are taking a more severe approach to any such individuals, it truly is malicious and hideous. Now you can understand why we would ban them forever. But on to you, as (if) a brother.. we also took further measures to ensure they will not ban evade and return. These measures can't be fully effective unless, besides for technical reasons we can't describe for security reasons, we also eliminate any physical possibility of them accessing MTA (like on 'your' PC) - even more so, we already know he (Ammar) used the PC with serial in the past, and even behind that we wouldn't take the 'brother' claim, because brother loyality (to let him play, eventually give your PC to him, things like that) would stand in the way of our decision to ensure these people won't evade their bans and return to MTA. But again, i already know this PC is regularly shared between you and him, so that flag doesn't even have to get raised. MTA has a serious stake to remove these people, including that being so sweaty about the ability to cheat in a very competitive server also means they would be equally sweaty about evading their bans and going on with their day (they have demonstrated to be willing to go very far).. we are really just removing them from our game for good now. And no you can't choose your brother (a cheater), so even if you were acting in good faith I am sorry to inform we can't change anything to this situation. Ban appeal denied.
    3 points
  2. Espect irei responder na minha língua, consegui desde já agradeço sua atenção. Eu conseguir resolver o erro, era um vírus trojan tão poderoso que infectou meu windows defender que não deixava deletar o vírus, e ainda máscarava ele no painel de processos. Resolvi baixando o antivírus kapersky cloud free que de imediato encontrou a causa e mandou para o limbo. Muito obrigado !!! Se não usava um antivírus assim como eu que confiava no windows defender, acho bom tentar baixa o kapersky cloud free ele resolveu meu problema, que era um vírus. Por isso achei estranho, nunca usei trapaça no MTA e o erro era esse.
    1 point
  3. @AndrewKyiv, как вариант, посмотреть готовые ресурсы радаров на комьюнити. Есть несколько вариантов, можно карту целиком рисовать, кусками (по типу того, как это сделано для стандартного радара), либо же использовать шейдер (пример). Функции, которые нужно использовать: - dxDrawImage / dxDrawImageSection - отрисовка элементов радара (& зум радара) - dxDrawRectangle - фоновые обводки и прочее - dxCreateRenderTarget + dxSetRenderTarget - для рисования части карты в прямоугольнике (радаре) - addEventHandler + onClientRender - для отображения радара каждый кадр - setPlayerHudComponentVisible "radar" - скрыть стандартный И другие функции уже для информации на радаре: getCamera, getElementRotation, getElementsByType (для отображения блипов, игроков, зон), getElementPosition.
    1 point
  4. local Table = { [ 1 ] = { -1663.51257, 1208.61926, 6.25465 } , [ 2 ] = { -1625.49316, 1209.18298, 7.03906 } } for i , v in ipairs ( Table ) do Marker = createMarker ( v [ 1 ] , v [ 2 ] , v [ 3 ] , 'cylinder', 1.2, 200, 150, 50, 255 ) addEventHandler ( 'onClientMarkerHit' , Marker , function ( ) -- your code end ) end
    1 point
  5. ¡Hola, bienvenido a los foros de MTA! I've moved your topic to Spanish section, please keep in mind that the rest of the forums is English only.
    1 point
  6. Você pode usar triggers para passar informações dos clientes para o servidor e vice-versa. https://wiki.multitheftauto.com/wiki/TriggerServerEvent https://wiki.multitheftauto.com/wiki/TriggerClientEvent
    1 point
  7. How to create a simple Soccer Field, only using native gta objects? it's not that hard for me to imagining, i love imagining. I hope you enjoy this video! This map is in a new city map that i'm currently working on! I didn't define the city name yet, maybe you have suggestions? Don't forget to subscribe and leave a like to video for support
    1 point
  8. 1 point
  9. الخاص مفتوح للجميع ?
    1 point
  10. السلام عليكم ورحمة الله تعالى وبركاته, كيف الحال ياحلوين !؟ عساكم بخير اليوم سويت لكم مود المعرض على طريقتي وغيرت اشياء بالشكل ولوحة الشراء الجديدة, طبعا السكربت معروف + السكربت غير مشفر للتعليم والإفادة ---------- الصور : ---------- ---------- نتمنى منك الإنضمام لنا في : Multi Theft Auto Arab لتحميل المود : MR.GRAND للتواصل معي : Skype : kamel1234128 E-mail : [email protected] في أمان الله . . . أخوكم مستر جراند
    1 point
  11. Tô precisando de um script que seja possível editar a escala e a física dos carro no MTA, séria tipo editar o vehicle.ide do GTA e jogar no MTA, alguém pode me ajudar?
    0 points
  12. Eu estou colocando no Client. Devo colocar no server.? sw, sh = guiGetScreenSize () px = math.min( sw / 1920, 1 ) Login = {}; Login.Interface = {}; addEventHandler("onClientKey", root, function (button, press) LoginPainel (true) if button == "F1" or button == "F2" or button == "F3" or button == "F4" or button == "F5" or button == "F6" or button == "F7" or button == "b" or button == "F9" or button == "F10" or button == "F11" or button == "F12" then cancelEvent() end end end ) function Login.Interface:onRender() function Login.Interface:Startup() self.Weight = 562 * px; self.Height = 515 * px; self.PosX = ( sw / 2) - ( self.Weight / 2 ); self.PosY = ( sh / 2) - ( self.Height / 2 ); self.isVisible = false; self.medium = DxFont("assets/fonts/medium.ttf", 23*px); self.medium2 = DxFont("assets/fonts/medium.ttf", 21*px); self.medium3 = DxFont("assets/fonts/medium.ttf", 30*px); self.click = false self.edits = { login = "", password = "", loginReg = "", passwordReg = "", passwordRegRef = "", selection = 1, selected = nil, symbol = { [1] = "", [2] = "", [3] = "", [4] = "", [5] = "", }, timers = {}, }; Login.Color = { Standart = tocolor(142, 68, 69, 255); Hover = tocolor(142, 68, 69, 255); }; end; Login.Interface:Startup() function checkLine () if self.edits.selected then local i = self.edits.selected local s, e = string.find (self.edits.symbol[i], "|") if s == string.len(self.edits.symbol[i]) then self.edits.symbol[i] = string.sub (self.edits.symbol[i], 1, utf8.len(self.edits.symbol[i])-1) else self.edits.symbol[i] = self.edits.symbol[i].."|" end end end tableshmb = {"~","!","@","#","$","%","^","&","*","(",")","_","-","=","`","[","{","]","}",":",";","'",'"',"|","/",} function checkCharacter (text) local results = false for i, key in ipairs (tableshmb) do if text == key then results = true break end end return results end function addKeyCharacter (character) if self.edits.selected and self.edits.selection and character then if self.edits.selected == 1 then if utf8.len(self.edits.login) < 15 then if utf8.find(character, "%W") or utf8.find(character, "%w") or checkCharacter(character) then self.edits.login = self.edits.login..character end end elseif self.edits.selected == 2 then if utf8.len(self.edits.password) < 15 then if utf8.find(character, "%W") or utf8.find(character, "%w") or checkCharacter(character) then self.edits.password = self.edits.password..character end end elseif self.edits.selected == 3 then if utf8.len(self.edits.loginReg) < 15 then if utf8.find(character, "%W") or utf8.find(character, "%w") or checkCharacter(character) then self.edits.loginReg = self.edits.loginReg..character end end elseif self.edits.selected == 4 then if utf8.len(self.edits.passwordReg) < 15 then if utf8.find(character, "%W") or utf8.find(character, "%w") or checkCharacter(character) then self.edits.passwordReg = self.edits.passwordReg..character end end elseif self.edits.selected == 5 then if utf8.len(self.edits.passwordRegRef) < 15 then if utf8.find(character, "%W") or utf8.find(character, "%w") or checkCharacter(character) then self.edits.passwordRegRef = self.edits.passwordRegRef..character end end end end end function removeKeyCharacter (key, state) if not self.edits.selection then return end if key == "backspace" and self.edits.selected and state then if self.edits.selected == 1 then if utf8.len(self.edits.login) < 1 then return end self.edits.login = utf8.sub (self.edits.login, 1, utf8.len(self.edits.login)-1) elseif self.edits.selected == 2 then if utf8.len(self.edits.password) < 1 then return end self.edits.password = utf8.sub (self.edits.password, 1, utf8.len(self.edits.password)-1) elseif self.edits.selected == 3 then if utf8.len(self.edits.loginReg) < 1 then return end self.edits.loginReg = utf8.sub (self.edits.loginReg, 1, utf8.len(self.edits.loginReg)-1) elseif self.edits.selected == 4 then if utf8.len(self.edits.passwordReg) < 1 then return end self.edits.passwordReg = utf8.sub (self.edits.passwordReg, 1, utf8.len(self.edits.passwordReg)-1) elseif self.edits.selected == 5 then if utf8.len(self.edits.passwordRegRef) < 1 then return end self.edits.passwordRegRef = utf8.sub (self.edits.passwordRegRef, 1, utf8.len(self.edits.passwordRegRef)-1) end end end function Login.Interface:Render() dxDrawImage(0, 0, sw, sh, "assets/images/background.png"); dxDrawImage(self.PosX, self.PosY, self.Weight, self.Height, "assets/images/main.png", 0, 0, 0, tocolor(31, 36, 68, 255)); if self.edits.selection == 1 then -- Авторизация dxDrawText("Faça seu Login", self.PosX, self.PosY + 64 * px, self.Weight + self.PosX, self.Height, tocolor(255, 255, 255, self.i255), 0.5, self.medium3, "center", "top"); dxDrawImage(self.PosX + 203 * px, self.PosY + 93 * px, 38 * px, 5 * px, "assets/images/line.png", 0, 0, 0, tocolor(181, 72, 69, 255)); if cursorPosition(self.PosX + 291 * px, self.PosY + 460 * px, 109 * px, 25 * px) then if getKeyState("mouse1") and not self.click then self.edits.selection = 2 --iprint("Resource author: MightDragon") end dxDrawText("#6d738dEntao vamos nessa? #ffffffRegistre-se", self.PosX, self.PosY + 460 * px, self.Weight + self.PosX, 15 * px, tocolor(255, 255, 255, 255), 0.53, self.medium2, "center", "top", nil, nil, nil, true); dxDrawRectangle(self.PosX + 291 * px, self.PosY + 480 * px, 109 * px, 1 * px, tocolor(255, 255, 255, 255)); else dxDrawText("#6d738dNão tem uma conta? #ffffffRegistre-se", self.PosX, self.PosY + 460 * px, self.Weight + self.PosX, 15 * px, tocolor(255, 255, 255, 255), 0.53, self.medium2, "center", "top", nil, nil, nil, true); end dxCreateButton(( sw / 2) - ( 235 * px / 2 ), self.PosY + 317 * px, 235 * px, 86 * px, "assets/images/button.png", "assets/images/button2.png", 0); dxDrawText("Continuar", ( sw / 2) - ( 235 * px / 2 ), self.PosY + 317 * px, 235 * px + ( sw / 2) - ( 235 * px / 2 ), 86 * px + self.PosY + 317 * px, tocolor(255, 255, 255, 255), 0.5, self.medium, "center", "center"); -- Логин if cursorPosition(( sw / 2) - ( 359 * px / 2 ), self.PosY + 145 * px, 359 * px, 58 * px) then dxDrawImage(( sw / 2) - ( 359 * px / 2 ), self.PosY + 145 * px, 359 * px, 58 * px, "assets/images/input.png", 0, 0, 0, tocolor(50, 55, 89, 255)); if self.edits.selected == 1 then dxDrawImage(( sw / 2) - ( 359 * px / 2 ), self.PosY + 145 * px, 359 * px, 58 * px, "assets/images/input.png", 0, 0, 0, tocolor(50, 55, 89, 255)); else dxDrawImage(( sw / 2) - ( 359 * px / 2 ), self.PosY + 145 * px, 359 * px, 58 * px, "assets/images/input.png", 0, 0, 0, tocolor(38, 43, 75, 255)); end if self.edits.login == "" then dxDrawText("Digite o login", ( sw / 2) - ( 359 * px / 2 ), self.PosY + 145 * px, 359 * px + ( sw / 2) - ( 359 * px / 2 ), 58 * px + self.PosY + 145 * px, tocolor(73, 78, 108, 255), 0.5, self.medium, "center", "center"); else dxDrawText(self.edits.login..self.edits.symbol[1], ( sw / 2) - ( 359 * px / 2 ), self.PosY + 145 * px, 359 * px + ( sw / 2) - ( 359 * px / 2 ), 58 * px + self.PosY + 145 * px, tocolor(255, 255, 255, 255), 0.5, self.medium, "center", "center" ); end if getKeyState("mouse1") and not self.click then self.edits.selected = 1 end else dxDrawImage(( sw / 2) - ( 359 * px / 2 ), self.PosY + 145 * px, 359 * px, 58 * px, "assets/images/input.png", 0, 0, 0, tocolor(38, 43, 75, 255)); if self.edits.selected == 1 then dxDrawImage(( sw / 2) - ( 359 * px / 2 ), self.PosY + 145 * px, 359 * px, 58 * px, "assets/images/input.png", 0, 0, 0, tocolor(50, 55, 89, 255)); else dxDrawImage(( sw / 2) - ( 359 * px / 2 ), self.PosY + 145 * px, 359 * px, 58 * px, "assets/images/input.png", 0, 0, 0, tocolor(38, 43, 75, 255)); end if self.edits.login == "" then dxDrawText("Digite o login", ( sw / 2) - ( 359 * px / 2 ), self.PosY + 145 * px, 359 * px + ( sw / 2) - ( 359 * px / 2 ), 58 * px + self.PosY + 145 * px, tocolor(73, 78, 108, 255), 0.5, self.medium, "center", "center"); else dxDrawText(self.edits.login..self.edits.symbol[1], ( sw / 2) - ( 359 * px / 2 ), self.PosY + 145 * px, 359 * px + ( sw / 2) - ( 359 * px / 2 ), 58 * px + self.PosY + 145 * px, tocolor(255, 255, 255, 255), 0.5, self.medium, "center", "center"); end if getKeyState("mouse1") and not self.click and self.edits.selected == 1 then if string.len(self.edits.symbol[1]) > 0 then self.edits.symbol[1] = "" end self.edits.selected = nil end end -- Senha if cursorPosition(( sw / 2) - ( 359 * px / 2 ), self.PosY + 225 * px, 359 * px, 58 * px) then dxDrawImage(( sw / 2) - ( 359 * px / 2 ), self.PosY + 225 * px, 359 * px, 58 * px, "assets/images/input.png", 0, 0, 0, tocolor(50, 55, 89, 255)); if self.edits.selected == 2 then dxDrawImage(( sw / 2) - ( 359 * px / 2 ), self.PosY + 225 * px, 359 * px, 58 * px, "assets/images/input.png", 0, 0, 0, tocolor(50, 55, 89, 255)); else dxDrawImage(( sw / 2) - ( 359 * px / 2 ), self.PosY + 225 * px, 359 * px, 58 * px, "assets/images/input.png", 0, 0, 0, tocolor(38, 43, 75, 255)); end if self.edits.password == "" then dxDrawText("Digite a senha", ( sw / 2) - ( 359 * px / 2 ), self.PosY + 225 * px, 359 * px + ( sw / 2) - ( 359 * px / 2 ), 58 * px + self.PosY + 225 * px, tocolor(73, 78, 108, 255), 0.5, self.medium, "center", "center"); else dxDrawText(string.gsub (self.edits.password, "%C", "*")..self.edits.symbol[2], ( sw / 2) - ( 359 * px / 2 ), self.PosY + 225 * px, 359 * px + ( sw / 2) - ( 359 * px / 2 ), 58 * px + self.PosY + 225 * px, tocolor(255, 255, 255, 255), 0.5, self.medium, "center", "center"); end if getKeyState("mouse1") and not self.click then self.edits.selected = 2 end else dxDrawImage(( sw / 2) - ( 359 * px / 2 ), self.PosY + 225 * px, 359 * px, 58 * px, "assets/images/input.png", 0, 0, 0, tocolor(38, 43, 75, 255)); if self.edits.selected == 2 then dxDrawImage(( sw / 2) - ( 359 * px / 2 ), self.PosY + 225 * px, 359 * px, 58 * px, "assets/images/input.png", 0, 0, 0, tocolor(50, 55, 89, 255)); else dxDrawImage(( sw / 2) - ( 359 * px / 2 ),self.PosY + 225 * px,359 * px,58 * px,"assets/images/input.png",0, 0, 0, tocolor(38, 43, 75, 255)); end if self.edits.password == "" then dxDrawText("Digite a senha", ( sw / 2) - ( 359 * px / 2 ), self.PosY + 225 * px, 359 * px + ( sw / 2) - ( 359 * px / 2 ), 58 * px + self.PosY + 225 * px, tocolor(73, 78, 108, 255), 0.5, self.medium, "center", "center"); else dxDrawText(string.gsub (self.edits.password, "%C", "*")..self.edits.symbol[2], ( sw / 2) - ( 359 * px / 2 ), self.PosY + 225 * px, 359 * px + ( sw / 2) - ( 359 * px / 2 ), 58 * px + self.PosY + 225 * px, tocolor(255, 255, 255, 255), 0.5, self.medium, "center", "center"); end if getKeyState("mouse1") and not self.click and self.edits.selected == 2 then if string.len(self.edits.symbol[2]) > 0 then self.edits.symbol[2] = "" end self.edits.selected = nil end end if cursorPosition(( sw / 2) - ( 235 * px / 2 ), self.PosY + 317 * px, 235 * px, 86 * px) then if getKeyState("mouse1") and not self.click then local username = self.edits.login local password = self.edits.password triggerServerEvent("LoginAccountInServer", localPlayer, username, password, bollSave) --iprint("Resource author: MightDragon") end end end if self.edits.selection == 2 then -- Регистрация dxDrawText("Registrar", self.PosX, self.PosY + 64 * px, self.Weight + self.PosX, self.Height, tocolor(255, 255, 255, self.i255), 0.5, self.medium3, "center", "top"); dxDrawImage(self.PosX + 203 * px, self.PosY + 93 * px, 38 * px, 5 * px, "assets/images/line.png", 0, 0, 0, tocolor(181, 72, 69, 255)); if cursorPosition(self.PosX + 255 * px, self.PosY + 460 * px, 52 * px, 25 * px) then if getKeyState("mouse1") and not self.click then self.edits.selection = 1 --iprint("Resource author: MightDragon") end dxDrawText("Voltar", self.PosX, self.PosY + 460 * px, self.Weight + self.PosX, 15 * px, tocolor(255, 255, 255, 255), 0.53, self.medium2, "center", "top", nil, nil, nil, true); dxDrawRectangle(self.PosX + 255 * px, self.PosY + 480 * px, 52 * px, 1 * px, tocolor(255, 255, 255, 255)); else dxDrawText("Voltar", self.PosX, self.PosY + 460 * px, self.Weight + self.PosX, 15 * px, tocolor(255, 255, 255, 255), 0.53, self.medium2, "center", "top", nil, nil, nil, true); end -- Логин if cursorPosition(( sw / 2) - ( 359 * px / 2 ), self.PosY + 125 * px, 359 * px, 58 * px) then dxDrawImage(( sw / 2) - ( 359 * px / 2 ), self.PosY + 125 * px, 359 * px, 58 * px, "assets/images/input.png", 0, 0, 0, tocolor(50, 55, 89, 255)); if self.edits.selected == 3 then dxDrawImage(( sw / 2) - ( 359 * px / 2 ), self.PosY + 125 * px, 359 * px, 58 * px, "assets/images/input.png", 0, 0, 0, tocolor(50, 55, 89, 255)); else dxDrawImage(( sw / 2) - ( 359 * px / 2 ), self.PosY + 125 * px, 359 * px, 58 * px, "assets/images/input.png", 0, 0, 0, tocolor(38, 43, 75, 255)); end if self.edits.loginReg == "" then dxDrawText("Digite o login", ( sw / 2) - ( 359 * px / 2 ), self.PosY + 125 * px, 359 * px + ( sw / 2) - ( 359 * px / 2 ), 58 * px + self.PosY + 125 * px, tocolor(73, 78, 108, 255), 0.5, self.medium, "center", "center"); else dxDrawText(self.edits.loginReg..self.edits.symbol[3], ( sw / 2) - ( 359 * px / 2 ), self.PosY + 125 * px, 359 * px + ( sw / 2) - ( 359 * px / 2 ), 58 * px + self.PosY + 125 * px, tocolor(255, 255, 255, 255), 0.5, self.medium, "center", "center" ); end if getKeyState("mouse1") and not self.click then self.edits.selected = 3 end else dxDrawImage(( sw / 2) - ( 359 * px / 2 ), self.PosY + 125 * px, 359 * px, 58 * px, "assets/images/input.png", 0, 0, 0, tocolor(38, 43, 75, 255)); if self.edits.selected == 3 then dxDrawImage(( sw / 2) - ( 359 * px / 2 ), self.PosY + 125 * px, 359 * px, 58 * px, "assets/images/input.png", 0, 0, 0, tocolor(50, 55, 89, 255)); else dxDrawImage(( sw / 2) - ( 359 * px / 2 ), self.PosY + 125 * px, 359 * px, 58 * px, "assets/images/input.png", 0, 0, 0, tocolor(38, 43, 75, 255)); end if self.edits.loginReg == "" then dxDrawText("Digite o login", ( sw / 2) - ( 359 * px / 2 ), self.PosY + 125 * px, 359 * px + ( sw / 2) - ( 359 * px / 2 ), 58 * px + self.PosY + 125 * px, tocolor(73, 78, 108, 255), 0.5, self.medium, "center", "center"); else dxDrawText(self.edits.loginReg..self.edits.symbol[3], ( sw / 2) - ( 359 * px / 2 ), self.PosY + 125 * px, 359 * px + ( sw / 2) - ( 359 * px / 2 ), 58 * px + self.PosY + 125 * px, tocolor(255, 255, 255, 255), 0.5, self.medium, "center", "center"); end if getKeyState("mouse1") and not self.click and self.edits.selected == 3 then if string.len(self.edits.symbol[3]) > 0 then self.edits.symbol[3] = "" end self.edits.selected = nil end end -- Senha if cursorPosition(( sw / 2) - ( 359 * px / 2 ), self.PosY + 205 * px, 359 * px, 58 * px) then dxDrawImage(( sw / 2) - ( 359 * px / 2 ), self.PosY + 205 * px, 359 * px, 58 * px, "assets/images/input.png", 0, 0, 0, tocolor(50, 55, 89, 255)); if self.edits.selected == 4 then dxDrawImage(( sw / 2) - ( 359 * px / 2 ), self.PosY + 205 * px, 359 * px, 58 * px, "assets/images/input.png", 0, 0, 0, tocolor(50, 55, 89, 255)); else dxDrawImage(( sw / 2) - ( 359 * px / 2 ), self.PosY + 205 * px, 359 * px, 58 * px, "assets/images/input.png", 0, 0, 0, tocolor(38, 43, 75, 255)); end if self.edits.passwordReg == "" then dxDrawText("Digite a senha", ( sw / 2) - ( 359 * px / 2 ), self.PosY + 205 * px, 359 * px + ( sw / 2) - ( 359 * px / 2 ), 58 * px + self.PosY + 205 * px, tocolor(73, 78, 108, 255), 0.5, self.medium, "center", "center"); else dxDrawText(string.gsub (self.edits.passwordReg, "%C", "*")..self.edits.symbol[4], ( sw / 2) - ( 359 * px / 2 ), self.PosY + 205 * px, 359 * px + ( sw / 2) - ( 359 * px / 2 ), 58 * px + self.PosY + 205 * px, tocolor(255, 255, 255, 255), 0.5, self.medium, "center", "center" ); end if getKeyState("mouse1") and not self.click then self.edits.selected = 4 end else dxDrawImage(( sw / 2) - ( 359 * px / 2 ), self.PosY + 205 * px, 359 * px, 58 * px, "assets/images/input.png", 0, 0, 0, tocolor(38, 43, 75, 255)); if self.edits.selected == 4 then dxDrawImage(( sw / 2) - ( 359 * px / 2 ), self.PosY + 205 * px, 359 * px, 58 * px, "assets/images/input.png", 0, 0, 0, tocolor(50, 55, 89, 255)); else dxDrawImage(( sw / 2) - ( 359 * px / 2 ), self.PosY + 205 * px, 359 * px, 58 * px, "assets/images/input.png", 0, 0, 0, tocolor(38, 43, 75, 255)); end if self.edits.passwordReg == "" then dxDrawText("Digite a senha", ( sw / 2) - ( 359 * px / 2 ), self.PosY + 205 * px, 359 * px + ( sw / 2) - ( 359 * px / 2 ), 58 * px + self.PosY + 205 * px, tocolor(73, 78, 108, 255), 0.5, self.medium, "center", "center"); else dxDrawText(string.gsub (self.edits.passwordReg, "%C", "*")..self.edits.symbol[4], ( sw / 2) - ( 359 * px / 2 ), self.PosY + 205 * px, 359 * px + ( sw / 2) - ( 359 * px / 2 ), 58 * px + self.PosY + 205 * px, tocolor(255, 255, 255, 255), 0.5, self.medium, "center", "center"); end if getKeyState("mouse1") and not self.click and self.edits.selected == 4 then if string.len(self.edits.symbol[4]) > 0 then self.edits.symbol[4] = "" end self.edits.selected = nil end end -- Repita a senha if cursorPosition(( sw / 2) - ( 359 * px / 2 ), self.PosY + 285 * px, 359 * px, 58 * px) then dxDrawImage(( sw / 2) - ( 359 * px / 2 ), self.PosY + 285 * px, 359 * px, 58 * px, "assets/images/input.png", 0, 0, 0, tocolor(50, 55, 89, 255)); if self.edits.selected == 5 then dxDrawImage(( sw / 2) - ( 359 * px / 2 ), self.PosY + 285 * px, 359 * px, 58 * px, "assets/images/input.png", 0, 0, 0, tocolor(50, 55, 89, 255)); else dxDrawImage(( sw / 2) - ( 359 * px / 2 ), self.PosY + 285 * px, 359 * px, 58 * px, "assets/images/input.png", 0, 0, 0, tocolor(38, 43, 75, 255)); end if self.edits.passwordRegRef == "" then dxDrawText("Repita a senha", ( sw / 2) - ( 359 * px / 2 ), self.PosY + 285 * px, 359 * px + ( sw / 2) - ( 359 * px / 2 ), 58 * px + self.PosY + 285 * px, tocolor(73, 78, 108, 255), 0.5, self.medium, "center", "center"); else dxDrawText(string.gsub (self.edits.passwordRegRef, "%C", "*")..self.edits.symbol[5], ( sw / 2) - ( 359 * px / 2 ), self.PosY + 285 * px, 359 * px + ( sw / 2) - ( 359 * px / 2 ), 58 * px + self.PosY + 285 * px, tocolor(255, 255, 255, 255), 0.5, self.medium, "center", "center" ); end if getKeyState("mouse1") and not self.click then self.edits.selected = 5 end else dxDrawImage(( sw / 2) - ( 359 * px / 2 ), self.PosY + 285 * px, 359 * px, 58 * px, "assets/images/input.png", 0, 0, 0, tocolor(38, 43, 75, 255)); if self.edits.selected == 5 then dxDrawImage(( sw / 2) - ( 359 * px / 2 ), self.PosY + 285 * px, 359 * px, 58 * px, "assets/images/input.png", 0, 0, 0, tocolor(50, 55, 89, 255)); else dxDrawImage(( sw / 2) - ( 359 * px / 2 ), self.PosY + 285 * px, 359 * px, 58 * px, "assets/images/input.png", 0, 0, 0, tocolor(38, 43, 75, 255)); end if self.edits.passwordRegRef == "" then dxDrawText("Repita a senha", ( sw / 2) - ( 359 * px / 2 ), self.PosY + 285 * px, 359 * px + ( sw / 2) - ( 359 * px / 2 ), 58 * px + self.PosY + 285 * px, tocolor(73, 78, 108, 255), 0.5, self.medium, "center", "center"); else dxDrawText(string.gsub (self.edits.passwordRegRef, "%C", "*")..self.edits.symbol[5], ( sw / 2) - ( 359 * px / 2 ), self.PosY + 285 * px, 359 * px + ( sw / 2) - ( 359 * px / 2 ), 58 * px + self.PosY + 285 * px, tocolor(255, 255, 255, 255), 0.5, self.medium, "center", "center"); end if getKeyState("mouse1") and not self.click and self.edits.selected == 5 then if string.len(self.edits.symbol[5]) > 0 then self.edits.symbol[5] = "" end self.edits.selected = nil end end dxCreateButton(( sw / 2) - ( 235 * px / 2 ), self.PosY + 357 * px, 235 * px, 86 * px, "assets/images/button.png", "assets/images/button2.png", 0); dxDrawText("Criar", ( sw / 2) - ( 235 * px / 2 ), self.PosY + 357 * px, 235 * px + ( sw / 2) - ( 235 * px / 2 ), 86 * px + self.PosY + 357 * px, tocolor(255, 255, 255, 255), 0.5, self.medium, "center", "center"); if cursorPosition(( sw / 2) - ( 235 * px / 2 ), self.PosY + 357 * px, 235 * px, 86 * px) then if getKeyState("mouse1") and not self.click then local username = self.edits.loginReg local password = self.edits.passwordReg local confirm = self.edits.passwordRegRef triggerServerEvent("RegisterAccountInServer", localPlayer, username, password, confirm) --iprint("Resource author: MightDragon") end end end if getKeyState ("mouse1") then self.click = true else self.click = false end end function ShowManager() Login.Interface:Render(); end function LoginInterfaceShow(state) self.isVisible = state; self.edits.selection = 1; showCursor(state); fadeCamera(state); if state == true then showChat(false) fadeCamera(false) elseif state == false then showChat(true) fadeCamera(true) end -- # Crutch if state then if not isEventHandlerAdded("onClientRender", root, ShowManager) then addEventHandler("onClientRender", root, ShowManager) end if not isEventHandlerAdded("onClientCharacter", root, addKeyCharacter) then addEventHandler("onClientCharacter", root, addKeyCharacter) end if not isEventHandlerAdded("onClientKey", root, removeKeyCharacter) then addEventHandler("onClientKey", root, removeKeyCharacter) end self.edits.timers[1] = setTimer (checkLine, 500, 0) else if isEventHandlerAdded("onClientRender", root, ShowManager) then removeEventHandler("onClientRender", root, ShowManager) end if isEventHandlerAdded("onClientCharacter", root, addKeyCharacter) then removeEventHandler("onClientCharacter", root, addKeyCharacter) end if isEventHandlerAdded("onClientKey", root, removeKeyCharacter) then removeEventHandler("onClientKey", root, removeKeyCharacter) end for k, t in pairs (self.edits.timers) do if isTimer (self.edits.timers[k]) then killTimer (self.edits.timers[k]) end end end end local settingsFile = "settings.json" function loadSettings() local data if fileExists(settingsFile) then local file = fileOpen(settingsFile, true) if (file) then data = fromJSON(fileRead(file, fileGetSize(file))) fileClose(file) end end if (type(data) ~= "table") then data = {} end local user = self.edits.login local pass = self.edits.password self.edits.login = data.user or "" self.edits.password = data.pass or "" end local needsSave, saveTimer = false function saveSettings() if isTimer(saveTimer) then needsSave = true else needsSave = true writeSettingsFile() saveTimer = setTimer(writeSettingsFile, 1000, 1) end end function writeSettingsFile() if (needsSave) then local data = {} data.user = self.edits.login data.pass = self.edits.password local file = fileCreate(settingsFile) if (file) then fileWrite(file, toJSON(data, true)) fileClose(file) end needsSave = false end end end; Login.Interface:onRender(); function CloseInterface() LoginInterfaceShow(false) end addEvent ("CloseInterfaceLogin", true) addEventHandler ("CloseInterfaceLogin", resourceRoot, CloseInterface)
    0 points
×
×
  • Create New...