Jump to content
Ulmann

Save vehicle inventory

Recommended Posts

Hello, I have another question:

It is possible to save vehicle inventory and add it again to vehicle after respawn in MP?

Share this post


Link to post
Share on other sites

Share this post


Link to post
Share on other sites
8 minutes ago, maihym said:

What about items in backpacks or vests?

Ohhhh man...

 

You can first use getBackpackCargo/addBackpackCargoGlobal to store and re-add the empty backpacks.
Then you can use

https://community.bistudio.com/wiki/everyBackpack

to get a list of all backpacks in the vehicle. each backpack then is a object that you can use getWeaponCargo/getItemCargo/getMagazineCargo on.
So for storing you take all backpacks, and store getXCargo for each of them.
For re-adding them you addBackpackCargoGlobal the backpacks. And then use everyBackpack to get all backpacks you just added and then use the addXCargoGlobal commands to re-add the items

Yes. It's a chore.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×