How to prevent vehicle from despawning? (scripthookV/C#)
I'm trying to make a mod where you can save a few vehicles, so they don't disappear when you walk away. does anyone know the function or hash to keep the vehicle from despawning?
@GamerJoey369 Set (Some Entity).IsPersistent to true.
Vehicle v = World.CreateVehicle(VehicleHash.Adder, Game.Player.Character.Position + new Vector3(0, 10, 0)); v.IsPersistent = true; //this method also works on peds/vehicles/objects.
You can do go through the file and look for the toggle section or use this mod.