#Patow Posted January 16, 2019 Share Posted January 16, 2019 Hi, i have this script: var loginBrowser = mp.browsers.new('package://Login/login.html'); var activeCam = true; let sceneryCamera = mp.cameras.new('default', new mp.Vector3(-485, 1095.75, 323.85), new mp.Vector3(0,0,0), 40); sceneryCamera.pointAtCoord(402.8664, -996.4108, -98.5); //Changes the rotation of the camera to point towards a location sceneryCamera.setActive(activeCam); mp.game.cam.renderScriptCams(activeCam, false, 0, true, false); mp.events.add('loginInformationToServer', (usuario, contraseña) => { activeCam = false; mp.events.callRemote('OnPlayerLoginAttempt', usuario, contraseña); }); I need, after the player logued in the server the camera back to the player again. loginInformationToServer is called when the player logged in. Thanks! Link to comment Share on other sites More sharing options...
Captien Posted January 16, 2019 Share Posted January 16, 2019 2 hours ago, #Patow said: mp.events.add('loginInformationToServer', (usuario, contraseña) => { activeCam = false; mp.events.callRemote('OnPlayerLoginAttempt', usuario, contraseña); }); mp.events.add('loginInformationToServer', (usuario, contraseña) => { activeCam = false; if (sceneryCamera !== null) sceneryCamera.setActive(activeCam); mp.game.cam.renderScriptCams(false, true, 2000, true, false); mp.events.callRemote('OnPlayerLoginAttempt', usuario, contraseña); }); Takes 2 transition to return back to your player. 1 Link to comment Share on other sites More sharing options...
#Patow Posted January 28, 2019 Author Share Posted January 28, 2019 On 1/16/2019 at 5:52 PM, Captien said: mp.events.add('loginInformationToServer', (usuario, contraseña) => { activeCam = false; if (sceneryCamera !== null) sceneryCamera.setActive(activeCam); mp.game.cam.renderScriptCams(false, true, 2000, true, false); mp.events.callRemote('OnPlayerLoginAttempt', usuario, contraseña); }); Takes 2 transition to return back to your player. Thanks brother but still not working for me. Now the camera dont move from spawn place. Link to comment Share on other sites More sharing options...
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