1LoL1 Posted October 7, 2015 Share Posted October 7, 2015 Hello i have this code and how i can when player join this will false. Please can anyone help me? function GUI() local Alpha = guiGetVisible(v) and guiGetVisible(b) guiSetVisible(v, not Alpha) guiSetVisible(b, not Alpha) end bindKey("F6","down",GUI) If this so this not work function test () guiSetVisible(v, false) guiSetVisible(b, false) end addEventHandler("onPlayerJoin", getRootElement(), test) Link to comment
xeon17 Posted October 7, 2015 Share Posted October 7, 2015 You're using server side events and client side functions together and that will never work. Use onClientResourceStart instead. Link to comment
1LoL1 Posted October 7, 2015 Author Share Posted October 7, 2015 You're using server side events and client side functions together and that will never work.Use onClientResourceStart instead. Working thanks. And when i want to "onPlayerJoin" ? this not work function test () guiSetVisible(v, false) guiSetVisible(b, false) end addEventHandler("onPlayerJoin", getRootElement(), test) Link to comment
xeon17 Posted October 7, 2015 Share Posted October 7, 2015 You're using server side events and client side functions together and that will never work.Use onClientResourceStart instead. Working thanks. And when i want to "onPlayerJoin" ? this not work function test () guiSetVisible(v, false) guiSetVisible(b, false) end addEventHandler("onPlayerJoin", getRootElement(), test) You're using server side events and client side functions together and that will never work. Link to comment
1LoL1 Posted October 7, 2015 Author Share Posted October 7, 2015 You're using server side events and client side functions together and that will never work.Use onClientResourceStart instead. Working thanks. And when i want to "onPlayerJoin" ? this not work function test () guiSetVisible(v, false) guiSetVisible(b, false) end addEventHandler("onPlayerJoin", getRootElement(), test) You're using server side events and client side functions together and that will never work. So i must use Trigger? Link to comment
1LoL1 Posted October 7, 2015 Author Share Posted October 7, 2015 onClientPlayerJoin and why this not work? 0 errors 0 warnings function test () guiSetVisible(b, false) guiSetVisible(c, false) end addEventHandler("onClientPlayerJoin", getRootElement(), test) Link to comment
xeon17 Posted October 7, 2015 Share Posted October 7, 2015 Show me how b and c are defined. Link to comment
1LoL1 Posted October 7, 2015 Author Share Posted October 7, 2015 Show me how b and c are defined. b = guiCreateStaticImage( 5, 5, sWidth , 40, "image.png", false ) c = guiCreateLabel(8, 5, 2000, 15,"", false) Link to comment
1LoL1 Posted October 7, 2015 Author Share Posted October 7, 2015 ok my problem is solved i fixed. 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