[Release] PayCops (for CopsFiveM Lite)


#1

First off I want to note that I am well aware of @PandaBasketteur’s Job System and Paycheck for use with @Kyominii’s CopsFiveM This works great for the full version of CopsFiveM however, those who want the lite version and only have cop jobs on the server may not need a full job and payroll system, or at least until Kyominii introduces one in a future release. :wink:

So, with that out of the way, I present to you PayCops - A very simple payroll system for the lite version of CopsFiveM.


PayCops

Crime does pay! At a set time frame, between a set amount.

Requirements

  • CopsFiveM (Lite Version) (and its requirements, obviously)

Installation

  1. Install requirements
  2. Download PayCops.zip from here.
  3. Unzip into the “resources” folder on your server.
  4. Add - PayCops to citmp-server.yml in your server root.
  5. Set the MySQL settings at the top of server.lua
  6. Restart server

Customization & Defaults

There are a few settings that can be changed to alter the pay system.
Settings are at the top of both client.lua and server.lua.

server.lua Settings

  • MySQL Database settings - Self explanatory.
  • minSalary = int - The lowest possible paycheck. (Default is 450)
  • maxSalary = int - The maximum possible paycheck. (Default is 2500)

Salary will be a random number between minSalary and maxSalary amounts.

client.lua Settings

  • paytime = int - The amount of time (in minutes) between each paycheck. (Default is 10)

Obligatory Virus Check

VirusTotal result.
zip hash: c976d3212be1b4023c8e8d98a327e722b8b6529ca91105ea0f07fed3f24ae68c


For those who wanna fork, contribute or whatever… it’s also on GitHub.
I hope it’s of some use to somebody! - Thanks! :slight_smile:


#2

Have you try to use job system with paycheck ? (it’ll be integrate in the next release of Cops FiveM)


#3

I have indeed but I couldn’t get it to all work nicely together, there were SQL errors all over the place for whatever reason so I decided to knock something up myself for now. Plus, it helps me learn a bit of LUA and how the whole scripting system works overall. :slight_smile:

Implementation would be awesome though! I look forward to checking it out!


#4

You can use events from JobSystem :wink:


#5

Thanks for the help and inspiration on this one! :stuck_out_tongue:


#6

its work with a full version of copfivem of Kyo ?


#7

Possibly, I haven’t tested it but it’s not needed for the full version as that requires installing Job System and Paycheck anyway which renders this redundant. That’s why it’s for the lite version. For if you have cops and want them to be paid but don’t want to install the whole Job System and Paycheck scripts. ie. You don’t want other jobs, just cops.


#8

im try and work perfectly with full version thx :smiley:


#9

Great! & You’re welcome :slight_smile: