Skip to content

Instantly share code, notes, and snippets.

@Stuyk
Stuyk / cameraPedEdit.js
Last active May 26, 2021 16:47
Ped Edit Camera
import * as alt from 'alt';
import * as native from 'natives';
let cameraControlsInterval;
let camera;
let zpos = 0;
let fov = 90;
let startPosition;
let startCamPosition;
let timeBetweenAnimChecks = Date.now() + 100;
@Stuyk
Stuyk / timers.ts
Created July 19, 2021 14:28
Keep Track of Timers, Average Completion Time, and What is Turned On / Off
import * as alt from 'alt-client';
interface TimerInfo {
name?: string;
id: number;
ms: number;
}
const TIMER_CATEGORIES = {
SMALLEST: [0, 1],
@Stuyk
Stuyk / leaderboard.ts
Created July 21, 2021 13:41
alt:V Player List Snippet
import * as alt from 'alt-client';
import * as native from 'natives';
import { SYSTEM_EVENTS } from '../../shared/enums/system';
import { requestScaleForm, Scaleform } from '../utility/scaleform';
import { Timer } from '../utility/timers';
const SCALEFORM_NAME = 'mp_mm_card_freemode';
const MAX_PLAYERS = 16;
let index = 1;
@Stuyk
Stuyk / stylesheet.less
Last active March 3, 2022 05:05
Drag and Drop Inventory for alt:V
Vue.component('inventory', {
data: () => {
return {
inventory: [],
targetDrag: null,
hoveredItem: null,
targetTooltip: null,
mouseX: 0,
mouseY: 0
};
@Stuyk
Stuyk / heist.ts
Created September 19, 2021 19:11
Heist Job Example for Athena Framework
import * as alt from 'alt-server';
import { BlipController } from '../../client/systems/blip';
import { playerFuncs } from '../../server/extensions/Player';
import { InteractionController } from '../../server/systems/interaction';
import { Job } from '../../server/systems/job';
import { TextLabelController } from '../../server/systems/textlabel';
import { CurrencyTypes } from '../../shared/enums/currency';
import { SYSTEM_EVENTS } from '../../shared/enums/system';
import { ANIMATION_FLAGS } from '../../shared/flags/AnimationFlags';
@Stuyk
Stuyk / items.ts
Created July 13, 2022 12:49
O:RP Item List
import * as alt from 'alt';
export const ITEM_TEMPLATES = {
almondseeds: {
name: 'Almond Seeds',
key: 'almondseeds',
base: 'seeds',
icon: 'seeds',
props: {
model: 'prop_veg_grass_02_a'
@Stuyk
Stuyk / gdrive
Created July 19, 2022 00:19
Minecraft Backup Script with ./gdrive
# Run These In Order...
wget https://github.com/prasmussen/gdrive/releases/download/2.1.1/gdrive_2.1.1_linux_386.tar.gz
tar -xvf gdrive_2.1.1_linux_386.tar.gz
chmod +x ./gdrive
./gdrive about
@Stuyk
Stuyk / gist:76f8f31c1a08bd04afc88917f3aeb829
Created April 15, 2020 16:24
GTA:V Incorrect Hairstyle Names and Colors
export const maleHairNames = [
'Close Shave',
'Buzzcut',
'Faux Hawk',
'Shaved Sides Slicked Back',
'Raised Front Same Length',
'Col De Sacs and Long Back',
'Close Shave and Loose Mohawk',
'Ponytail',
'Corn Rows',
@Stuyk
Stuyk / gist:ed191dc92528a58765048ee72b8899fb
Created April 15, 2020 16:31
GTA:V Face Structure List
const StructureGroup: [
{
label: 'Nose Width',
key: 'nosewidth',
value: 0,
min: -1,
max: 1,
increment: 0.1,
id: 0
},
@Stuyk
Stuyk / gist:d134315df8ae55482d14c6c784aa6c08
Created April 15, 2020 16:36
GTA:V Ped Head Overlays
const pedHeadOverlays = [
{
label: 'Facial Hair',
key: 'facialhair',
value: 0,
min: 0,
max: 28,
increment: 1,
id: 1,
colorType: 1