Skip to content

Instantly share code, notes, and snippets.

View Yiin's full-sized avatar
💭
https://twitch.tv/yiin__

Yiin

💭
https://twitch.tv/yiin__
View GitHub Profile
@tomatenbaumful
tomatenbaumful / streetnodes.ts
Created October 8, 2023 13:30
Code for getting street nodes on alt:V
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!