Fix E-Job Starten

This commit is contained in:
Mac_Slash
2020-04-30 15:56:05 +02:00
parent ec25d1c476
commit 10cd220708
4 changed files with 94 additions and 82 deletions

View File

@@ -1,6 +1,9 @@
import { VehicleSeat } from "../game";
export default function () {
var TorqueEntity
var TorqueValue = 1;
mp.events.addDataHandler("vehicleAdminSpeed", (entity, newValue) => {
if (!entity.isAVehicle()) return;
entity.setEnginePowerMultiplier(newValue);
@@ -9,7 +12,13 @@ export default function () {
mp.events.addDataHandler("vehicleAdminSpeed2", (entity, newValue2) => {
if (!entity.isAVehicle()) return;
mp.gui.chat.push("Debug1");
entity.setEngineTorqueMultiplier(newValue2);
//entity.setEngineTorqueMultiplier(newValue2);
TorqueEntity = entity;
TorqueValue = newValue2;
mp.gui.chat.push("Debug2");
});
/*mp.events.add('render', () => {
let vehicle = mp.players.local.vehicle;
vehicle.setEngineTorqueMultiplier(1.5); // Multiplies by 1.5 the engine torque
});*/
}