Jump to content

Excuse me Where problems


-ffn-python

Recommended Posts

                 
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 
        ) 

Edited by Guest
Link to comment

Nothing you didn't defined screenH and screenW lol

  
local screenH,screenW = guiGetScreenSize()   
               
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 
        ) 

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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