* Add guiReady state * Add mouseCameraEnabled state * Make sure GUI is ready on some things * Fix wrong veh prop funcs being used clientside * Add local player ped parts/props util for IV * Add vehicle.lightStatus sync * Add element interior sync * Dont use interior on IV * Use new class structure * Set default anim offset to 1 * Set biz data to save when changing biz properties * Add mouse cam state util * Prefix item type admin cmds with "itemtype" * Fix server config saving * Fix server time setting hour to minute arg * Add player returnTo data types * Make veh rent/buy price numbers readable * Fix wrong house index being used to create blip/pickup on create * Don't cache player hotbar items if working * Fix cache player hotbar items util * Add lots of anims to GTA SA * Try/catch on all data saving to prevent one from blocking the rest * Fix readable time from showing AM for 12 PM (noon) * Set veh interior on create * Dont set engine for spawnlocked vehicles
60 lines
1.5 KiB
JavaScript
60 lines
1.5 KiB
JavaScript
// ===========================================================================
|
|
// Vortrex's Roleplay Resource
|
|
// https://github.com/VortrexFTW/gtac_roleplay
|
|
// ===========================================================================
|
|
// FILE: main.js
|
|
// DESC: Main client script (will be reorganized into individual files later)
|
|
// TYPE: Client (JavaScript)
|
|
// ===========================================================================
|
|
|
|
let inSphere = false;
|
|
let inVehicle = false;
|
|
let inVehicleSeat = false;
|
|
let isWalking = false;
|
|
let isSpawned = false;
|
|
|
|
let garbageCollectorInterval = null;
|
|
|
|
let parkedVehiclePosition = false;
|
|
let parkedVehicleHeading = false;
|
|
|
|
let renderHUD = true;
|
|
let renderLabels = true;
|
|
let renderLogo = true;
|
|
let renderSmallGameMessage = true;
|
|
let renderScoreBoard = true;
|
|
let renderHotBar = true;
|
|
let renderItemActionDelay = true;
|
|
let renderInteriorLights = true;
|
|
|
|
let logLevel = LOG_INFO;
|
|
|
|
let weaponDamageEnabled = {};
|
|
let weaponDamageEvent = {};
|
|
|
|
let forceWeapon = 0;
|
|
let forceWeaponAmmo = 0;
|
|
let forceWeaponClipAmmo = 0;
|
|
|
|
let drunkEffectAmount = 0;
|
|
let drunkEffectDurationTimer = null;
|
|
|
|
let controlsEnabled = true;
|
|
|
|
let streamingRadio = null;
|
|
let streamingRadioVolume = 50;
|
|
let streamingRadioElement = false;
|
|
|
|
let enterPropertyKey = null;
|
|
|
|
let inAnimation = false;
|
|
let forcedAnimation = null;
|
|
|
|
let calledDeathEvent = false;
|
|
|
|
let interiorLightsEnabled = true;
|
|
let interiorLightsColour = toColour(0, 0, 0, 150);
|
|
|
|
let mouseCameraEnabled = false
|
|
|
|
// ===========================================================================
|