Jump to content
Sign in to follow this  
Chris_37

saving and loading player weapon to profilenamespace?

Recommended Posts

Hey, wondering if anyone could help me saving a weapon to the profilenamespace as well as loading it?

Share this post


Link to post
Share on other sites
30 minutes ago, Chris_37 said:

Hey, wondering if anyone could help me saving a weapon to the profilenamespace as well as loading it?

 

profilenamespace setVariable ["YourWeapon",currentWeapon player];//saves weapon
_weapon = profilenamespace getVariable ["YourWeapon",""];//returns saved weapon

Don't dump anything into profilenamespace though, since there's no way to get rid of those variables besides deleting the user profile or setting those variables to nil.

 

Cheers

Share this post


Link to post
Share on other sites

Also keep in mind that players can access it meaning if you save like XP/money for example, they can change it. To prevent this, save to and load from server profile.

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
Sign in to follow this  

×