Jump to content

playSound


Tox

Recommended Posts

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) 
  

Link to comment

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) 
Link to comment
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

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