Jump to content

onClientPlayerJoin<showChat


فاّرس

Recommended Posts

Posted

Hello,

i have problem in me code :

addEventHandler("onClientPlayerJoin",root, 
isChatVisible = true 
setTimer(function() 
    if isChatVisible then 
        showChat ( false ) 
        isChatVisible = false 
    end 
end,1000,1)) 

not work !

Sha67 سابقاً

Posted

Where is the function for the event handler ?!!

" Keep Thinking Different . " - Steve Jops

--------------------

Don't send me PMs asking for help, I Won't reply !

Posted

The first thing after the root is a var, Tha's worng !

And i don't think you can put the function inside a timer in that way, Should look like this ( Ex ) :

addEventHandler ( 'onPlayerJoin', root, 
    function ( ) 
        setTimer ( function ( ) 
            ... 
  

" Keep Thinking Different . " - Steve Jops

--------------------

Don't send me PMs asking for help, I Won't reply !

Posted
The first thing after the root is a var, Tha's worng !

And i don't think you can put the function inside a timer in that way, Should look like this ( Ex ) :

addEventHandler ( 'onPlayerJoin', root, 
    function ( ) 
        setTimer ( function ( ) 
            ... 
  

didn't work,

addEventHandler ( 'onPlayerJoin', root, 
isChatVisible = true 
    function ( ) 
        setTimer ( function ( ) 
            if isChatVisible then 
        showChat ( source,false ) 
        isChatVisible = false 
    end 
end,1000,1)) 

or

addEventHandler ( 'onPlayerJoin', root, 
isChatVisible = true 
    function ( ) 
        setTimer ( function ( ) 
            if isChatVisible then 
        showChat ( source,false ) 
        isChatVisible = false 
    end 
end 
end,1000,1)) 

Sha67 سابقاً

Posted

I said ( Ex ) ._."

What are you trying to do ?

" Keep Thinking Different . " - Steve Jops

--------------------

Don't send me PMs asking for help, I Won't reply !

Posted
isChatVisible = true 
addEventHandler("onClientResourceStart",resourceRoot,  
function( ) 
setTimer( 
    function( ) 
    if ( isChatVisible ) then 
        showChat ( false ) 
        isChatVisible = not isChatVisible 
        end 
    end,1000,1) 
end 
) 

  

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