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")