I want to know how to remove a Jeep after I have spawned it. The code to spawn the jeep is:
[lua]function JeepSpawn( ply )
local tr = ply:GetEyeTrace() local car = ents.Create("prop_vehicle_jeep_old") car:SetModel("models/buggy.mdl") car:SetKeyValue("vehiclescript","scripts/vehicles/jeep_test.txt") car:SetPos(tr.HitPos + Vector( 0, 0, 10 ) ) car:Spawn()
I found what I thought might be the answer, but im not sure how to use it
Although that says “adds to the players undo list”, but doesn’t actually remove the entity. Bearing in my I have not derived my gamemode from sandbox (don’t know if it matters, but thought I should mention it).
Any help will be greatly appreciated. Thanks.