π FX-TRADE β
Advanced player-to-player trading system for RedM with secure exchange, distance checks, request system, and full framework compatibility.
π¦ INSTALLATION β
ensure fx-tradeβ’ Place the script inside resources/fx-trade β’ Add ensure fx-trade to your server.cfg β’ Restart your server
βοΈ BASIC SETTINGS β
Config.Language = "en"
Config.OpenTradeCommand = "trade"β’ Language β system language β’ OpenTradeCommand β command to open trade menu β’ Set false β disable command
π― PLAYER SELECTION SYSTEM β
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 β
Config.CanInteract = function(src,target,cb)β’ Server-side distance check β’ Ensures players are close enough β’ Prevents exploit trading
if distance < 5 then
retval = true
endβ’ Final validation distance β’ Trade allowed only if players are nearby
π¬ LOCALE SYSTEM β
Config.Locale = {
["en"] = {
["cancarry"] = "...",
}
}β’ Defines all system messages β’ Fully customizable β’ Supports multi-language
π NOTIFY SYSTEM β
Notify({
text = "Successful trade!",
type = "success"
})β’ Framework-based notification system β’ Supports VORP / RSG / REDEMRP β’ Automatically adapts to framework
π§ VALIDATION SYSTEM β
["invalidAmount"] = "Entered Invalid Amount!"β’ Prevents invalid input β’ Stops incorrect item amounts β’ Protects trade system
["notready"] = "You're not fit for trade!"β’ Blocks trade if player is busy β’ Ensures both players are ready
["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
