Matchmaking System

This is our matchmaking system, allowing users to create 1v1/2v2/3v3 systems in game and queue with other random users. This script is very lightweight and simple, but gamechanging!

Features :

  • Fully utilizes ox_lib for notifications, callbacks, and optimized functionality.

  • Fully optimized and coded in CFX Lua v5.4 using up-to-date syntax.

  • Easy installation with provided .sql file.

  • Players can create lobbies with specified match types and weapons.

  • Each lobby has a unique ID and is assigned a host player.

  • Players can join existing lobbies.

  • Automatic checks for required player count before starting matches.

  • Dynamically assigns players to two teams (Team1 and Team2).

  • Randomized ramp sets are selected from the configuration for each match.

  • Teleports players to predefined team-specific ramp positions.

  • Configurable countdown timers with notifications before matches begin.

  • Freezes players during countdown and unfreezes them when matches start.

  • Sends match-specific data to players, including team, weapon, and match ID.

  • Tracks player states (alive or dead) in real time.

  • Integrates ESX death detection using esx:onPlayerDeath.

  • Automatically revives dead players during resets and after matches.

  • Scoring system for both teams, awarding points when the opposing team is eliminated.

  • Configurable win condition (e.g., first team to reach a specific score).

  • Ends matches automatically when win conditions are met, declaring a winner.

  • Resets player positions and revives dead players after each round.

  • Performs synchronized freezing and countdowns during resets.

  • Automatically teleports all players to a default spawn and resets routing buckets after matches.

  • Customizable notifications for an immersive UI experience.

  • Configurable via a Config file:

    • Custom ramp positions and default spawn locations.

    • Match types and required player counts.

    • Win conditions, countdown durations, and reset delays.

    • Default routing bucket for post-match resets.

    • Dynamically selects ramp sets for variety in matches.

  • Server-side freezing and unfreezing ensures synchronization for all players.

  • Cleans up all match-specific data after matches end.

  • Leaderboard system to track top players based on matchmaking_wins.

  • Random join button allows players to join random lobbies easily.

  • Checks every 1 minute if all matches are empty, and they will automatically be deleted.

  • Added a check for playerDropped to automatically end the match.

  • If not in routing bucket 0, it will not allow them to join the match.

  • If in a game and does /matchmaking, the only option that shows is "leave match."

  • Fixed leaderboard not working.

Purchase :

https://dev.paidservers.com/product/6741924

Showcase :

Last updated