DLmass Posted August 1, 2016 Share Posted August 1, 2016 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
Bonus Posted August 1, 2016 Share Posted August 1, 2016 Dunno what exactly the problem is. You didn't tell the bug. You should maybe use onClientResourceStart ... onClientPlayerJoin should be totally wrong here Link to comment
LabiVila Posted August 1, 2016 Share Posted August 1, 2016 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
qaisjp Posted August 1, 2016 Share Posted August 1, 2016 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
LabiVila Posted August 1, 2016 Share Posted August 1, 2016 I'm not telling anyone whether if onClientPlayerJoin is wrong or not. I'm just telling him how it works. Not up to me to decide which events to use, so instead of replying me whether it's right or wrong, post the solution Link to comment
DLmass Posted August 1, 2016 Author Share Posted August 1, 2016 qaisjp explained to me on IRC what it does and does not. Thanks again mate! I've replaced onClientPlayerJoin with onClientResourceStart which made it work. Link to comment
qaisjp Posted August 1, 2016 Share Posted August 1, 2016 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
LabiVila Posted August 1, 2016 Share Posted August 1, 2016 If you count "onClientPlayerJoin should be totally wrong here", font-sized and quoted as a detailed explanation, then I agree I'm wrong. Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now