Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Variable for exploit distance check #516

Closed
wants to merge 1 commit into from

Conversation

Jamie9192
Copy link

Many complain about false bans. Just increase this number a little.

Describe Pull request
First, make sure you've read and are following the contribution guidelines and style guide and your code reflects that.
Write up a clear and concise description of what your pull request adds or fixes and if it's an added feature explain why you think it should be included in the core.

If your PR is to fix an issue mention that issue here

Questions (please complete the following information):

  • Have you personally loaded this code into an updated qbcore project and checked all it's functionality? [no] (Be honest)
  • Does your code fit the style guidelines? [yes]
  • Does your PR fit the contribution guidelines? [yes]

Many complain about false bans. Just increase this number a little.
Copy link
Contributor

@nick-perry14 nick-perry14 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice idea to quell complaints, but these need to be config variables.

@@ -7,6 +7,7 @@ local FingerDrops = {}
local Objects = {}
local QBCore = exports['qb-core']:GetCoreObject()
local updatingCops = false
local exploit_distance_check = 2.5 -- If you are getting exploit bans, increase this number
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be as a config variable. If you want it user-editable, please place it there.

@@ -711,7 +712,7 @@ RegisterNetEvent('police:server:TakeOutImpound', function(plate, garage)
local playerPed = GetPlayerPed(src)
local playerCoords = GetEntityCoords(playerPed)
local targetCoords = Config.Locations['impound'][garage]
if #(playerCoords - targetCoords) > 10.0 then return DropPlayer(src, 'Attempted exploit abuse') end
if #(playerCoords - targetCoords) > exploit_distance_check * 4 then return DropPlayer(src, 'Attempted exploit abuse') end
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Magic Number here - I understand why it's *4 but in this case, it would probably be better to just make a separate "impound_exploit_distance_check". Because 10 may be enough but the 2.5 for other things may not.

Copy link

This PR has had 60 days of inactivity & will close within 7 days

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants