This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
setInterval(() => { | |
getVehicleNode(); //use a interval of your choice to send fresh nodes to the server | |
}, 250); | |
const MAX_SPEED = 40; // Max speed of the vehicle | |
const MIN_ANGLE_FULL_SPEED = 50; // Minimum angle at full speed | |
const MAX_ANGLE_STANDING_STILL = 180; // Maximum angle when standing still | |
export function getVehicleNode() { | |
const streamedVehicles = alt.Vehicle.streamedIn.filter(x => x.type === 1); //only synced vehicles, ignore parked ones! |