[NEED HELP] Garry's Mod - Arista Gamemode - Vehicles
Hi there! I've been looking everywhere on the internet trying to find some answers, with no luck.
I know the gamemode is quite old, but it is functioning for me & what I want to use it for, but I am very LUA illiterate.
I'm trying to add a new vehicle to the server, which is slightly working, but I'm not entirely sure how to get the position of the entity itself & not the map.
I'm trying to get the position of the entity itself, from what I can only assume is to add the seat to the right position to make it usable.
I'll add some code that works first, the code that was included with the gamemode, and I'll include my failed attempt at copying it over -
And thank you - to anyone who may have some insight they're able to share, any knowledge would be greatly appreciated!
Working -
ITEM.name = "Truck"
ITEM.cost = 150000
ITEM.model = "models/tideslkw.mdl"
ITEM.store = true
ITEM.plural = "Trucks"
ITEM.description = "A large truck that can move a lot of stuff."
ITEM.vehicleName = "tideslkw" -- It's vehicle script.
ITEM.base = "vehicle"
local v = {
Name = ITEM.name,
Class = "prop_vehicle_jeep",
Category = "Vehicles",
Author = arista.gamemode.author,
Information = ITEM.description,
Model = ITEM.model,
Windowlevel = 53,
Passengers = {
passenger1 = {
Pos = Vector(21,-78,40), Ang = Angle(0,0,0)
},
},
Customexits = {Vector(-90, -78, 40),Vector(90, -78, 40), Vector(0, 0, 90)},
HideSeats = true,
Horn = {
Sound = "vu_horn_simple.wav",
Pitch = 90,
},
SeatType = "Seat_Jeep",
ModView = 12,
KeyValues = {
vehiclescript = "scripts/vehicles/" .. ITEM.vehicleName .. ".txt"
},
Ownable = true,
}
list.Set("Vehicles", ITEM.vehicleName, v)
Spawning - but not working
ITEM.name = "Wheelchair"
ITEM.cost = 1
ITEM.model = "models/sentry/wheelchair.mdl"
ITEM.store = true
ITEM.plural = "Wheelchair"
ITEM.description = "A wheelchair, for when your legs are busted."
ITEM.vehicleName = "wheelchair" -- It's vehicle script.
ITEM.base = "vehicle"
local v = {
Name = ITEM.name,
Class = "prop_vehicle_jeep",
Category = "Vehicles",
Author = arista.gamemode.author,
Information = ITEM.description,
Model = ITEM.model,
Windowlevel = 53,
Passengers = {
passenger1 = {
Pos = Vector(21,-78,40), Ang = Angle(0,0,0)
},
},
Customexits = {Vector(-90, -78, 40),Vector(90, -78, 40), Vector(0, 0, 90)},
HideSeats = true,
Horn = {
Sound = "vu_horn_simple.wav",
Pitch = 90,
},
SeatType = "Seat_Jeep",
ModView = 12,
KeyValues = {
vehiclescript = "scripts/vehicles/" .. ITEM.vehicleName .. ".txt"
},
Ownable = true,
}
list.Set("Vehicles", ITEM.vehicleName, v)