SrSampaio32112321 Posted May 6, 2019 Share Posted May 6, 2019 Estou tendo problemas com um script, quando uso ele simplesmente aparece "Bad argument @ 'bindkey' [Expected player at argument 1, got nil] , eis ai o script function startMusic() setRadioChannel(0) song = playSound("musica.mp3",true) outputChatBox("Para ativar/desativar a música pressione m", 255, 0, 0, true ) end function toggleSong() if not songOff then setSoundVolume(song,0) songOff = true removeEventHandler("onClientPlayerRadioSwitch",getRootElement(),makeRadioStayOff) else setSoundVolume(song,1) songOff = false setRadioChannel(0) addEventHandler("onClientPlayerRadioSwitch",getRootElement(),makeRadioStayOff) end end addEventHandler("onClientResourceStart",getResourceRootElement(getThisResource()),startMusic) addCommandHandler("music",toggleSong) bindKey(player,"m","down","music") Link to comment
Moderators Patrick Posted May 6, 2019 Moderators Share Posted May 6, 2019 (edited) bindKey(player,"m","down","music") replace to: bindKey("m","down","music") (And run this script on client side.) Edited May 6, 2019 by stPatrick 1 Link to comment
SrSampaio32112321 Posted May 6, 2019 Author Share Posted May 6, 2019 (edited) Ah você disse O Que Eu Já fiz e funcionou, tinha Só que tirar o jogador e botar pro Lado do Cliente mas Muito obrigado por Ajudar ?"> ?"> Edited May 6, 2019 by MrShadows 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