- 52
- 2
- Версия MoonLoader
- .027.0-preview
Lua:
function Vehicle()
if elements.checkboxes.rn.v then
if isCharInAnyCar(PLAYER_PED) then
local car = storeCarCharIsInNoSave(PLAYER_PED)
local vector = {getCarSpeedVector(car)}
local heading = getCarHeading(car)
local turbo = fpsCorrection() / (elements.checkboxes.SpeedSmooth.v * 110)
local force = {turbo, turbo, turbo}
local Sin, Cos = math.sin(-math.rad(heading)), math.cos(-math.rad(heading))
if vector[1] > -0.01 and vector[1] < 0.01 then force[1] = 0.0 end
if vector[2] > -0.01 and vector[2] < 0.01 then force[2] = 0.0 end
if vector[3] < 0 then force[3] = -force[3] end
if vector[3] > -2 and vector[3] < 15 then force[3] = 0.0 end
if Sin > 0 and vector[1] < 0 then force[1] = -force[1] end
if Sin < 0 and vector[1] > 0 then force[1] = -force[1] end
if Cos > 0 and vector[2] < 0 then force[2] = -force[2] end
if Cos < 0 and vector[2] > 0 then force[2] = -force[2] end
applyForceToCar(car, force[1] * Sin, force[2] * Cos, force[3] / 2, 0.0, 0.0, 0.0)
end
end
end
upd
b
Последнее редактирование: