Skip to content

πŸ”„ FX-TRADE ​

Advanced player-to-player trading system for RedM with secure exchange, distance checks, request system, and full framework compatibility.


πŸ“¦ INSTALLATION ​

bash
ensure fx-trade

β€’ Place the script inside resources/fx-trade β€’ Add ensure fx-trade to your server.cfg β€’ Restart your server


βš™οΈ BASIC SETTINGS ​

lua
Config.Language = "en"
Config.OpenTradeCommand = "trade"

β€’ Language β†’ system language β€’ OpenTradeCommand β†’ command to open trade menu β€’ Set false β†’ disable command


🎯 PLAYER SELECTION SYSTEM ​

lua
Config.PlayerSelectionTime = 15
Config.PlayerSelectionDistance = 10

β€’ PlayerSelectionTime β†’ time to select player (seconds) β€’ PlayerSelectionDistance β†’ max distance to select player β€’ Prevents random or long-distance trades


🧠 INTERACTION CHECK SYSTEM ​

lua
Config.CanInteract = function(src,target,cb)

β€’ Server-side distance check β€’ Ensures players are close enough β€’ Prevents exploit trading


lua
if distance < 5 then
  retval = true
end

β€’ Final validation distance β€’ Trade allowed only if players are nearby


πŸ’¬ LOCALE SYSTEM ​

lua
Config.Locale = {
  ["en"] = {
    ["cancarry"] = "...",
  }
}

β€’ Defines all system messages β€’ Fully customizable β€’ Supports multi-language


πŸ”” NOTIFY SYSTEM ​

lua
Notify({
  text = "Successful trade!",
  type = "success"
})

β€’ Framework-based notification system β€’ Supports VORP / RSG / REDEMRP β€’ Automatically adapts to framework


🧠 VALIDATION SYSTEM ​

lua
["invalidAmount"] = "Entered Invalid Amount!"

β€’ Prevents invalid input β€’ Stops incorrect item amounts β€’ Protects trade system


lua
["notready"] = "You're not fit for trade!"

β€’ Blocks trade if player is busy β€’ Ensures both players are ready


lua
["playerquit"] = "The player you're trading with has left the game!"

β€’ Cancels trade if player disconnects β€’ Prevents item loss


⚠️ IMPORTANT NOTES ​

β€’ Players must be close to trade β€’ Both players must be active β€’ Trade cancels if player leaves β€’ Distance checks are enforced server-side β€’ Invalid inputs are blocked automatically


🚨 COMMON MISTAKES ​

β€’ Trade not opening β†’ wrong command β€’ Cannot select player β†’ distance too far β€’ Trade canceled β†’ player moved away β€’ Invalid amount β†’ wrong input β€’ Trade fails β†’ player not ready


🏁 SUMMARY ​

FX-TRADE provides:

β€’ Secure player trading system β€’ Distance-based validation β€’ Anti-exploit protection β€’ Multi-framework support β€’ Real-time trade control


Β© Fixitfy Development

⚑ Premium RedM scripts crafted with performance & quality in mind.