Santiago1224 Posted April 15, 2017 Share Posted April 15, 2017 Bueno, a lo mejor éste post no vaya aquí pero necesito su ayuda, lo que quiero lograr es que cuando un jugador admin entre a mi servidor suene alguna música, lo que busco es que cuando me logee al servidor suene una música que yo elija, que cuando me logee con la cuenta de admin (mía) suene una canción. Well, maybe this post does not go here but I need your help, what I want to achieve is that when an admin player enters my server, some music sounds, what I'm looking for is that when I logee to the server it sounds a music that I choose, That when I login with the admin account (mine) a song sounds. Link to comment
#Dv^ Posted April 15, 2017 Share Posted April 15, 2017 (edited) --Server addEventHandler("onPlayerLogin", root, function() local account = getAccountName(getPlayerAccount(source)) if isObjectInACLGroup("user."..account, aclGetGroup("Admin")) then triggerClientEvent(source, "playMusic_Admin", source) else triggerClientEvent(source, "playMusic_Player", source) end end ) --Client addEvent("playMusic_Admin", true) addEventHandler("playMusic_Admin", root, function() playSound("audio.mp3") end ) addEvent("playMusic_Player", true) addEventHandler("playMusic_Player", root, function() playSound("audio.mp3") end ) Edited April 15, 2017 by #Dv^ 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