Jump to content

[HELP] Sound on click.


Recommended Posts

You should try using the onClientClick with an if on the coords.

Note: use this if you arent using Gui, as Gui functions would be ALOT easier.

  
function Clicked(button,state,absoluteX,absoluteY) 
local x, y = guiGetScreenSize() 
if button == left then 
if state == down then 
if absoluteX == x/5.2 or absoluteX == x/5.1 then -- On wich part of the screen? right to left 
if absoluteY == y/5.2 or abosulteY == y/5.1 then -- On wich part of the screen? down to up 
DoShit -- Whatever you want on click 
end 
end 
end 
end 
end 
addEventHanlder("OnClientClick", getRootElement(), Clicked) 
  

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...