Lots of changes and fixes
* 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
This commit is contained in:
@@ -334,8 +334,10 @@ function setLocalPlayerHeading(heading) {
|
||||
function setLocalPlayerInterior(interior) {
|
||||
logToConsole(LOG_DEBUG, `[VRR.Utilities] Setting interior to ${interior}`);
|
||||
if(getMultiplayerMod() == VRR_MPMOD_GTAC) {
|
||||
localPlayer.interior = interior;
|
||||
gta.cameraInterior = interior;
|
||||
if(!isGTAIV()) {
|
||||
localPlayer.interior = interior;
|
||||
gta.cameraInterior = interior;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -437,7 +439,7 @@ function clearSelfOwnedVehicles() {
|
||||
|
||||
function setMouseCameraState(state) {
|
||||
logToConsole(LOG_DEBUG, `[VRR.Utilities] ${(state)?"Enabled":"Disabled"} mouse camera`);
|
||||
mouseCameraEnabled = !mouseCameraEnabled;
|
||||
mouseCameraEnabled = state;
|
||||
SetStandardControlsEnabled(!mouseCameraEnabled);
|
||||
}
|
||||
|
||||
@@ -450,6 +452,13 @@ function toggleMouseCursor() {
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function toggleMouseCursor() {
|
||||
logToConsole(LOG_DEBUG, `[VRR.Utilities] ${(!gui.cursorEnabled)?"Enabled":"Disabled"} mouse cursor`);
|
||||
setMouseCameraState(!mouseCameraEnabled);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function setPlayerWeaponDamageEvent(clientName, eventType) {
|
||||
logToConsole(LOG_DEBUG, `[VRR.Utilities] Set ${clientName} damage event type to ${eventType}`);
|
||||
weaponDamageEvent[clientName] = eventType;
|
||||
@@ -696,4 +705,25 @@ function processInteriorLightsRendering() {
|
||||
}
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function getPlayerFromParams(params) {
|
||||
let clients = getClients();
|
||||
if(isNaN(params)) {
|
||||
for(let i in clients) {
|
||||
if(!clients[i].console) {
|
||||
if(toLowerCase(clients[i].name).indexOf(toLowerCase(params)) != -1) {
|
||||
return clients[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if(typeof clients[toInteger(params)] != "undefined") {
|
||||
return clients[toInteger(params)];
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
Reference in New Issue
Block a user