Skip to content

vehicle:SetSuspensionLength(x) doesn't seam to work #260

@catperson6real-dev

Description

@catperson6real-dev

I'm making a small private addon with a car that's nearly identical to the "Dukes" from the base pack, but can jump by increasing suspension length for a moment. For that I've added a vehicle and a VSWEP. Both work normally until I add SetSuspensionLength()

VSWEP.Base = "base"
VSWEP.Name = "JUMP!"

if SERVER then
    function VSWEP:PrimaryAttack()
        local vehicle = self.Vehicle
        --print("fish") -- debug text, works properly when uncommented

        vehicle:SetSuspensionLength(25) -- doesn't work???
        timer.Simple( 0.1, function()
            vehicle:SetSuspensionLength(10)
        end )

    end
end

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions