starfall-data/koptilnya/suspension.txt
2021-06-06 18:34:44 +06:00

44 lines
771 B
Plaintext

--@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)