Giving money each ingame month


Hello, here I am again. I have found some time to log in and practice code. As I have been coding my mod, i was wondering how to make a function to give each month a ‘x’ value of money to the company. @Mabb had shown me how to do this some months ago with this piece of code.

var handler = function (e) {, "test");

GDT.on(GDT.eventKeys.gameplay.weekProceeded, handler);

EDIT: It now works. It gives 1K each week.


I came up with a newer solution, nevermind. This one gives money each week. I’m gonna modify it so it’s gonna use months instead. I have updated the main post with the new code.


The way I did it is this:

function a() {
  gcgd =;
  if (gcgd.week == 1) {
             // your code
GDT.on(GDT.eventKeys.gameplay.weekProceeded, a);

The game checks whether the week number is 1 each time the week proceeds, and since there is only one week 1 every month, it will execute only then.

This may not be the best method on doing it, but it’s the way I’ve done it multiple times and it does actually work.


Sure, I’ll try to use that later. Thanks for telling me.

GDT.on(GDT.eventKeys.gameplay.weekProceeded, (function(){
if ( % 4 == 0)
 //your fancy code

when weekProceeded is triggered do
if total weeks can be divided by four then
//your code

This should work… I think.


Yeah obviously.


Where do i paste the “code” that you wrote?i wanna test it myself