Jump to content

playSound


Tox

Recommended Posts

Posted

I got 0 errors on debugscript mode 3. I also checked if triggerClientEvent works as you can see on line 4 of the Server-side. I don't see what is the problem. Hope you can help me...

Client-side:

addEventHandler ("onClientResourceStart", getResourceRootElement(getThisResource()), function () 
function leaveSound() 
playSound ("sounds/goodbye.mp3") 
end 
addEvent ("onLeaveEvent", true) 
addEventHandler ("onLeaveEvent", localPlayer, leaveSound) 
end) 

Server-side:

function onLeave (playerSource) 
setPlayerTeam (playerSource, nil) 
triggerClientEvent("onLeaveEvent", playerSource) 
outputChatBox ("bok") 
end 
addCommandHandler ("leave", onLeave) 
  

Posted

addEvent ("onLeaveEvent", true) 
addEventHandler ("onLeaveEvent", localPlayer, 
function () 
playSound ("sounds/goodbye.mp3") 
end) 

"A Year from Now You May Wish You Had Started Today"

Posted
addEvent ("onLeaveEvent", true) 
addEventHandler ("onLeaveEvent", localPlayer, 
function () 
playSound ("sounds/goodbye.mp3") 
end) 

Sorry but doesn't work..

Posted

function onLeave (playerSource) 
setPlayerTeam (playerSource, nil) 
triggerClientEvent(playerSource,"onLeaveEvent", playerSource) 
outputChatBox ("bok") 
end 
addCommandHandler ("leave", onLeave) 
  

addEvent ("onLeaveEvent", true) 
addEventHandler ("onLeaveEvent", localPlayer, 
function () 
playSound ("sounds/goodbye.mp3") 
end) 

"A Year from Now You May Wish You Had Started Today"

Posted
function onLeave (playerSource) 
setPlayerTeam (playerSource, nil) 
triggerClientEvent(playerSource,"onLeaveEvent", playerSource) 
outputChatBox ("bok") 
end 
addCommandHandler ("leave", onLeave) 
  

addEvent ("onLeaveEvent", true) 
addEventHandler ("onLeaveEvent", localPlayer, 
function () 
playSound ("sounds/goodbye.mp3") 
end) 

6305incii6263708.png

Posted
addEvent("onLeaveEvent", true) 
addEventHandler("onLeaveEvent", root, 
    function() 
        playSound("sounds/goodbye.mp3") 
    end 
) 

Do you require a paid scripter? Contact me! (Unavailable) Currently I am experienced in Lua, PHP, HTML, CSS, SQL and JS.

Developer and owner of

https://projectbea.st - Project Beast
Posted
meta.xml ??

OK. Yeah, it was a foolish thing not to add on meta.xml. Sorry you all... And thank you.

Posted
meta.xml ??

OK. Yeah, it was a foolish thing not to add on meta.xml. Sorry you all... And thank you.

You are welcome.

"A Year from Now You May Wish You Had Started Today"

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...