Jump to content

onPlayerClientJoin


DLmass

Recommended Posts

I have some issues with this. No idea if it's a bug or not. Will someone let me know?

  
function checkTransferBox() 
    if not isTransferBoxActive() then 
        outputDebugString("Not visible, proceed") 
    else 
        setTimer(checkTransferBox, 2000, 1) 
        outputDebugString("Still visible, do not proceed") 
    end 
end 
addEventHandler("onClientPlayerJoin", root, checkTransferBox) 
  

Link to comment

Try this one:

  
addEventHandler ("onClientPlayerJoin", root, 
     function () 
          setTimer (checkTimer, 2000, 1) 
     end 
) 
  
function checkTimer () 
    if not isTransferBoxActive() then 
        outputDebugString("Not visible, proceed") 
    else 
        setTimer(checkTransferBox, 2000, 1) 
        outputDebugString("Still visible, do not proceed") 
    end 
end 
  

Link to comment
Try this one:
  
addEventHandler ("onClientPlayerJoin", root, 
     function () 
          setTimer (checkTimer, 2000, 1) 
     end 
) 
  
function checkTimer () 
    if not isTransferBoxActive() then 
        outputDebugString("Not visible, proceed") 
    else 
        setTimer(checkTransferBox, 2000, 1) 
        outputDebugString("Still visible, do not proceed") 
    end 
end 
  

onClientPlayerJoin should be totally wrong here
Link to comment
post the solution

No. That's not what people on this subforum should be doing.

We've been saying this for six damn years - providing the solution directly achieves nothing. The person asking the question will simply carry on asking questions and won't learn anything because they've been spoon fed everything.

Help people come to their own solution by teaching them what's right, what's wrong, and what they need to do next.

Sure, if you want to post the solution, feel free. But you better damn well explain what you've done.

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