Garry's Mod

Garry's Mod

Not enough ratings
Sir Masters' Additional Passenger Seats Framework
   
Award
Favorite
Favorited
Unfavorite
Content Type: Addon
Addon Type: Vehicle
Addon Tags: Roleplay
File Size
Posted
Updated
3.123 KB
29 Sep, 2016 @ 3:34am
4 Oct, 2016 @ 5:08pm
4 Change Notes ( view )

Subscribe to download
Sir Masters' Additional Passenger Seats Framework

In 1 collection by Zhang Hēi
PMC Black Zone Content
31 items
Description
Currently in Alpha, but should work fine unless some weird addon conflict happens. Please inform me of any bugs or errors!

Were you really annoyed how when you spawn a vehicle and you had to spawn a seat for your friends, wield it to the vehicle, them having to noclip to even get in the chair? Well this addon solves your problems! Well, it's a framework that solves that issue.

This addon works by hooking "PlayerSpawnedVehicle" and spawning extra seats as either defined by the vehicle developer, or via a file that defines it externally! Now, currently, I am adding support for TDM cars as a seperate addon, and I have no developed tools for that yet, so I have to manually add and edit the positions until I get it right, which could take a while. EDIT: Made a simple tool that helps finding seat positions easier, listed under dev tools, left click to pick the car you want to find the positions for, and then right click to output the lua code into the console.

FOR NORMAL USERS (Potentally you!):
Download a addon that has inbuilt support for this addon, or download an addon that adds support for the vehicle you want. Vehicles that support my addon won't break if you don't have my addon.

Addons that use this framework:

Conflicts:
  • None currently

Credits:
  • Sir Masters (myself) - This whole framework


Please do not Reupload the framework, seriously, don't.

FOR DEVELOPERS:


To get the vehicle's lua name, right click on it in the spawn menu and select copy.

You can also add the table into the vehicle's definition table as the sub-table "SM_SEATADDON"

turning on "sm_seatsaddon_devmode" in the console will make the hull traces and the seats visible and should help you find the right spots to put everything in place.

The seat data table for a spawned vehicle can be accessed via "vehicle_ent.VehicleTable.SM_SEATADDON", and it is synced server and clientside on vehicle creation, though it will not sync afterwards unless you network it yourself.

Message and credit me if you use this framework in your addons! Please prefix [SMAPSF] in your addon names if it uses my framework, or [SMAPSF Support] if it adds support to an existing addon.

local seatData = { --[[ Default affects the actual vehicle, though only HullCheck and ExitPos will be read --]] ["default"] = { HullCheck = { Pos = Vector(-80,30,4), Min = Vector (-8,-8,0), Max = Vector (8,8,32) }, ExitPos = Vector(-80,30,4) }, ["passenger_front"] = {--The additional seat Pos = Vector(22,26,54), --Relative to the vehicle's orientation Ang = Angle(0,0,0), --Relative to the vehicle's orientation HullCheck = {--This is where we check if the player is standing in a certain spot for a certain seat Pos = Vector(80,30,4), --Where we check to see if the player is in the right spot for this seat. Min = Vector (-8,-8,0), --This is the min size of the hull for the checking Max = Vector (8,8,32) --This is the max size of the hull for the checking }, ExitPos = Vector(80,30,4) --Where we exit out, caution } } list.Set( "SeatData", "yourvehiclehere", seatData )
5 Comments
Benevolence 29 Oct, 2019 @ 2:04pm 
A: I don't know, i'm bored
Benevolence 29 Oct, 2019 @ 2:01pm 
You ever tried the tools menu?
Jason Voorhees 27 Jul, 2019 @ 2:38pm 
How do you apply the seat?
Buzzlighteryear45 5 Jun, 2019 @ 7:52pm 
can I have some help with this
bigethab 1 Nov, 2016 @ 8:28pm 
Amazing addon mate, accept my friend request so we can talk through private message!