[FREE] [ESX/QB] KFines - Nice Traffic Tickets with option to pay later!

[ESX/QB] KFines - Nice Traffic Tickets with option to pay later!

KFines is advanced Traffic Tickets system that allows creating tickets for players by cops, that can be paid later (by default, player needs to pay it in 3 days). If player don’t pay ticket after configured time, script will take money with additional fee (by default 25%).

Requirements

Items

To create tickets, player needs to have police job and use item traffic_tickets_block (Please register it in database).

Configuration

Configuration file is located in shared/config.lua

Locale files are located in locales/

Please configure your framework and mysql type in fxmanifest.lua

Documentation

Docs
How to edit UI

Dowload

Preview
GitHub [FREE]
Tebex - Pay how much you want [min. $1]

20 Likes

Hey, do you have an preview ?

Hey! Maybe I will add video. Currently you have only image with ticket ui

is there a sql file with it or ?

You need to register item (from instructions) manually. The database table is created automatically when starting script

1 Like

Preview is now available here

[ script:oxmysql] [10.4.27-MariaDB] Database server connection established!
[ script:oxmysql] Error: KFines-main was unable to execute a query!
[ script:oxmysql] Query: SELECT id FROM kfines WHERE payUntil < CONVERT_TZ(NOW(), ‘+00:00’, ?) AND paid=false
[ script:oxmysql] [“+02:00”]
[ script:oxmysql] Table ‘esxlegacy_c3f7ec.kfines’ doesn’t exist
[ script:ox_inventory] [info] Database contains 34 items.
[ script:oxmysql] Error: KFines-main was unable to execute a query!
[ script:oxmysql] Query: CREATE TABLE IF NOT EXISTS kfines (id INT NOT NULL AUTO_INCREMENT , copIdentifier TEXT NOT NULL, copName TEXT NOT NULL, copRank TEXT NOT NULL, copBadge TEXT NOT NULL, citizenIdentifier TEXT NULL, citizenName TEXT NOT NULL,citizenSex INT NOT NULL,citizenDOB TEXT NOT NULL, fine INT NOT NULL, reason TEXT NOT NULL, date TIMESTAMP NOT NULL, payUntil TIMESTAMP NOT NULL, signature TEXT NOT NULL, paid BOOLEAN NOT NULL DEFAULT FALSE, afterTime BOOLEAN NOT NULL DEFAULT FALSE, PRIMARY KEY (id)) ENGINE = InnoDB;
[ script:oxmysql] []
[ script:oxmysql] Invalid default value for ‘payUntil’

Hey, error Invalid default value for ‘payUntil’ is very strange bug, because payUntil doesn’t have default value. It can be something wrong with your db configuration. You can also try to add default value to it in script (server.lua), it will be sth like , payUntil TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP. I also noticed that you are using oxmysql and ox_inventory that are probable from ESX Legacy. I currently support only ESX 1.2

Would you make this for qbcore?

thank you its worked

Nice release :slight_smile:

Maybe in the next week

Hi it looks really good and i love that, guess it doesn’t work with esx legacy right :wink:?

Yeah, it doesn’t work with esx legacy, but I will add support in the next week

1 Like

Update 05/08/2023

  • Added support for ESX Legacy & oxmysql. Please configure your framework and database in fxmanifest.lua.
  • Added template for qb, but currently it’s not supported (will be soon)
1 Like

Amazing :heart_eyes:.

2nd Update 05/08/2023

  • Added support for QBCore. Please configure your framework and database in fxmanifest.lua .
1 Like

Documentation is now available here

Update 09/08/2023

  • Fixed ESX problem with adding money to police account after starting server


very good script but I meet this error, can you help me please

[ script:oxmysql] SCRIPT ERROR in promise (unhandled rejection): Error: KFines was unable to execute a query!
[ script:oxmysql] Table ‘qbcoreframework_385a0b.kfines’ doesn’t exist
[ script:oxmysql] SELECT id FROM kfines WHERE payUntil < CONVERT_TZ(NOW(), ‘+00:00’, ?) AND paid=false [“+02:00”]
[ script:oxmysql] > (@oxmysql/dist/build.js:21833)
[ script:oxmysql] > processTicksAndRejections (node:internal/process/task_queues:96)
[ script:oxmysql]
[ script:oxmysql] SCRIPT ERROR in promise (unhandled rejection): Error: KFines was unable to execute a query!
[ script:oxmysql] Invalid default value for ‘payUntil’
[ script:oxmysql] CREATE TABLE IF NOT EXISTS kfines (id INT NOT NULL AUTO_INCREMENT , copIdentifier TEXT NOT NULL, copName TEXT NOT NULL, copRank TEXT NOT NULL, copBadge TEXT NOT NULL, citizenIdentifier TEXT NULL, citizenName TEXT NOT NULL,citizenSex INT NOT NULL,citizenDOB TEXT NOT NULL, fine INT NOT NULL, reason TEXT NOT NULL, date TIMESTAMP NOT NULL, payUntil TIMESTAMP NOT NULL, signature TEXT NOT NULL, paid BOOLEAN NOT NULL DEFAULT FALSE, afterTime BOOLEAN NOT NULL DEFAULT FALSE, PRIMARY KEY (id)) ENGINE = InnoDB;
[ script:oxmysql] > (@oxmysql/dist/build.js:21833)
[ script:oxmysql] > processTicksAndRejections (node:internal/process/task_queues:96)