From 88ba26e529043d61315b73014bd0a517d97a0119 Mon Sep 17 00:00:00 2001 From: Vortrex <3858226+VortrexFTW@users.noreply.github.com> Date: Sun, 15 Aug 2021 12:15:34 -0500 Subject: [PATCH] Fix some data saving and wrong label setting --- scripts/server/subaccount.js | 2 +- scripts/server/vehicle.js | 16 ++++++++-------- scripts/shared/native/gtac.js | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/scripts/server/subaccount.js b/scripts/server/subaccount.js index b679b8f2..09fc5abe 100644 --- a/scripts/server/subaccount.js +++ b/scripts/server/subaccount.js @@ -98,7 +98,7 @@ function saveSubAccountToDatabase(subAccountData) { ["sacct_cash", subAccountData.cash], ["sacct_when_lastlogin", subAccountData.lastLogin], ["sacct_pos_x", subAccountData.spawnPosition.x], - ["sacct_pos_y", subAccountData.spawnPosition.x], + ["sacct_pos_y", subAccountData.spawnPosition.y], ["sacct_pos_z", subAccountData.spawnPosition.z], ["sacct_rot_z", subAccountData.spawnHeading], ["sacct_int", subAccountData.interior], diff --git a/scripts/server/vehicle.js b/scripts/server/vehicle.js index 5ef23b88..c781d1f6 100644 --- a/scripts/server/vehicle.js +++ b/scripts/server/vehicle.js @@ -106,14 +106,14 @@ function saveVehicleToDatabase(vehicleDataId) { ["veh_pos_y", tempVehicleData.spawnPosition.y], ["veh_pos_z", tempVehicleData.spawnPosition.z], ["veh_rot_z", tempVehicleData.spawnRotation], - ["veh_col1", tempVehicleData.spawnRotation], - ["veh_col2", tempVehicleData.spawnRotation], - ["veh_col3", tempVehicleData.spawnRotation], - ["veh_col4", tempVehicleData.spawnRotation], + ["veh_col1", tempVehicleData.colour1], + ["veh_col2", tempVehicleData.colour2], + ["veh_col3", tempVehicleData.colour3], + ["veh_col4", tempVehicleData.colour4], ["veh_col1_isrgb", tempVehicleData.colour1IsRGBA], - ["veh_col2_isrgb", tempVehicleData.colour1IsRGBA], - ["veh_col3_isrgb", tempVehicleData.colour1IsRGBA], - ["veh_col4_isrgb", tempVehicleData.colour1IsRGBA], + ["veh_col2_isrgb", tempVehicleData.colour2IsRGBA], + ["veh_col3_isrgb", tempVehicleData.colour3IsRGBA], + ["veh_col4_isrgb", tempVehicleData.colour4IsRGBA], ["veh_col1_r", colour1RGBA[0]], ["veh_col1_g", colour1RGBA[1]], ["veh_col1_b", colour1RGBA[2]], @@ -1191,7 +1191,7 @@ function createNewDealershipVehicle(model, spawnPosition, spawnRotation, price, function createTemporaryVehicle(modelId, position, heading) { let vehicle = createGameVehicle(modelId, position, heading); - setVehicleHeading(heading); + setVehicleHeading(vehicle, heading); addToWorld(vehicle); let tempVehicleData = new serverClasses.vehicleData(false, vehicle); diff --git a/scripts/shared/native/gtac.js b/scripts/shared/native/gtac.js index eaf4c12e..859f0da1 100644 --- a/scripts/shared/native/gtac.js +++ b/scripts/shared/native/gtac.js @@ -1072,7 +1072,7 @@ function isCustomCameraSupported() { // =========================================================================== function areWorldLabelsSupported() { - return false; + return true; } // =========================================================================== \ No newline at end of file