Skip to content

Instantly share code, notes, and snippets.

import { Player, on, setTimeout, onServer, log, clearTimeout, emit, emitServer } from 'alt-client';
import game from 'natives';
onServer("Bus:From:Airport", async (vehicle) => {
const driverStart = {
x: -1016.289,
y: -2759.372,
z: 14.165,
model: 's_m_y_airworker',
heading: 45.0,
// https://gist.github.com/FDiskas/3dd4163d23bbdb77b54852b8cfb71720
export const enum NativeKey {
InputNextCamera = 0, // V
InputLookLr = 1, // MOUSE RIGHT
InputLookUd = 2, // MOUSE DOWN
InputLookUpOnly = 3, // (NONE)
InputLookDownOnly = 4, // MOUSE DOWN
InputLookLeftOnly = 5, // (NONE)
InputLookRightOnly = 6, // MOUSE RIGHT
InputCinematicSlowmo = 7, // (NONE)
@1stFabOne
1stFabOne / client.js
Created December 13, 2022 16:15 — forked from xxshady/client.js
alt:V player look sync
import alt from "alt-client"
import native from "natives"
const localPlayer = alt.Player.local
const SYNC_MS_DELAY = 500
const SYNC_MS_DELAY_REMOTE = 100
const MAX_HEADING_DIST = 70.0
const BACKWARDS_HEADING_DIST = 145.0
const TASK_LOOK_AT_COORD_DURATION = 300
const LOOKING_AT_POS_OFFSET = 5.0
@1stFabOne
1stFabOne / cutscenes.txt
Created December 7, 2022 02:18 — forked from JeremyEspresso/cutscenes.txt
All cutscene names GTAV - RAGE:MP - Jer
ALL CUTSCENE NAMES GTAV - RAGE:MP - Jer - 22/07/2020
Game Version: 1868
abigail_mcs_1_concat
abigail_mcs_2
ac_ig_3_p3_b(1)
ac_ig_3_p3_b(2)
ac_ig_3_p3_b
ah_1_ext_t6(1)
const getDistance = (vector1, vector2) => {
return Math.sqrt(Math.pow(vector1.x - vector2.x, 2) + Math.pow(vector1.y - vector2.y, 2) + Math.pow(vector1.z - vector2.z, 2));
}
alt.on('keydown', (key) => {
if (key == 'G'.charCodeAt(0)) {
const playerPed = alt.Player.local.scriptID;
if (!native.isPedSittingInAnyVehicle(playerPed)) {
const coords = native.getEntityCoords(playerPed);
const offset = native.getOffsetFromEntityInWorldCoords(playerPed, 0.0, 1.0, 0.0);
@1stFabOne
1stFabOne / airport.ts
Created December 1, 2022 23:15
Alt:V Airport cutscene you can't just copy and paste this code. would be nice if you spend me a ko-fi :P https://ko-fi.com/mempler
const playFieldCoord = { x: -1212.79, y: -1673.52, z: 7 };
const airportCoord = { x: -1466.79, y: -2507.52, z: 0 };
export const Execute = async (extra: any[]) => {
const ped: Ped = Ped.GetPlayerPed(alt.Player.local);
native.prepareMusicEvent('GLOBAL_KILL_MUSIC');
native.prepareMusicEvent('FM_INTRO_START');
const TATTOO_GROUPS = {
mpairraces_overlays: [
{
name: 'Turbulence',
male: 'MP_Airraces_Tattoo_000_M',
female: 'MP_Airraces_Tattoo_000_F',
zone: 'ZONE_TORSO'
},
{
name: 'Pilot Skull',