Jump to content

Please help me


Sendy

Recommended Posts

It would basically be something like this:

addEventHandler ( "onClientMinimize", root, function ( ) 
    outputChatBox ( "Game minimized" ) 
end ) 
  
addEventHandler ( "onClientRestore", root, function ( ) 
    outputChatBox ( "Game Restored" ) 
end ) 

Link to comment
It would basically be something like this:
addEventHandler ( "onClientMinimize", root, function ( ) 
    outputChatBox ( "Game minimized" ) 
end ) 
  
addEventHandler ( "onClientRestore", root, function ( ) 
    outputChatBox ( "Game Restored" ) 
end ) 

and a function? the function name (...) or it is already a script?

Link to comment

You don't name functions when you define it inside of addEventHandler

I explained that terribly but here's an example

function yo ( ) 
outputChatBox ( "yo" ) 
end 
addEventHandler ( "onClientRestore", root, yo ) 

addEventHandler ( "onClientRestore", root, function ( ) outputChatBox ( "yo" ) end ) 

Both would work, both would have the same result, but the second function cannot be called again later in the script.

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