Main Menu

problem function

Started by Jessie, August 06, 2024, 10:23:47 AM

Previous topic - Next topic

Jessie

can anyone explain to me?

Console error:
TypeError: gta.setCameraLookAt is not a function

My code:
var cameraPosition = new Vec3(-1000.0, 191.5, 12.0);
var cameraLookAtPosition = new Vec3(-1000.0, 185.5, 11.5);
var jumpCut = true;

addEventHandler("OnPlayerJoined", (event, client) => {
    if (typeof gta !== 'undefined' && gta !== null) {
        gta.setCameraLookAt(cameraPosition, cameraLookAtPosition, jumpCut);
   
    }
});

Game Gta VC