edit checkDistance

This commit is contained in:
Mustache Dom committed 2026-01-19 00:46:49 -07:00
1 parent df9584711a
commit fb500dc502
16 files changed
+52 -88

No files matched your search

+2 -4
View File
@@ -31,8 +31,7 @@ GlobalState.MDDrugsLocations = Locations
Bridge.Callback.Register('md-drugs:server:payfortruck', function(source, loc)
local src = source
if timeOut(src, 'md-drugs:server:payfortruck') then return false end
if not checkDistance(src, Locations.Oxy.OxyPayForTruck[loc].loc, 2.0) then
Bridge.Prints.Warn(src, Bridge.Language.Locale('Catches.notIn'), "error")
if not checkDistance(src, Locations.Oxy.OxyPayForTruck[loc].loc, 2.0, 'md-drugs:server:payfortruck') then
return false
end
if not Bridge.Framework.RemoveAccountBalance(src, 'cash', prices.payfortruck) then
@@ -55,8 +54,7 @@ RegisterServerEvent('md-drugs:server:giveoxybox', function()
return
end
if not checkDistance(src, Locations.Oxy.oxylocations[onRoute[src].current], 3.5) then
Bridge.Notify.SendNotify(src, Bridge.Language.Locale('Catches.notIn'), "error")
if not checkDistance(src, Locations.Oxy.oxylocations[onRoute[src].current], 3.5, 'md-drugs:server:giveoxybox') then
return
end