Giter Site home page Giter Site logo

qb-lapraces's Introduction

qb-lapraces

Race Track Creation For QB-Core

License

QBCore Framework
Copyright (C) 2021 Joshua Eger

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <https://www.gnu.org/licenses/>

qb-lapraces's People

Contributors

antonstjernquist avatar berkiebb avatar darknight2590 avatar evanillaa avatar ghzgarage avatar idrisdose avatar jay-fivem avatar newtonzz avatar s33g avatar theilleniumstudios avatar z3rio avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

qb-lapraces's Issues

[BUG] Error before making a runway!

I want to start racing and then it throws me an error like this:
@qb-lapraces/server/main.lua:238: attempt to index a nil value (field '?')

Players can have different timers than each other

Players can have different timers than each other. I believe Ping effects the racing timer which leaves players with Higher Ping getting much quicker results than other players who finish the race at the same time.

[bug]

  • newly update everything
    -unable to create races, no buttons work
    FiveM_-_Free_City_11_3_2021_6_40_43_PM

end of race leaderboard/payout

Hello. I've been trying this for a while but I'm trying to get it so when there are more than 5 people who start a race, police can be alerted, and also when there are more than 5 in a race, there is a payout for 1st, 2nd, and 3rd. I got close but every time people finished the race, it thought each person was coming in first since they left the race upon completion. Are you able to help or implement something where that is configurable?

Setting up new whitelist creator

What name is necessary to give a player access to race creation? I see the line in config.lua and have added a player to the list using his steam name but it is not working for us. He still get the message he does not have permission to create a track. Here is what I've done:
Config = Config or {}

Config.WhitelistedCreators = {
"PUTCID",
"StreetRacer1748",
}

Config.RaceSetupAllowed = true

The player "StreetRacer1748" is who I am trying to add to the list. I can make tracks as an admin but we do not want to give admin perms just for racing. Thanks.

[SUGGESTION] Pay In/Pay Out

Maybe it's a great option to add a kinda payment system. So when people join they have to pay a fee that's set by the host of the race. If they join the race, it will be automatically be removed from their bank (or cash). And if the race finishes, the top 3 gets some of the full amounts of the race.

[BUG] Possible Bug with IsWhitelisted

Describe the bug
I don't think IsWhitelisted is correct:

local function IsWhitelisted(CitizenId)

To Reproduce
See the above code, specifically line 32 and 33. I believe Perms is a table, and line 33 compares it to a string (if Perms == "admin" or Perms == "god"). This comparison always returns false. When I run QBCore.Debug on Perms, I get this:

[ script:qb-core] [ qb-core : DEBUG]
[ script:qb-core] god: true
[ script:qb-core] admin: true
[ script:qb-core] mod: true
[ script:qb-core] [ END DEBUG ]

So I don't think line 33 is correct. I would think it would be something like if Perms["god"] ~= nil then, but I am not a Lua developer.

Expected behavior
This method should be able to detect that I am an admin, but it cannot.

Screenshots
N/A

Questions (please complete the following information):

  • When you last updated: About two weeks ago.
  • Are you using custom resource? No.
  • Have you renamed qb- to something custom? No.

Additional context
This potential bug is preventing our admins from making races.

[BUG]

hi i cant start races alone on my local host
image

Laptime record won't count if on the last lap

How to replicate:

  1. Create a small/short circuit
  2. Start a 3 lap race with that circuit
  3. For laps 1 and 2, drive your car slowly
  4. For lap 3, drive faster than you did in 1 and 2 to ensure you're getting the fastest lap time of the race session
  5. Cross the finish line on your 3rd and final lap with the fastest time
  6. Check the timing HUD and see that the lap time on your 3rd lap was not counted as the fastest one (it counts the previous fastest)
  7. Same as #6, opening the racing app shows the slower lap time as the lap time record

Joining a race

Describe the bug
When trying to join a race I had setup, won't allow me to join the race.

To Reproduce
Steps to reproduce the behavior:

  1. Open phone
  2. Open racing app
  3. Setup race
  4. Try to join race
  5. See it's not allowing you to join
  6. Check console
  7. See error "[ script:qb-lapraces] SCRIPT ERROR: @qb-lapraces/server/main.lua:238: attempt to index a nil value (field '?')"

Expected behavior
Should be able to join the race and then be able to start the race

Screenshots
What I did: https://youtu.be/nExAyzzNyYE
Error: https://media.discordapp.net/attachments/1025544749781893251/1030165602180018296/unknown.png?width=679&height=68
Line 238-254 in qb-lapraces/server/main.lua: https://media.discordapp.net/attachments/1025544749781893251/1030167420511473694/unknown.png?width=891&height=294

Questions (please complete the following information):

  • When you last updated: just setup a qbcore sever less then 2 weeks ago / this is the newest version of qb-lapraces reinstalled it just to make sure
  • Are you using custom resource? which ones? for racing no
  • Have you renamed qb- to something custom? No

Additional context
I haven't changed anything inside of qb-lapraces other then adding my cid to allow me to make races. I assume it's something at line 238 or after because of the error. Not seeing any errors when starting server up

[BUG] last lap Records

Describe the bug
If you beat the record in a lap and you beat it again in the last lap it won't count the last lap record. ( i guess if you just beat it in the last lap it doesn't count either)

My guess is simply that it uses the best round time before it's being updated to be the last lap's time (if it even is ever updated in that case)

To Reproduce
Steps to reproduce the behavior:

  1. Create a new race with 2 laps
  2. Start the race and be faster in the 2nd lap than the first
  3. it should say you set the record but with the time you had in the first lap

Expected behavior
It should count your second lap as the record

Screenshots
image
kinda hard to see but yeah

Questions (please complete the following information):

  • When you last updated: i downloaded the repo like 2 days ago
  • Are you using custom resource? which ones? hum yeah but it's not relevant 🤷🏻
  • Have you renamed qb- to something custom? no

I can't create a track

Ảnh chụp màn hình (15)
Describe the bug
A clear and concise description of what the bug is. A stranger to qbcore should be able to read your bug report and understand how to reproduce it themselves and understand how the feature should work normally.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Use this item '....' (item's name from shared.lua if applicable)
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Questions (please complete the following information):

  • When you last updated: [e.g. last week]
  • Are you using custom resource? which ones? [e.g. zdiscord, qb-target]
  • Have you renamed qb- to something custom? [e.g. yes/no]

Additional context
Add any other context about the problem here.

[SUGGESTION] Position

Describe the feature you'd like
A Real time position (like in every single race game ever)

Additional context
I know snaa did something like that recently so maybe look at that

[SUGGESTION] Position display

Position of the racer is not displayed when you race. You never know what place you are untill you finish or everyone finishes the race.

Not delivering fobs based on user ID

Describe the bug
new fobs are not being given to the individual when attempting to create based on player ID instead of CID. Adds fob to admin's inventory not players. Have not tested for master fobs. Does not work with CID either

To Reproduce
Steps to reproduce the behavior:
attempt to create basic racing fobs for multiple people based on player ID (this is the only reasoning I can deduce)
Fob appears in creator's inventory instead of intended players

Expected behavior
Fob appears in recepient's inventory

Screenshots
If applicable, add screenshots to help explain your problem.

Questions (please complete the following information):

  • When you last updated: 2 months
  • Are you using custom resource? which ones? we use target but not for racing fobs
  • Have you renamed qb- to something custom? no

Additional context
recently occurred, looking at possible reasons

[BUG]

Hi there!

Keep getting qb-lapraces/server/main.lua:238: attempt to index a nil value (field '?') when we attempt to join a created race!

Any idea what might be causing this?

Countdown repeating per player / per instance of race

Hey I have a strange issue with this one.

When you start a race, the countdown will loop for every player in the race.
For example: If there are 5 players, it will do the countdown 5 times, for every player.
However the race timer starts after the first countdown has elapsed.

It will only unfreeze once all countdowns have gone through.

PS:
I was testing it myself, restarting the script. And it seems to add a new countdown every time I start a new race.
Example:
Fresh Server Boot ->
Setup Race - > Start it
Only one countdown.
Finish the race.

Setup the Race again
Start it
There's two countdowns for me this time.
Finish the race.

Setup the Race Again,
Start it
There was three countdowns for me this time.

I'm unsure how to fix it!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.