Is it possible to have a SWEP which spawns a vehicle? If so, what is the code?
local trace = self.Owner:GetEyeTrace()
local vehicle = ents.Create("prop_vehicle_jeep") vehicle:SetKeyValue("vehiclescript","scripts/vehicles/jeep_test.txt") vehicle:SetModel("models/buggy.mdl") vehicle:SetPos(trace.HitPos) vehicle:Spawn() end
thanks …I was failing so much at trying to do this part of my SWEP