Jump to content

Join/Quit Doorbell


Xabachee

Recommended Posts

This does not play sound on player join/quit. These are basic windows sound files that do play and are in place. Ideas?

[2015-03-13 11:17:23] ERROR: [gta3sa]\wizardinit\server.lua:9: attempt to call global 'playSound' (a nil value)

[2015-03-13 11:17:39] ERROR: [gta3sa]\wizardinit\server.lua:3: attempt to call global 'playSound' (a nil value)

Serverside

addEventHandler('onPlayerJoin',getRootElement(), 
function() 
    local sound = playSound("join.mp3") --Play wasted.mp3 from the sounds folder 
    setSoundVolume(sound, 1) -- set the sound volume to 50% 
end 
) 
addEventHandler('onPlayerQuit',getRootElement(), 
function(reason) 
    local sound = playSound("part.wav") --Play wasted.mp3 from the sounds folder 
    setSoundVolume(sound, 1) -- set the sound volume to 50% 
end 
) 

<meta> 
<script src="client.lua" type="client" /> 
<script src="server.lua" /> 
<file src="join.mp3"></file> 
<file src="part.wav"></file> 
</meta> 

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