How to prevent vehicle from despawning? (scripthookV/C#)
-
Hey,
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?
Thanks!
-
@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.
-
https://www.gta5-mods.com/scripts/i-m-not-mental-s-persistance-mod
You can do go through the file and look for the toggle section or use this mod.