Jump to content

no funciona :/


iFoReX

Recommended Posts

porque no funciona en este script pero en el otro script si funciona ... :/ aqui el script :

function startMusic() 
    setRadioChannel(0) 
    song = playSound("http://87.98.227.96:9992/",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) 
addEventHandler("onClientPlayerRadioSwitch",getRootElement(),makeRadioStayOff) 
addEventHandler("onClientPlayerVehicleEnter",getRootElement(),makeRadioStayOff) 
addCommandHandler("music",toggleSong) 
bindKey("m","down","music") 

Link to comment

si suena probe con otro script que habia echo y si suena... mira en este script :

--------------------- 
---Script Echo por ElMota----- 
--------------------- 
  
  
addEvent("triggear",true) 
addEventHandler("triggear",root, 
function(cancion,nombre) 
    setRadioChannel(0) 
    stopSound(song) 
    setTimer(function() song = playSound(cancion,true) end,2000,1) 
    outputChatBox(" #48FF00##2E2E2EReproduciendo : #48FF00##2E2E2E"..nombre,0,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 
addCommandHandler("music",toggleSong) 

addCommandHandler("play",function(playerSource,commandName,cancion,nombre) 
for k,v in ipairs(getElementsByType"player") do 
accountname = getAccountName (getPlayerAccount(v)) 
if isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "Admin" ) ) then 
triggerClientEvent("triggear",playerSource,cancion,nombre) 
end 
end 
end 
) 
  

Link to comment
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...