Garry's Mod
Недостаточно оценок
Sir Masters' Additional Passenger Seats Framework
   
Наградить
В избранное
В избранном
Удалить
Тип контента: Дополнение
Тип дополнения: Транспорт
Метки дополнений: Ролевая игра
Размер файла
Добавлен
Изменён
3.123 KB
29 сен. 2016 г. в 3:34
4 окт. 2016 г. в 17:08
Обновлений: 4 (просмотреть)

Подпишитесь, чтобы загрузить
Sir Masters' Additional Passenger Seats Framework

В 1 коллекции, созданной Zhang Hēi
PMC Black Zone Content
Предметов: 31
Описание
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
Benevolence 29 окт. 2019 г. в 14:04 
A: I don't know, i'm bored
Benevolence 29 окт. 2019 г. в 14:01 
You ever tried the tools menu?
Jason Voorhees 27 июл. 2019 г. в 14:38 
How do you apply the seat?
Buzzlighteryear45 5 июн. 2019 г. в 19:52 
can I have some help with this
bigethab 1 ноя. 2016 г. в 20:28 
Amazing addon mate, accept my friend request so we can talk through private message!