Jump to content

Musica login


Recommended Posts

tentei colocar para reproduzir o som no painel assim que o player entrar e dar stop quando logar, porem não esta reproduzindo

addEventHandler("onClientBrowserDocumentReady", browser,
    function ()
		fadeCamera(true)
		showCursor(true)
		sound = playSound("music.mp3",true)
		local username, password = loginFile("get")
		if not (username == "" or password == "") then
			executeBrowserJavascript(source, "document.getElementById('loginUser').value = '" .. username .. "'");
			executeBrowserJavascript(source, "document.getElementById('loginPass').value = '" .. password .. "'");
			executeBrowserJavascript(source, "document.getElementById('loginSave').checked = true");
		else
			executeBrowserJavascript(source, "document.getElementById('loginSave').checked = false");
		end
    end
)

addEvent("onClientPlayerLogin", true)
addEventHandler("onClientPlayerLogin", resourceRoot,
	function()
		if isTimer ( notification ) then killTimer ( notification ) end
		destroyElement(initBrowser)
		showCursor(false)
		stopSound(sound)		
	end
)

 

Link to comment
2 hours ago, Lord Henry said:

Já tentou deixar essa linha 5 fora da função? Solta no script.

sim , olhei no f8 tem esse erro BASS ERROR 2 in LoadMedia  path:D:\Games\mta\mods\deathmatch\resources\s-Login\Musica.mp3  3d:0  loop:1

lembrando que eu troquei o nome tanto do arquivo quanto no script pra Musica

Edited by HG Snuuk
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...