Jump to content
s13ep

Basic Money System - Multiplayer; Help.

Recommended Posts

I want to create a money system, that plays like an experience system.

For each objective completed, earn a sum of money.

Up to three classes of objective, easy, medium and hard; objective in each class output the same money.

With money you can buy weapons, vehicles, special missions with a higher payout...

You can switch on supports, etc.

At any time you can take on the main mission; you assault the enemy HQ, and if you succeed you complete the mission.

Is there any way to manipulate the score feature to produce different amounts of points and use this as currency?

I don't necessarily want the money people have saved but I'd like something to prevent disconnects; perhaps adding money in game if you are a moderator, possible?

Edited by s13ep
  • Like 1

Share this post


Link to post
Share on other sites

Hello!

Making a 'Simple Money Script' is super easy and it is the base for making the shops later. The 'Simple Money Script' is really simple :D

1. Go to your mission folder

2. Create an init.sqf file

3. Open the init.sqf file and put inside something like this (exactly like this)

variablename = amountofmoney;

the variablename could be anything that comes out of your head. If you are making a cash script the variable name should remind you of money. The variable name could be something like this: money = amountofmoney, cash = amountofcash, dollars = amountofcash. You get the point.

the amountofmoney is the amount of money you want the player to have in the start of the mission. If you want the player to start with 10k for example the amountofmoney would be 10000 (never put comas 10,000 <--- this is wrong)

EXAMPLE: My variable name is money and i want to start with 1500 money it would be like this: money = 1500;

--ADDING CASH & SUBTRACTING CASH--

You can add cash many different ways. You can add cash after a player makes a kill and you can even make the player loose cash after each death or team kill. You can also make an object that can add cash to the players 'Bank'.

I am going to make an object since it is pretty easy to do while the killing and dying and team killing can get really complicated.

I have a pile of money in the editor and i have this in the init field of the pile of money: this addaction ["Take Cash","cash.sqf"]; <-- What this does, it makes it when you go up to the pile of money you have the action 'Take Cash' and for the game to understand what it will do when this action is activated, we have a cash.sqf file in the mission folder.

Inside that cash.sqf we add this code: money = money + 800; _object = _this select 0; deletevehicle _object;

This will add cash obviously. It is really simple to explain: money (the variable you set for cash) = money + 800; (the amount of that variable + 800) This will add 800 dollars, euros whatever you want it to be to your balance. so we had 1500, now it will be 2300

_object = _this select 0; <-- This names the money pile _object so we can remove it later using deletevehicle. deletevehicle _object; simply removes the money pile so the player won't be able to pick up the same money pile over and over to get cash. If you want to subtract cash you would do money = money - amount; (if the amount was 800 like it was before you would loose 800 so instead of having 1500 you would have 700)

You also said you wanted a shop where players could buy vehicles and weapons. I wont include this yet since i cant find my shop scrip around so ill either have to make another one and see if i can get it to work and then post it here or look around more. Anyway i hope i helped you atleast a little bit. You can add me on steam if you want my name is Alex150201

  • Like 4

Share this post


Link to post
Share on other sites

Hi Alex, your help is much appreciated and I added you on steam.

Edited by s13ep
  • Like 1

Share this post


Link to post
Share on other sites

I'll add you back as soon as I finally get home :)

Share this post


Link to post
Share on other sites

The traffic was really that bad, eh?

  • Like 1
  • Haha 1

Share this post


Link to post
Share on other sites

EVERYONE CALM DOWN. He may have just gotten lost on his way home and has only just found his way back... Loads of people do it. Right? :D

  • Like 1
  • Haha 3

Share this post


Link to post
Share on other sites

Hello?  

 

I am interested in knowing if anyone has an easy money system script where players get money for completing tasks.  For example, I go to dealer to get objective to deliver suit case of coke to another dealer.  If I deliver I get $$.  But not until I deliver.  Once delivered I get money deposited.   

Share this post


Link to post
Share on other sites
On 7/3/2017 at 7:38 PM, MrCopyright said:

Nearly 2 years later you reply, brilliant.

 

On 14/5/2017 at 3:30 AM, Pepticyeti said:

Maybe he just got home? 

 

On 14/5/2017 at 8:51 AM, Grumpy Old Man said:

Buying cigarettes may take a while.

 

Cheers

 

On 14/5/2017 at 10:02 AM, HallyG said:

The traffic was really that bad, eh?

 

On 14/8/2017 at 6:06 AM, HazJ said:

EVERYONE CALM DOWN. He may have just gotten lost on his way home and has only just found his way back... Loads of people do it. Right? :D

 

11 hours ago, M. Glade said:

Hope @Alex150201 made it back home. 

I'm here! I had unsubscribed to the thread so i wasn't getting notified. If @M. Glade hadn't mentioned me I wouldn't have seen this lol :D

 

Sooo, what do you all need? :)

 

 

EDIT: I just read my last comment, it read "I'll add you back when I get home" I am pretty sure I added him back on steam when I got home I don't know if you guys expected a reply that I added him no steam

  • Like 2
  • Haha 1

Share this post


Link to post
Share on other sites

@Alex150201 

 

HI! :) I was just searching for some info on how to setup  a shop and simple currency system like the one described by @s13ep , I read your response and i would love some more help and knowledge of the set you described. I'm building a PMC drug wars campaign in local multi with some friends. i just wanted to add a setup. i,e money for objectives and being able to pick up and add to a wallet of some sorts, and have a black market store vendor for soldier kits, and then a black market vehicle vendor. would love to hear more.

 

Share this post


Link to post
Share on other sites
Spoiler

Hello @Alex150201

 

is there a way that you can show me the entire init.cqf file so that I can put it in the folder with my MP mission? best regards john

 

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

×