Convoy Trucking

Server related => General Talk => Topic started by: PeeJay on April 08, 2020, 10:56

Title: Paycheck system [reopened]
Post by: PeeJay on April 08, 2020, 10:56
https://forum.convoytrucking.net/index.php?topic=52818.0

Bumped into this topic which is what I am actually looking for.

As a player who played before, I also experienced working for SAFA. And it was interesting because they had this paycheck system.

Now, I also want to implement this in my club because I believe that it will also be interesting for most of the players especially nowadays. I just want to inquire how paycheck system worked for SAFA before.
Title: Re: Paycheck system [reopened]
Post by: Joshy on April 08, 2020, 20:17
Hey PeeJay,

The code I used for SAFA paychecks has long since disappeared. I've looked through my PC, can't find any files.

However the topic you've linked is correct, you'll need to collect player data every N days, compare it against the last set of data, and work out how much to pay them based on your rules e.g. $1k per 1 fuel stat.

To automate this, there's a Players API @ http://convoytrucking.net/api/players/{player id}, e.g. my stats are at http://convoytrucking.net/api/players/10039/

As for sending the actual money to players, from my experience I did it manually, but someone in the linked topic mentioned creating a AutoHotKey script to automate typing "/give [player name] [amount] [comment]" in the chatbox.
Title: Re: Paycheck system [reopened]
Post by: PeeJay on April 09, 2020, 04:04
Quote from: Joshy on April 08, 2020, 20:17

The code I used for SAFA paychecks has long since disappeared. I've looked through my PC, can't find any files.

Well this is unfortonuate.

Actually I'm curious about where do SAFA get the money that they give to their workers. Because as of now, the system that I am implementing to my club is e.g. karl shares his artic trailer to my club. Then every haul he makes, he gets 20% in return. But the payroll will come from my own money. And I will pay them every 2weeks. So their hauls for 2weeks are accumulated.

But my thing is you work for the club (to raise club funds) but you'll get something in return to make you motivated and interested.

Another thing in my mind is making the club funds available not just for club vehicles and club base, but also for paycheck systems.