NX Dumpster Diving

Security

The server-side anti-exploit protection and its settings.

All loot and money is handled on the server. The client only asks to search or sell, and the server decides whether that's allowed. This stops the common cheats used on job and loot scripts.

What's checked

  • The player is actually standing next to the dumpster or buyer, alive and not in a vehicle.
  • The search took the full time. Finishing early is impossible without a modified client and gets logged.
  • The dumpster isn't on cooldown. It's matched by distance, so nudging the position slightly doesn't get around it.
  • Two players can't search the same dumpster at the same time.
  • Only items in Config.Pawn.prices can be sold, in whole amounts the player really has.
  • Money is only paid after ox_inventory confirms the items were removed, so spamming or overlapping sell requests can never pay twice.
  • Searches per hour and sell actions are rate limited.

Settings

config.lua
Config.Security = {
    logExploits = true,
    dropOnExploit = false,
    maxSearchesPerHour = 120,
    dumpsterRadius = 2.0,
    actionDelay = 300,
}
logExploitsbooleandefault: true
Print a warning in the server console when someone does something only a cheat could do.
dropOnExploitbooleandefault: false
Also kick the player when that happens.
maxSearchesPerHournumberdefault: 120
Max searches per player per hour. 0 means no limit.
dumpsterRadiusnumberdefault: 2.0
Searches this close to a dumpster on cooldown count as the same dumpster.
actionDelaynumber (ms)default: 300
Minimum time between sell actions, to stop spam.

Exploit logs

When something suspicious happens, you'll see a line like this in the server console:

server console
[nx-dumpsterdiving] Possible exploit by PlayerName (12) [license:abc123...]: finished a search in 1200ms (needs 7500ms)

It includes the player's name, server ID and license so you can look into it or ban them with your admin tools.

Recommended

Keep dropOnExploit off for the first few days and watch the logs. Once you're happy there are no false alarms on your server, turn it on.