Jump to content

[.NET] Stop objects from despawning?


qiangqiang101

Recommended Posts

qiangqiang101

I spawn objects on map, but they despawn when player gets far, how to stop that??

Link to comment
Share on other sites

thewhitehammer99

I spawn objects on map, but they despawn when player gets far, how to stop that??

Setting the object as a mission entity will stop it from despawning :p

Link to comment
Share on other sites

Using ScriptHookDotNet, I make vehicles persistent and that seems to prevent them from despawning.

Car.IsPersistent = true
Link to comment
Share on other sites

Setting the object as a mission entity will stop it from despawning :p

 

Using ScriptHookDotNet, I make vehicles persistent and that seems to prevent them from despawning.

Car.IsPersistent = true

 

IsPersistent calls SET_ENTITY_AS_MISSION_ENTITY :)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • 1 User Currently Viewing
    0 members, 0 Anonymous, 1 Guest

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.