Jump to content

[ANSWERED] Add funds to balance if current game mode is Career?


Recommended Posts

Hi all !

I want to add a int value to the funds balance if the current game mode is Career. I know the Game.Modes enumeration, but can I use it in a if statement like :


if ( /*current game mode*/ == Game.Modes.CAREER)
{

[INDENT]// ADD FUNDS TO BALANCE
[/INDENT]


}

Does anybody know how to do that ?

- [EDIT] -

Ok I found how to add funds : if anyone interested :


Funding.Instance.AddFunds(double value, TransactionReasons reason);

TransactionReasons is an enumeration so the best reason I found for what I want to do is TransactionReasons.Any :)

In my case I used a int value so I needed to convert that to a double value, so I used


int remuneration;
// Stuff to change remuneration value...
Funding.Instance.AddFunds(Convert.ToDouble(remuneration), [FONT=courier new]TransactionReasons.Any[/FONT]);

Edited by simon56modder
Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...