Khatrie / cw-racingapp

Racing script with ghosting, advanced leaderboards, class system and race positions

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CW rework of QB-Racing

This is a rework of the superb free resource QB-Racing by ItsANoBrainer.

Some of the added features:

  • Integration with cw-performance to create class based racing
  • Advanced leaderboard for each track and class showing everyones best times
  • By-class leaderboard
  • Replacement of tire-piles lamps
  • Increased size of checkpoints
  • Not as harsh checkpoint-pass detection
  • Remove race tracks you have created
  • See your position in the race
  • Updated HUD
  • Accurate time (old one would vary depending on computer performance)
  • Ability to reset/run the SQL scripts from in game
  • Phasing/Ghosting of racers

Original features by ItsANoBrainer:

  • Standalone racing script not requiring qb-phone to utilize
  • Items to immerse your racing scene with Racer Names
  • Config options to adjust item permissions to your liking
  • Config options to adjust different options
  • Locale Support
  • Create Custom Races Tracks

Planned:

  • Better track editing

Developed by Coffeelot and Wuggie

More scripts by us 👈

Support, updates and script previews:

Join The discord!

All our scripts are and will remain free. If you want to support what we do, you can buy us a coffee here:

Buy Us a Coffee

Racing App

This script lets you manage your racing scene in a better way using items and custom racer names instead of player names! There are two items involved, the master racing fob, and the basic racing fob. At the moment, these are created using the createracingfob command by a qb-core admin, but you can implement any system you want. When created, the fob is bound to the citizenid it was created for, and has a racer name attached to it. Only the citizenid created for it can use it. Using the fob brings up the racing options menu (examples below) which is where you do all the interacting with the script. Each fob has an entry in the Config to tune it to your server to allow or deny certain usage abilities (listed below). By default the master racing fob is required to CREATE new race tracks, and both dongles allow you to do everything else.

Config Options per Dongle:

  • Join a race
  • View race records
  • Setup a new race
  • Create a new race track

Preview 📽

YOUTUBE VIDEO

Setup

You only need either this resource and cw-performance.

  1. Update or insert the database table. Instructions are found in the racing.sql file
  • Option 1: Updating from qb-lapraces must follow OPTION 1 to update their database table and preserve their race tracks
  • Option 2: NOT updating from qb-lapraces must follow OPTION 2 to create the database table
  1. Adjust values in the config.lua file to your likings
  2. Add the items to your qb-core/shared/items.lua
['fob_racing_basic'] = {['name'] = 'fob_racing_basic', ['label'] = 'Basic Racing Fob', ['weight'] = 500, ['type'] = 'item', ['image'] = 'fob_racing_basic.png', ['unique'] = true, ['useable'] = true, ['shouldClose'] = true, ['description'] = 'This basic fob allows someone to join custom races.'},
['fob_racing_master'] = {['name'] = 'fob_racing_master', ['label'] = 'Master Racing Fob', ['weight'] = 500, ['type'] = 'item', ['image'] = 'fob_racing_master.png', ['unique'] = true, ['useable'] = true, ['shouldClose'] = true, ['description'] = 'This master fob allows someone to create custom races.'},
  1. Add the item images to your inventory image folder
  2. Setup your DB by running one of these commands:

/resetracetracks - This command will remove the current race_tracks table and add a new one (good if you got bad data) (warning: all tracks and records will be gone)

/updateracetracks - This command will update the race_tracks table from how it's done in qb-racing. This DOES NOT reset any laptimes and old ones WILL BREAK the script. If you're still getting issues consider wiping old records or using the other command.

Then restart cw-racingapp

Dependencies

Example Usage

Interface Images

Main Menu

Interface

Leaderboards Change from normal qb-racing: Sorted by track, added classes and added full list of laptimes. Each person can have one entry per class + track, so you can have multiple times on a track, with different classes, but the script keeps track of your best times.

Interface Interface Interface

Setting up a Race Change from normal qb-racing: Added classes to list. If you set up a race with A class, people can join with A and lower, but not higher.

Interface

Uninstalling or full reset

/removeracetracks

Drops the race_tracks table. Use this if you're uninstalling (warning: all tracks and records will be gone)

Developed by Coffeelot#1586, Wuggie#1683

About

Racing script with ghosting, advanced leaderboards, class system and race positions


Languages

Language:Lua 91.6%Language:JavaScript 3.4%Language:CSS 3.0%Language:HTML 2.0%