StreetSaintz Posted November 10, 2014 Posted November 10, 2014 Hey guys, i have this script it works with quit and when i change my nick but it doesn't do anything when a player joins the server: part of the code: local joinSoundBlock = true addEvent("onPlayerJoinFlag", true) addEventHandler("onPlayerJoinFlag", getRootElement(), function(thePlayer, thecountry) AddingS("join", getPlayerName(thePlayer).."#FFFFFF Oyuna girdi #FF4000[#ffffff"..thecountry.."#FF4000]") if(joinSoundBlock)then local sound = playSound("joinSound.mp3") setSoundVolume(sound, 0.2) joinSoundBlock = false setTimer(function() joinSoundBlock = true end, 30000, 1) end end )
roddydennvor Posted November 10, 2014 Posted November 10, 2014 Simply ... Just try this This is client-side -Sound.lua addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), function() setTimer(function() playSound("music.mp3") end, 2000, 1) end ) -meta.xml Just change music.mp3 with your file's name...
StreetSaintz Posted November 10, 2014 Author Posted November 10, 2014 it not about the music it doesn't show up that a player joined the server
ViRuZGamiing Posted November 10, 2014 Posted November 10, 2014 Errors on /debugscript 3? Perhaps try using addEventHandler("onClientPlayerJoin", root, functionName)
TAPL Posted November 10, 2014 Posted November 10, 2014 Post the server side and the debug errors, if any.
StreetSaintz Posted November 10, 2014 Author Posted November 10, 2014 i've already fixed it guys and thanks for helping me out, i really appreciate it!
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