GTA Connected

Scripting => Scripting Help => Topic started by: Jessie on August 06, 2024, 10:23:47 AM

Title: problem function
Post by: Jessie on August 06, 2024, 10:23:47 AM
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
Title: Re: problem function
Post by: Vortrex on November 29, 2024, 01:44:29 PM
Strange. The function does exist.