Paycheck system [reopened]

Started by PeeJay, April 08, 2020, 10:56

PeeJay

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.

Joshy

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.
[comment]test[/comment]
LAST SEEN
TOTAL TIME ON SERVER
SCORE
TRUCK LOADS
CONVOY SCORE
ACHIEVEMENTS
ARTIC
DUMPER
VAN
FUEL
CEMENT
ARRESTS
CARS STOLEN
COACH
PLANE
HELICOPTER
TOW TRUCK
LIMO
TRASH
ARMORED VAN
BURGLARIES
ARMORED VANS STOLEN
MISSIONS FAILED
OVERLOADED
FINES PAID
TOTAL SPENT ON FUEL
INTEREST EARNED
DISTANCE TRAVELLED
TIME IN JAIL
LAST MISSION
Generated using Azure Functions & CloudFlare Workers using the Convoy Trucking API. Updates every around 5 minutes. See the original SVG image. View source code (not updated with function yet)




PeeJay

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.