function RadioPlayerImage()
dxDrawImage(screenW * 0.3000, screenH * 0.1533, screenW * 0.1163, screenH * 0.0467, "off.png", 0, 0, 0, tocolor(255, 255, 255, 255), false)
end
function RadioPlayerImage2()
dxDrawImage(screenW * 0.3000, screenH * 0.1533, screenW * 0.1163, screenH * 0.0467, "images/on.png", 0, 0, 0, tocolor(255, 255, 255, 255), false)
end
addEventHandler("onClientClick", root,
function(Button2, state, x2, y2)
if Button2 == "left" and state == "down" then
if x2 >= screenW * 0.3000 and y2 >= screenH * 0.1533 and x2 <= screenW * 0.3000+screenW * 0.1163 and y2 <= screenH * 0.1533+screenH * 0.0467 then
removeEventHandler("onClientRender", root, RadioPlayerImage)
addEventHandler("onClientRender", root, RadioPlayerImage2)
sound = playSound("http://sh.mncdn.com:8092/listen.pls")
end
else if x2 >= screenW * 0.3000 and y2 >= screenH * 0.1533 and x2 <= screenW * 0.3000+screenW * 0.1163 and y2 <= screenH * 0.1533+screenH * 0.0467 then
stopSound( sound )
addEventHandler("onClientRender", root, RadioPlayerImage)
removeEventHandler("onClientRender", root, RadioPlayerImage2)
end
end
end
)