Xabachee Posted March 13, 2015 Share Posted March 13, 2015 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
DNL291 Posted March 13, 2015 Share Posted March 13, 2015 playSound and setSoundVolume are client-side functions only. Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now