Racelogic, Mustang, Porsche, etc.

This commit is contained in:
Nikita Kruglickiy
2021-06-06 18:34:44 +06:00
parent 1aafe32376
commit 9ff9b08a42
16 changed files with 776 additions and 133 deletions

43
koptilnya/suspension.txt Normal file
View File

@@ -0,0 +1,43 @@
--@name Suspension
--@author Opti1337, .hemp
--@server
local lock = 70
local caster = 0
local camber = 0
local accerman = 0
---------------------------
local base, steerWheels, otherWheels
wire.adjustPorts(
{
Base = "ENTITY",
SteerWheels = "ARRAY",
OtherWheels = "ARRAY"
},
{}
)
hook.add("input", "_input", function(name, value)
if name == "Base" then
base = value
elseif name == "SteerWheels" or name == "OtherWheels" then
if isValid(base) then
base:setAngles(Angle(0, 90, 0))
end
if name == "SteerWheels" then
steerWheels = value
else
otherWheels = value
end
end
end)
hook.add("tick", "_tick", function()
end)