Jump to content

Need help with this


Machine

Recommended Posts

hey i have created gui but theres something nor working in it

Client

addEventHandler("onClientGUIClick", root, 
    function ( ) 
        if ( source == GUIEditor_Button[2] ) then  
triggerServerEvent ( "lol", getLocalPlayer() )       
       

server

  
addEvent( "lol", true ) 
addEventHandler ( "lol", getRootElement(), song ) 
function lol ( song ) 
song = playSound3D("song.mp3", -471.60000610352, -547.79998779297, 24.39999961853, false) 
end 
  
  

Link to comment
  • Other Languages Moderators
hey i have created gui but theres something nor working in it

Client

addEventHandler("onClientGUIClick", root, 
    function ( ) 
        if ( source == GUIEditor_Button[2] ) then  
triggerServerEvent ( "lol", getLocalPlayer() )       
       

You forgot 'end' and ')'

server

  
addEvent( "lol", true ) 
addEventHandler ( "lol", getRootElement(), song ) 
function lol ( song ) 
song = playSound3D("song.mp3", -471.60000610352, -547.79998779297, 24.39999961853, false) 
end 
  
  

It's totally wrong.

Link to comment
addEventHandler("onClientGUIClick", guiRoot, 
    function ( ) 
        if ( source == GUIEditor_Button[2] ) then 
        song = playSound3D("song.mp3", -471.60000610352, -547.79998779297, 24.39999961853, false) 
        end 
    end 
,true) 
  

Link to comment

Try. I never tryed this way...

addEventHandler("onClientGUIClick", guiRoot, 
    function ( ) 
        if ( source == GUIEditor_Button[2] ) then 
        triggerEvent ( "playEvent", getRootElement()) 
        end 
    end 
,true) 
  
  
addEvent ( "playEvent", true ) 
function playEvent () 
    song = playSound3D("song.mp3", -471.60000610352, -547.79998779297, 24.39999961853, false) 
end 
addEventHandler ( "playEvent", getRootElement(), playEvent ) 

Edited by Guest
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...