Jump to content
Sign in to follow this  
finguide

How to assign independent & dynamic variable (number) to every player in multiplayer?

Recommended Posts

I have no idea how to assign a variable and use it in multiplayer mission. I want to create a simple money system, where every player has at start for example $20.000 in his wallet and if he buys any stuff, his/her wallet will loose some cash. My problem is, that how do I create dynamic "wallet" for every player? I don't understand especially that, how can I assign the (independent) money variable to every player and make the script check (and eg. write it to players chat) and change it later. So, I want player to be able to check his wallet and the money in there decrease when the player buys something.

I managed to create something like this:

money = 20000;

player addAction ["Check your wallet","player sideChat You have $ %1 in your wallet."];

As you may see I have _no_ idea what I'm doing... :rolleyes:

How do I get that to reference the player's money variable and print it only to his chat or the popup hint?

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  

×