Lloyd Logan Posted February 17, 2013 Posted February 17, 2013 Hey, why isn't this setting the camera on the player? --CLIENT function showGUIf() guiSetVisible(GUIEditor.window[1], false) guiSetVisible(btn1, false) showCursor(false) triggerServerEvent("setT", getLocalPlayer()) end addEvent("stopj", true) addEventHandler("stopj", root, showGUIf) --SERVER function setTT(thePlayer) setElementPosition(thePlayer, 375.8310546875, -65.7509765625, 1001.507812) setCameraTarget(thePlayer) end addEvent("setT", true) addEventHandler("setT", getRootElement(), setTT) If you need an Intermediate scripter feel free to PM me as I will accept "almost" any job, STATUS: UNAVAILABLE SCOTLAND, my hometown, and the Home of GTA!
PaiN^ Posted February 17, 2013 Posted February 17, 2013 if ( btn1 ) is inside the window, Then there's no need to set it visibility . It'll change with the windows visibility ^^ + --> server function setTT () setElementPosition(source, 375.8310546875, -65.7509765625, 1001.507812) setCameraTarget(source, source) end addEvent("setT", true) addEventHandler("setT", getRootElement(), setTT) " Keep Thinking Different . " - Steve Jops -------------------- Don't send me PMs asking for help, I Won't reply !
Moderators IIYAMA Posted February 17, 2013 Moderators Posted February 17, 2013 Hey, why isn't this setting the camera on the player?--CLIENT function showGUIf() guiSetVisible(GUIEditor.window[1], false) guiSetVisible(btn1, false) showCursor(false) triggerServerEvent("setT", getLocalPlayer()) end addEvent("stopj", true) addEventHandler("stopj", root, showGUIf) --SERVER function setTT(thePlayer) setElementPosition(source, 375.8310546875, -65.7509765625, 1001.507812) setCameraTarget(source,source) if thePlayer then outputChatBox("IIYAMA is wrong") end end addEvent("setT", true) addEventHandler("setT", getRootElement(), setTT) triggerServerEvent("setT", getLocalPlayer()) -- 2 arguments = correct trigger, source, thePlayer) @X~|Mr.ALM damn you was 1 second before me.... Do you want to improve your Lua programming skills and make less mistakes? Start with Lua Language Server! Useful functions 3x Spoiler checkPassiveTimer getScreenStartPositionFromBox getPedGender Tutorials 4x Spoiler Scaling DX Events Attach an addEventHandler on a group of elements Debugging
Lloyd Logan Posted February 17, 2013 Author Posted February 17, 2013 Thanks guys, I managed to fix it myself as the argument was wrong client side! If you need an Intermediate scripter feel free to PM me as I will accept "almost" any job, STATUS: UNAVAILABLE SCOTLAND, my hometown, and the Home of GTA!
PaiN^ Posted February 17, 2013 Posted February 17, 2013 You're welcome " Keep Thinking Different . " - Steve Jops -------------------- Don't send me PMs asking for help, I Won't reply !
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