Alright first that worked! Thanks!!!
Now in it ent.init function of the car dealer entity i have self.LMMCDID = 0 (lmmcd is lmm's car dealer) and the 0 is just for now... THEN in the function where i spawn the car dealer i have self.LMMCDID = v below is the whole function (with the config section)
hook.Add("InitPostEntity", "SpawnLMMCarDealer", function()
timer.Simple(2, function()
for k,v in pairs(LMMCDConfig.CarDealerPos) do
local lmmcd = ents.Create("car_dealer")
lmmcd:SetPos(v[2])
lmmcd:SetAngles(v[3])
lmmcd.LMMCDID = v[1]
lmmcd:Spawn()
end
end)
end)
LMMCDConfig.CarDealerPos = -- Pos for the car dealer's
{
{1, Vector(-136.871857, -1408.653809, -131.968750), Angle(2.090849, -0.501209, 0.000000), Vector(56.624390, -1315.536987, -139.968750), Angle(0.990848, -90.481255, 0.000000)},
}
the first entry in the table is the index... Now the first vector and angle in the table is where the car dealer will spawn and the second is where the car should spawn... now here's the problem... i'm pretty new to tables so how would i call the indexes...
car:SetPos(LMMCDConfig.CarDealerPos)
car:SetAngles(LMMCDConfig.CarDealerPos[self.LMMCDID][5])
that's what i have so far... NOTE: Yes i know the setpos is empty just look at the setangles...
Extra Note: the config is in a different file and YES is running
Thanks for the help!