Jump to content

setCameraTarget


Lloyd Logan

Recommended Posts

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) 

Link to comment

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) 

Link to comment
  • Moderators
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....

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