Put distance exploit checks in place

This is a continuation from an earlier commit

- If something is attempted to be opened without correctly registered coordinates, (most likely being called outside the script), refuse it
- If the player isn't close enough to the registered coords, refuse it

Basically, built-in distance based exploit protection for shops/stashes/sellShops
This commit is contained in:
Jim Shield
2025-09-08 18:08:17 +01:00
parent 833bc675ce
commit 02ca13bcbd
2 changed files with 40 additions and 40 deletions

View File

@@ -121,7 +121,7 @@ end
function distExploitCheck(table, src)
if not table then
--print("^1Error^7: ^1This wasn^7'^1t reigstered correctly or this is an exploit attempt^1")
print("^1Error^7: ^1This wasn^7'^1t reigstered correctly or this is an exploit attempt^1")
return false
end
@@ -138,7 +138,7 @@ function distExploitCheck(table, src)
end
if not allow then
debugPrint(src and ("^1Src ^3"..src.." ").."^1Tried to open a registered shop/stash from over the distance limit^7")
print(src and ("^1Src ^3"..src.." ").."^1Tried to open a registered shop/stash from over the distance limit^7")
return false
end