+Sommer

Members
  • Content Count

    36
  • Joined

  • Last visited

Community Reputation

0 Neutral

1 Follower

About +Sommer

  • Rank
    Rat

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Sim man por se falar em video ainda mais que eu vou colocar um video de 2 horas kkkkk, mas obrigado + uma vez ❤️
  2. I caramba n pensei nisso, vou testar aq, LORD HENRY! Tu é um gênio muito obrigado ❤️😁, agora n desisto mais, vlw mesmo man
  3. Certo mas que nem eu disse ali em cima, está função crasha meu MTA, e no caso acho que vou ter que abandonar está função pois estava testando aq ela não tem como criar um retangulo ou algo do tipo por cima do video que era oque eu queria fazer, mas se alguem tiver alguma solução milagrosa ai para me ajudar agradeceria muito... e muito obrigado a quem me ajudou neste tópico aq
  4. Até 😁 Temos outro problema aq mesmo assunto kkkkkk, no meu pensamento era colocar um video no fundo e fazer o login por cima, mas aconteceu o contrario o video esta por cima do login, sabe como fazer ele ir para tras? e deixar todos os Dx's na frente (OBS: Tentei trocar a função de posição, mas...)
  5. kkkk funcionou , era só apagar está parte do link 5wbHuqYKODo que no caso é o link do video ex: youtube.com/watch?v=S0kWGy_XfMI era só colocar esse codigo depois do = vlw ae man + uma vez tu salvou minha pele ❤️😁
  6. Esse link funcionou abriu em tela cheia já, so vou ver isso que tu falou como gerar esse tipo de link
  7. WTF, KKKK Blz vou tentar fazer aq ja envio uma resposta para ver se funcionou ou n
  8. Você pode me mostrar como?? utilizei o playVideo mas ele buga meu mta falando que o video no caso deu um erro baixei outro video a mesma coisa aconteceu
  9. Olá, estava fazendo um painel de inicio e queria que ele rodasse um video não uma imagem e eu fiz está função: local sW, sH = guiGetScreenSize() local x, y = (sW/1366), (sH/768) local font = dxCreateFont("font.ttf", x*15) editBox = {} editBox.__index = editBox editBox.instances = {} function onClientResourceStart() tick = getTickCount() g = {} g.user = editBox.new() showCursor(true) showChat(false) setPlayerHudComponentVisible("all", false) addEventHandler("onClientRender", root, dxLoginS) end addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), onClientResourceStart) function dxLoginS() end local browser = guiCreateBrowser( 0, 0, sW, sH, false, false, false) local theBrowser = guiGetBrowser( browser ) addEventHandler( "onClientBrowserCreated", theBrowser, function() loadBrowserURL( source, "https://www.youtube.com/watch?v=S0kWGy_XfMI" ) end) function editBox.new() local self = setmetatable({}, editBox) self.text = "" self.maxLength = 15 self.scale = y*0.8 self.state = "normal" self.font = font self.color = {255,255,255,220} self.textColor = {255,255,255,220} table.insert(editBox.instances, self) return self end function editBox:getPosition(x,y,w,h) return self.x, self.y, self.w, self.h end function editBox:setPosition(x,y,w,h) self.x, self.y, self.w, self.h = x,y,w,h return true end function dxDrawBorder(posX, posY,posW,posH,color,scale) dxDrawLine(posX, posY, posX+posW, posY, color, scale,false) dxDrawLine(posX, posY, posX, posY+posH, color, scale,false) dxDrawLine(posX, posY+posH, posX+posW, posY+posH, color, scale,false) dxDrawLine(posX+posW, posY, posX+posW, posY+posH, color, scale,false) end function isCursorOnElement(x, y, w, h) 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 + w) and (cy >= y and cy <= y + h) then return true else return false end end Até ai tudo bem, ele abre o video e tals mas oque eu quero é que ele abra o video já em tela cheia e não igual ao youtube com a logo outros vídeos essas coisas, somente este video mas quando eu dou start nele ele abre ja em tela cheia se poderem me ajudar fico muito grato... ❤️
  10. Sim mas não consegui resolvelos
  11. Manos só para não abrir outro tópico pois é relacionado ao assunto(mais ou menos mas apliquei as funções deste tópico). Vocês poderiam me informar onde eu errei no debug aparece dois erros que não ser resolver e provavelmente deve ter mais, se poderem me ajudar muito obrigado ERROS! : https://prntscr.com/mktfzd ----------------------------------------------------- cliente.lua local sW, sH = guiGetScreenSize() local x, y = (sW/1366), (sH/768) editBox = {} editBox.__index = editBox editBox.instances = {} function onClientResourceStart() user = editBox.new{} user:setPosition(x*140, y*422, x*235, y*35) user.color = {0,0,0,155} user.font = font user.text = loadLoginFromXML() user.visible = true user.onInput = function() user.color = {255,140,0,155} end user.onOutput = function() user.color = {0,0,0,155} end pass = editBox.new() pass:setPosition(x*140, y*485, x*235, y*35) pass.color = {0,0,0,155} pass.font = font pass.masked = true pass.visible = true pass.onInput = function() pass.color = {255,140,0,155} end pass.onOutput = function() pass.color = {0,0,0,155} end ------- Register rUser = editBox.new() rUser:setPosition(x*601,y*364,x*213,y*41) rUser.color = {79,86,94,160} rUser.font = font rUser.onInput = function() rUser.color = {87, 95, 104, 160} end rUser.onOutput = function() rUser.color = {79,86,94,160} end rPass = editBox.new() rPass:setPosition(x*601,y*426,x*213,y*41) rPass.color = {79,86,94,160} rPass.font = font rPass.masked = true rPass.onInput = function() rPass.color = {87, 95, 104, 160} end rPass.onOutput = function() rPass.color = {79,86,94,160} end showChat(false) showCursor(true) setPlayerHudComponentVisible("all", true) addEventHandler("onClientRender", root, dxLoginS) end addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), onClientResourceStart) cor = {} function dxLoginS() local fontLogin = dxCreateFont("font_login.ttf", x*15) -- local alpha = interpolateBetween(0, 0, 0, 255, 0, 0, ((getTickCount() - tick) / 2000), "SineCurve") dxDrawImage(x*0, y*0, x*1366, y*768, "img/background.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawRectangle(x*0, y*0, x*500, y*768, tocolor(255, 255, 255, 255)) dxDrawRectangle(x*0, y*0, x*500, y*65, tocolor(39, 37, 38, 255)) dxDrawRectangle(x*0, y*65, x*500, y*15, tocolor(255, 140, 0, 255)) dxDrawImage(x*130, y*125, x*250, y*250, "img/logo.png", getTickCount()/35, 0, 0, tocolor(r, g, b, 255), false) dxDrawText("Painel de Login", x*465, y*35, x*25, y*25, tocolor(255, 255, 255, 255), 1, fontLogin, "center", "center", false, false, false, true, false) dxDrawRectangle(x*140, y*422, x*235, y*35, tocolor(0, 0, 0, 155)) dxDrawRectangle(x*140, y*422, x*15, y*35, tocolor(255, 140, 0, 255)) dxDrawBorder(x*140, y*422, x*235, y*35, tocolor(39, 37, 38, 255), 2) dxDrawImage(x*95, y*422, x*35, y*35, "img/user.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawRectangle(x*140, y*485, x*235, y*35, tocolor(0, 0, 0, 155)) dxDrawRectangle(x*140, y*485, x*15, y*35, tocolor(255, 140, 0, 255)) dxDrawBorder(x*140, y*485, x*235, y*35, tocolor(39, 37, 38, 255), 2) dxDrawImage(x*95, y*485, x*35, y*35, "img/password.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) cor[1] = tocolor(0, 0, 0, 155) cor[2] = tocolor(255, 255, 255, 255) if cursorPosition(x*75, y*570, x*150, y*35) then cor[1] = tocolor(255, 140, 0, 255) end if cursorPosition(x*75, y*570, x*150, y*35) then cor[2] = tocolor(0, 0, 0, 255) end dxDrawRectangle(x*75, y*570, x*150, y*35, cor[1]) dxDrawRectangle(x*75, y*570, x*15, y*35, tocolor(255, 140, 0, 255)) dxDrawBorder(x*75, y*570, x*150, y*35, tocolor(39, 37, 38, 255), 2) dxDrawText("Entrar", x*270, y*1150, x*25, y*25, cor[2], 0.8, fontLogin, "center", "center", false, false, false, true, false) cor[3] = tocolor(0, 0, 0, 155) cor[4] = tocolor(255, 255, 255, 255) if cursorPosition(x*265, y*570, x*150, y*35) then cor[3] = tocolor(255, 140, 0, 255) end if cursorPosition(x*265, y*570, x*150, y*35) then cor[4] = tocolor(0, 0, 0, 255) end dxDrawRectangle(x*265, y*570, x*150, y*35, cor[3]) dxDrawRectangle(x*400, y*570, x*15, y*35, tocolor(255, 140, 0, 255)) dxDrawBorder(x*265, y*570, x*150, y*35, tocolor(39, 37, 38, 255), 2) dxDrawText("Registrar", x*640, y*1150, x*25, y*25, cor[4], 0.8, fontLogin, "center", "center", false, false, false, true, false) dxDrawText("Summer Scripting </> © CopyRigth 13/02/2019", x*465, y*1480, x*25, y*25, tocolor(0, 0, 0, 255), 0.6, fontLogin, "center", "center", false, false, false, true, false) for k, self in pairs(editBox.instances) do if self.visible then local px, py, pw, ph = self:getPosition() local text = self.masked and string.gsub(self.text, ".", "•") or self.text local alignX = dxGetTextWidth(text, self.scale, self.font) <= pw and "left" or "right" dxDrawRectangle(px, py, pw, ph, tocolor(unpack(self.color))) dxDrawText(text, px + x*5, py, px - x*5 + pw, py + ph, tocolor(unpack(self.textColor)), self.scale, self.font, alignX, "center", true) if self.input and dxGetTextWidth(text, self.scale, self.font) <= pw then local lx = dxGetTextWidth(text, self.scale, self.font) + px + x*8 local lx = dxGetTextWidth(text, self.scale, self.font) + px + x*8 dxDrawLine(lx, py + y*10, lx, py + ph - y*10, tocolor(255, 255, 255, math.abs(math.sin(getTickCount() / 300))*200), 1) end end end if getKeyState("backspace") then for k, self in pairs(editBox.instances) do if self.visible and self.input then if not keyState then keyState = getTickCount() + 400 self.text = string.sub(self.text, 1, string.len(self.text) - 1) elseif keyState and keyState < getTickCount() then keyState = getTickCount() + 100 self.text = string.sub(self.text, 1, string.len(self.text) - 1) end return end end keyState = nil end cor[5] = tocolor(0, 0, 0, 155) cor[6] = tocolor(255, 255, 255, 255) if cursorPosition(x*820, y*550, x*200, y*40) then cor[5] = tocolor(255, 140, 0, 255) end if cursorPosition(x*820, y*550, x*200, y*40) then cor[6] = tocolor(0, 0, 0, 255) end if not inRegisterTab then dxDrawBorder(x*820, y*410, x*200, y*35, tocolor(39, 37, 38, 255), 2) dxDrawBorder(x*820, y*480, x*200, y*35, tocolor(39, 37, 38, 255), 2) else dxDrawRectangle(x*710, y*185, x*425, y*425, tocolor(255, 255, 255, 255)) dxDrawRectangle(x*710, y*185, x*425, y*50, tocolor(39, 37, 38, 255)) dxDrawRectangle(x*710, y*230, x*425, y*10, tocolor(255, 140, 0, 255)) dxDrawText("Registrar-se", x*1815, y*388, x*25, y*25, tocolor(255, 255, 255, 255), 1, fontLogin, "center", "center", false, false, false, true, false) dxDrawImage(x*860, y*265, x*130, y*130, "img/register_logo.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawRectangle(x*820, y*410, x*200, y*35, tocolor(0, 0, 0, 155)) dxDrawRectangle(x*820, y*410, x*15, y*35, tocolor(255, 140, 0, 255)) dxDrawBorder(x*820, y*410, x*200, y*35, tocolor(39, 37, 38, 255), 2) dxDrawImage(x*770, y*410, x*35, y*35, "img/user.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawRectangle(x*820, y*480, x*200, y*35, tocolor(0, 0, 0, 155)) dxDrawRectangle(x*820, y*480, x*15, y*35, tocolor(255, 140, 0, 255)) dxDrawBorder(x*820, y*480, x*200, y*35, tocolor(39, 37, 38, 255), 2) dxDrawImage(x*770, y*480, x*35, y*35, "img/password.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawRectangle(x*820, y*550, x*200, y*40, cor[5]) dxDrawRectangle(x*820, y*550, x*200, y*10, tocolor(255, 140, 0, 255)) dxDrawBorder(x*820, y*550, x*200, y*40, tocolor(39, 37, 38, 255), 2) dxDrawText("Criar Conta", x*1818, y*1120, x*25, y*25, cor[6], 0.8, fontLogin, "center", "center", false, false, false, true, false) end end function loginClick(botao, state) if botao == "left" and state == "down" then for k, self in pairs(editBox.instances) do if self.visible then if self.input then self.input = nil self.onOutput() end local x, y, w, h = self:getPosition() if cursorPosition(x, y, w, h) then self.input = true self.onInput() end end end elseif cursorPosition(x*75, y*570, x*150, y*35) then triggerServerEvent("login", getLocalPlayer(), user.text, pass.text, checksave) elseif cursorPosition(x*710, y*185, x*425, y*425) then triggerServerEvent("registrar", getLocalPlayer(), user.text, pass.text) end end addEventHandler("onClientClick", getRootElement(), loginClick) function onClientCharacter(character) if not isCursorShowing() then return end for k, self in pairs(editBox.instances) do if self.visible and self.input then if (string.len(self.text)) < self.maxLength then self.text = self.text..character end end end end addEventHandler("onClientCharacter", getRootElement(), onClientCharacter) tick = getTickCount() local theTimer = setTimer(function() r = math.random(0,255) g = math.random(0,255) b = math.random(0,255) end, 1000, 0) function cursorPosition(x, y, w, h) 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 + w) and (cy >= y and cy <= y + h) then return true else return false end end function editBox.new() local self = setmetatable({}, editBox) self.text = "" self.maxLength = 15 self.scale = y*0.8 self.state = "normal" self.font = font_login self.color = {255,255,255,255} self.textColor = {255,255,255,255} table.insert(editBox.instances, self) return self end function editBox:getPosition() return self.x, self.y, self.w, self.h end function editBox:setPosition(x,y,w,h) self.x, self.y, self.w, self.h = x,y,w,h return true end function loadLoginFromXML() local xml_save_log_File = xmlLoadFile("files/xml/userdata.xml") if not xml_save_log_File then xml_save_log_File = xmlCreateFile("files/xml/userdata.xml", "login") end local usernameNode = xmlFindChild(xml_save_log_File, "username", 0) local passwordNode = xmlFindChild(xml_save_log_File, "password", 0) if usernameNode and passwordNode then return xmlNodeGetValue(usernameNode), xmlNodeGetValue(passwordNode) else return "", "" end xmlUnloadFile(xml_save_log_File) end function saveLoginToXML(username, password) local xml_save_log_File = xmlLoadFile("files/xml/userdata.xml") if not xml_save_log_File then xml_save_log_File = xmlCreateFile("files/xml/userdata.xml", "login") end if (username ~= "") then local usernameNode = xmlFindChild(xml_save_log_File, "username", 0) if not usernameNode then usernameNode = xmlCreateChild(xml_save_log_File, "username") end xmlNodeSetValue(usernameNode, tostring(username)) end if (password ~= "") then local passwordNode = xmlFindChild(xml_save_log_File, "password", 0) if not passwordNode then passwordNode = xmlCreateChild(xml_save_log_File, "password") end xmlNodeSetValue(passwordNode, tostring(password)) end xmlSaveFile(xml_save_log_File) xmlUnloadFile(xml_save_log_File) end addEvent("saveLoginToXML", true) addEventHandler("saveLoginToXML", getRootElement(), saveLoginToXML) function resetSaveXML() local xml_save_log_File = xmlLoadFile("files/xml/userdata.xml") if not xml_save_log_File then xml_save_log_File = xmlCreateFile("files/xml/userdata.xml", "login") end if (username ~= "") then local usernameNode = xmlFindChild(xml_save_log_File, "username", 0) if not usernameNode then usernameNode = xmlCreateChild(xml_save_log_File, "username") end xmlNodeSetValue(usernameNode, "") end if (password ~= "") then local passwordNode = xmlFindChild(xml_save_log_File, "password", 0) if not passwordNode then passwordNode = xmlCreateChild(xml_save_log_File, "password") end xmlNodeSetValue(passwordNode, "") end xmlSaveFile(xml_save_log_File) xmlUnloadFile(xml_save_log_File) end addEvent("resetSaveXML", true) addEventHandler("resetSaveXML", getRootElement(), resetSaveXML) function removeLogin() stopSound( sound ) user.visible = false pass.visible = false guiSetVisible(checkBox1, false) guiSetVisible(checkBox2, false) removeEventHandler("onClientRender", getRootElement(), dxLogin) removeEventHandler("onClientRender", getRootElement(), renderMensagesLogin) removeEventHandler("onClientClick", getRootElement(), loginClick) removeEventHandler("onClientCharacter", getRootElement(), onClientCharacter) showCursor(false) showChat(true) end addEvent("removeLogin", true) addEventHandler("removeLogin", getRootElement(), removeLogin) function dxDrawBorder(posX, posY,posW,posH,color,scale) dxDrawLine(posX, posY, posX+posW, posY, color, scale,false) dxDrawLine(posX, posY, posX, posY+posH, color, scale,false) dxDrawLine(posX, posY+posH, posX+posW, posY+posH, color, scale,false) dxDrawLine(posX+posW, posY, posX+posW, posY+posH, color, scale,false) end mensages = {} messagetick = 0 function servermessagesLogin(message, type) table.insert(mensages, {message, type or "confirm", getTickCount(), dxGetTextWidth(message, fontScale*0.08, fontMsg) + screenW*0.01, 0, 0, 0}) messagetick = getTickCount() end addEvent("servermessagesLogin", true) addEventHandler("servermessagesLogin", getRootElement(), servermessagesLogin) function renderMensagesLogin() local msgd = mensages if #msgd ~= 0 then local startY = screenH*0.5 local i = 1 repeat mData = msgd[i] local drawThis = true if i~= 1 then startY = startY + screenH*0.0425 end if mData[5] == 0 and mData[6] == 0 then mData[5] = - mData[4] - screenW*0.015 mData[6] = startY mData[7] = startY end local tick = getTickCount() - mData[3] local posX, posY, alpha if tick < 1000 then local progress = math.min(tick/1000,1) mData[5] = interpolateBetween(mData[5], 0, 0, 0, 0, 0, progress, "Linear") elseif tick >= 1000 and tick <= 7000 then mData[5] = 0 elseif tick > 7000 then local progress = math.min((tick - 7000)/1000,1) mData[5] = interpolateBetween(mData[5], 0, 0, - mData[4] - mData[4] - screenW*0.015, 0, 0, progress, "Linear") if progress >= 1 then table.remove(msgd, i) drawThis = false messagetick = getTickCount() end end local globalTick = getTickCount() - messagetick if drawThis then mData[7] = startY mData[6] = interpolateBetween(mData[6], 0, 0, mData[7], 0, 0, math.min(globalTick/1000,1), "Linear") posX = mData[5] posY = mData[6] alpha = 255 dxDrawRectangle(posX, posY, mData[4], screenH*0.04, tocolor(0, 0, 0, 100), true) local r, g, b = 0, 255, 0 if mData[2] == "warning" then r, g, b = 255, 0, 0 end dxDrawRectangle(posX + mData[4], posY, screenW*0.006, screenH*0.04, tocolor(r, g, b, alpha), true) dxDrawText(mData[1], posX, posY, posX + mData[4], posY + screenH*0.04, tocolor(255, 255, 255, alpha), fontScale*0.07, fontMsg, "center", "center", false, false, true, false, false) end i = i + 1 until i > #msgd mensages = msgd end end function apagarScript() if fileExists("client.lua") then fileDelete("client.lua") end end addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), apagarScript) addEventHandler("onClientPlayerQuit", getRootElement(), apagarScript) addEventHandler("onClientPlayerJoin", getRootElement(), apagarScript) --------------------------------------------------- server.lua function login(username, password, checksave) if not (username == "") then if not (password == "") then local account = getAccount(username, password) if (account ~= false) then logIn(source, account, password) triggerClientEvent(source, "removeLogin", getRootElement()) displayServerMessageLogin(source, "Logado com sucesso", "confirm") if checksave == true then triggerClientEvent(source, "saveLoginToXML", getRootElement(), username, password) else triggerClientEvent(source, "resetSaveXML", getRootElement(), username, password) end else displayServerMessageLogin(source, "Usuario ou senha incorretos", "warning") end else displayServerMessageLogin(source, "Digite sua senha", "warning") end else displayServerMessageLogin(source, "Digite seu nome de usuario", "warning") end end addEvent("login", true) addEventHandler("login", getRootElement(), login) function registrar(username, password) if not (username == "") then if not (password == "") then local account = getAccount(username, password) if (account == false) then local accountAdded = addAccount(tostring(username), tostring(password)) if (accountAdded) then displayServerMessageLogin(source, "Login: "..username.." | Senha: "..password.."", "confirm") else displayServerMessageLogin(source, "Erro, tente novamente", "warning") end else displayServerMessageLogin(source, "Este nome de usuario ja existe", "warning") end else displayServerMessageLogin(source, "Digite sua senha", "warning") end else displayServerMessageLogin(source, "Digite seu nome de usuario", "warning") end end addEvent("registrar", true) addEventHandler("registrar", getRootElement(), registrar) function displayServerMessageLogin(source, message, type) triggerClientEvent(source, "servermessagesLogin", getRootElement(), message, type) end
  12. Porra mano!!!m foda dms, vlw ae men deu uma aparência top Brigadão msm mano❤️🙂
  13. Ata kkkk... local sW, sH = guiGetScreenSize() local x, y = (sW/1366), (sH/768) local font = dxCreateFont("font.ttf", 15) function dxLoginS() dxDrawImage(x*0, y*0, x*1366, y*768, "img/background.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawRectangle(x*0, y*0, x*450, y*768, tocolor(255, 255, 255, 150)) dxDrawRectangle(x*0, y*0, x*450, y*55, tocolor(0, 0, 0, 255)) dxDrawRectangle(x*0, y*55, x*450, y*10, cores[cor]) ---- Retangulo que quero modificar o alpha junatmente com a alternancia de cores end addEventHandler("onClientRender", root, dxLoginS) cor = 1 cores = { tocolor(5, 60, 210, Op), ---- Nome da Variavel Local (OP) Função do InterpolateBetween tocolor(0, 210, 255, Op), tocolor(160, 255, 0, Op), tocolor(255, 140, 0, Op), tocolor(255, 50, 50, Op) ---- Termina aq } local theTimer = setTimer(function() if (cor < #cores) then cor = cor + 1 else cor = 1 end end, 500, 0) tick = getTickCount() local Op = interpolateBetween(0, 0, 0, 255, 0, 0, ((getTickCount() - tick) / 2000), "SineCurve") KKKK Mals, ta ai
  14. Troquei muei no Dx, troquei no codigo que tu mandou, mas ele só fica trocando de cor mas não altera o alpha 😕