Racelogic, Mustang, Porsche, etc.
This commit is contained in:
43
koptilnya/suspension.txt
Normal file
43
koptilnya/suspension.txt
Normal 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)
|
||||
Reference in New Issue
Block a user