Jump to content

noKoudai

Members
  • Posts

    8
  • Joined

  • Last visited

Details

  • Gang
    Saiga
  • Location
    BR
  • Occupation
    Observador
  • Interests
    Qualquer coisa

noKoudai's Achievements

Newbie

Newbie (4/54)

1

Reputation

  1. Não entendi, que mod? o RemoveEvent ja esta no client.
  2. Olá, estou com um loadingscreen que quando o player entra no sv baixando os arquivos a loading aparece. porem quando o download acaba ela continua carregando ifinitamente e não para --Client local sx, sy = guiGetScreenSize() local x, y = (sx/1366), (sy/768) local resourceRoot = getResourceRootElement(getThisResource()) local screenWidth, screenHeight = guiGetScreenSize() local myScreenSource = dxCreateScreenSource(screenWidth, screenHeight) local root = getRootElement() local rote = 0 local musica = true local Tipo = nil local pLife = {} local AlphaAB = 0 function pLife.iniciarLoadingScreen() PlayMusicLoandig = playSound("olds/sound/music.mp3", true) Tipo = "Play" setSoundVolume(PlayMusicLoandig,1.0) showCursor(true) showChat(false) addEventHandler("onClientRender", root, pLife.MenuDxLoad) end addEventHandler("onClientResourceStart", resourceRoot, pLife.iniciarLoadingScreen) function pLife.fimLoandingScreen() if isTransferBoxActive() == true then setTimer(pLife.fimLoandingScreen, 2000, 1) else removeEventHandler("onClientRender", root, pLife.MenuDxLoad) destroyElement(PlayMusicLoandig) showCursor(false) showChat(true) musica = false end end setTimer(pLife.fimLoandingScreen, 2000, 1) pLife = {} pLife["img"] = 1 pLife["timer"] = setTimer(function() pLife["img"] = 1 and 2 end, 40000, 0) function pLife.MenuDxLoad() rote = rote +12/8 local seconds = getTickCount() / 6000 local scale = math.sin(seconds) * 1 local seconds2 = getTickCount() / 4000 local scale2 = math.sin(seconds2) * 1 local rotation2 = 0 local AnimStouro = getSoundFFTData(PlayMusicLoandig, 2048, 2) for i,v in pairs(AnimStouro) do rotation1 = math.round((v*530),0) rotation2 = math.round((v*430),0) + 7 end AlphaAB = AlphaAB + 0.4 if AlphaAB >= 255 then AlphaAB = 255 end dxDrawImage(x*0, y*0, x*1366, y*768, "olds/images/bg.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawImage(x*0, y*0, x*1366, y*768, "olds/images/lights.png", 0, 0, 0, tocolor(255, 255, 255, 0*rotation1+rotation2), false) dxDrawImage(x*630/scale, y*280, x*94, y*160, "olds/images/logo.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawImage(x*580, y*240/scale, x*117, y*90, "olds/images/coroa.png", 330, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawImage(x*30, y*205, x*17, y*34, "olds/images/pausa.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawImage(x*72, y*205, x*32, y*34, "olds/images/play.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) if Tipo == "Pausa" then dxDrawImage(x*30, y*205, x*17, y*34, "olds/images/pausa.png", 0, 0, 0, tocolor(0, 111, 255, 255), false) elseif Tipo == "Play" then dxDrawImage(x*72, y*205, x*32, y*34, "olds/images/play.png", 0, 0, 0, tocolor(0, 111, 255, 255), false) end dxDrawImage(x*-24/scale2, y*163, x*441, y*636, "olds/images/"..pLife["img"]..".png", 0, 0, 0, tocolor(255, 255, 255, AlphaAB), false) dxDrawImage(x*623, y*627, x*100, y*100, "olds/images/load.png", rote, 0, 0, tocolor(255, 255, 255, 255), false) end addEventHandler('onClientClick', root, function(button, state, _, _, _, _, _, element) if button == 'left' and state == 'down' and musica then if cursorPosition(x*30, y*205, x*17, y*34) then setSoundPaused(PlayMusicLoandig, true) Tipo = "Pausa" elseif cursorPosition(x*72, y*205, x*32, y*34) then setSoundPaused(PlayMusicLoandig, false) Tipo = "Play" end end end) function pLife.OnStop () setPlayerHudComponentVisible("armour", true) setPlayerHudComponentVisible("wanted", true) setPlayerHudComponentVisible("weapon", true) setPlayerHudComponentVisible("money", true) setPlayerHudComponentVisible("health", true) setPlayerHudComponentVisible("clock", true) setPlayerHudComponentVisible("breath", true) setPlayerHudComponentVisible("ammo", true) setPlayerHudComponentVisible("radar", true) end addEventHandler("onClientResourceStop", getResourceRootElement(getThisResource()), pLife.OnStop) function pLife.OnStart () setPlayerHudComponentVisible("armour", false) setPlayerHudComponentVisible("wanted", false) setPlayerHudComponentVisible("weapon", false) setPlayerHudComponentVisible("money", false) setPlayerHudComponentVisible("health", false) setPlayerHudComponentVisible("clock", false) setPlayerHudComponentVisible("breath", false) setPlayerHudComponentVisible("ammo", false) setPlayerHudComponentVisible("radar", false) end addEventHandler( "onClientResourceStart", getResourceRootElement(getThisResource()), pLife.OnStart ) --Shared function cursorPosition(x, y, width, height) if(not isCursorShowing()) then return false end local sx, sy = guiGetScreenSize() local cx, cy = getCursorPosition() local cx, cy =(cx*sx),(cy*sy) if(cx >= x and cx <= x + width) and(cy >= y and cy <= y + height) then return true else return false end end function math.round(number, decimals, method) decimals = decimals or 0 local factor = 10 ^ decimals if(method == "ceil" or method == "floor") then return math[method](number * factor) / factor else return tonumber(("%."..decimals.."f"):format(number)) end end -- META <meta> <script src="loadC.lua" type="client"/> <script src="loadG.lua" type="shared"/> <file src="olds/images/1.png"/> <file src="olds/images/2.png"/> <file src="olds/images/bg.png"/> <file src="olds/images/load.png"/> <file src="olds/images/logo.png"/> <file src="olds/images/pausa.png"/> <file src="olds/images/play.png"/> <file src="olds/images/coroa.png"/> <file src="olds/images/lights.png"/> <file src="olds/sound/music.mp3"/> <download_priority_group>1</download_priority_group> </meta>
  3. Olá pessoas, eu estava querendo fazer um marcador com uma imagem 3d que fica no chão. porem não sei oque fazer, poderiam me ajudar?
  4. Cara muito obrigado mesmo! Mudei os parametros de acordo como vc disse e funcionou perfeita mente - Client addEventHandler( "onClientResourceStart", resourceRoot, function () sound = playSound("scary.mp3") setSoundVolume(sound, 1) end ) function stopSoundonLogin() if isElement(sound) then stopSound(sound) end end addEvent("stop", true) addEventHandler("stop", root, stopSoundonLogin ) - Server addEventHandler ("onPlayerLogin", root, function() triggerClientEvent (source, "stop", source) end) Bom domingo para você.
  5. Tentei mudar alguns paramentros baseado no que vc disse e mesmo assim não para - Client addEventHandler( "onClientResourceStart", resourceRoot, function () sound = playSound("scary.mp3") setSoundVolume(sound, 1) end ) function stopSound() if isElement(sound) then stopSound(sound) end end addEvent("stop", true) addEventHandler("stop", root, stopSound ) - Server addEventHandler ("onPlayerLogin", root, function() triggerClientEvent (source, "stopSound", source) ----- Tentei mudar para source, Stop, Source e tb nao foi end)
  6. Olá pessoa, bom estou com uma probleminha no Joinsound do painel de login em HTML que estou usando, estou começando agora na LUA ent não sou tão inteligente assim. O problema é que ele não está dando parar na música, creio eu que tenho que ter errado em alguma linha e gostaria de saber se poderia algume me ajudar ou concertando o codigo. - Client local sound addEventHandler( "onClientResourceStart", resourceRoot, function () sound = playSound("scary.mp3") setSoundVolume(sound, 1) end ) function stopSoundonLogin() if isElement(sound) then stopSound(sound) end end addEvent("stop", true) addEventHandler("stop", root, stopSoundonPlayerLogin) - Server function stopSoundOnLogin() triggerClientEvent(source,"stop",source) end addEventHandler("onPlayerLogin", root, stopSoundonPlayerLogin) Peguem leve comigo pois sou novo no Fórum então não sei se estou na linguagem certa ou cometi algum erro.
×
×
  • Create New...