Only pay people when they are working

Hey there, I’m trying to edit my job scripts alongside the paycheck script to make it so players only receive a paycheck while they are working. In the little bit of knowledge I have of lua and databases I know how to achieve just this by adding in events that set whether the player is working or not based on the outfits they are in. The only issue is im editing the paycheck.lua in es_extended that is server based and i’m checking to see if the player is clocked in at the paycheck intervals. This means that if a player clocks out 1 minute before the paycheck script runs again he wont get any money. This also means if a player clocks in 1 minute after the paycheck script runs he wont get anything until it runs again. I’m wanting to try and accomplish something like this for everyone individually where the timer runs based off of the time each single person has been on the job. I’m not paying out from society accounts so we don’t have to worry about checking the account for money just simply adding it to the bank accounts during the interval. I’m currently set at 20 minute intervals. If anyone can help out with this or has a script that does this I would greatly appreciate the assistance.

I have searched for you.


You can edit this script, you would have to make a job called offpolice or offambulance in your database

1 Like

I may be able to incorporate parts from it. I just don’t want to have people go onduty in one circle and then go change clothes I want it to be one smooth thing. It’s been a little while since I’ve looked at this esx_duty scripting so not sure if this changes anything with the paycheck though.

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.