CritteR's Busted! Minigame

CritteR’s Busted! Minigame is my interpretation of the classic GTA IV multiplayer event: Busted.
It’s Cops ‘n’ Robbers style minigame, where one player (the Robber) has to evade being caught by the other players (the Cops) for a set amount of time, before escaping to a final checkpoint.

Types of players:

There are 3 player types for the minigame:

  • The Robber:
    1 Player, chose at random from the players that want to. If there are more than one player that wants to play robber, the last Robber player of the lobby will not be selected.
  • The Heli(copter):
    1 Player, chose at random from the players that want to. If there are more than one player that wants to play robber, the last Heli player of the lobby will not be selected. The Heli is considered a Cop.
  • The Cops:
    All the other players in the lobby.

Minigame Phases:

1. The Grace Period This is the first phase of the minigame. In this phase, the Robber cannot be busted by the Cops, and the Cops have a speed handicap. This gives the Robber an advantage before the next phase. This phase lasts 30 seconds by default (configurable per lobby).

2. The Pursuit Phase In the main phase of the minigame, the Robber has to drive (or hide!) around the map, for a set amount of time (configurable per lobby), while avoiding being caught by the Cops. The Robber can be seen on the minimap as long as any of the cops can see them (configurable).

3. The Escape Phase In the final phase, the Robber has to reach the Escape Checkpoint (marked on the map only to them), while avoiding being caught by the Cops. There is no time limit for this phase. Reaching the escape checkpoint is the Win Condition for the Robber.

Built for every server:

The resource was built and tested on the latest DLC (b3407). All the entities are spawned server-side, all the routing buckets used are set to lockdown mode “strict” or “relaxed” (when AI traffic is allowed in the lobby).
It supports Pure Mode, Entity Lockdown and Network Ownership Restriction.

It is compatible with regular vMenu servers and with RP frameworks. It should be compatible with you “guardian” resources, but don’t quote me on that. I don’t use those. (client-side scripts use SetEntityInvincible() and FreezeEntityPosition(), plus camera functions.)

Outside Connections:

As with all my scripts, every UI and HUD element is fully opened and commented, so you can modify it to fit your server. In addition to that, the resource opens a couple of functions and events that help you integrate this minigame into your server seamlessly:

CalculatePlayerPoints(player) function Logic function used to calculate the points won by the player at the end of the minigame. player is an array.
PreferredPlayerName(source) function Function that provides the player source, and expects a string return, which will be used as the player name.
IsPlayerAllowedToPlay(source) function Function that provides the player source, and expects a bool return, to give the player the permission to play.
IsPlayerAllowedRobber(source) function Function that provides the player source, and expects a bool return, to give the player the permission to play as Robber.
IsPlayerAllowedHeli(source) function Function that provides the player source, and expects a bool return, to give the player the permission to play as Heli.
IsPlayerAllowedCop(source) function Function that provides the player source, and expects a bool return, to give the player the permission to play as Cop.
PlayerJoinedTheLobby(source, data) function Function that runs whenever a player joins a lobby.
PlayerIsOutOfLobby(source, data) function Function that runs whenever a player leaves a lobby.
& and many more!

Installation and commands:

  • Install the database table from public > [db]. You need ox_mysql for this. If you don’t use that, check mysql_functions.lua and rewrite the saving / loading functions to suit your needs.
  • Use [/joinbusted] to join a lobby, or [/leavebusted] to leave the game at any time. Commands are open in client_connection.lua.

Other Features:

  • Multi-lobby support: You can configure multiple lobbies, both Public and Private (password protected), allowing multiple rounds for Busted! to be played at the same time.

  • Multi-language support: All the texts are available in the sh_locales.lua file, allowing you to add as many languages as you want. Each player can choose their preferred language.
    Supports :uk: English and :romania: Romanianby default.

  • Custom Vehicles support: By default you can configure different vehicle models for Robber and Cops, but with the helper functions in server_connection.lua, you can write your own logic for Robber / Cop vehicles, including the ability to read player vehicles and tuning from the database.

  • Points System & Leaderboard: The minigame automatically saves player’s games played and won, both for Cop and for Robber match, but also includes a Points variable, which is open for you to write the logic for. By default it gives 3 points when you win, 1 point when you lose, and 1 additional point when you play as Robber.

Go get it!

[[ BUY IT NOW FROM TEBEX! (€14.99) ]]

Support:

Feel free to reach out to me on the forums, or through Tebex if you need any help, or have any issues with the script. I will gladly explain to you what to change in order to connect this resource to your server, but I cannot tell you how exactly to connect it to your framework, as I don’t use them.

Screenshots:

Lobby Menu:


Gameplay:



Other UX:


Code is accessible UI and HUD - YES / Game logic - NO
Subscription-based No
Lines (approximately) ~4500
Requirements ox_mysql or similar data saving resource
Support Yes
9 Likes

nice work bro !

1 Like

Great job. Tested even when was in BETA version, tested also now after release. It’s really impressive. It’s fun and sometimes you forget to take a break from it :smiley: . Congrats & Thanks CritteR for this work. I already got it installed on my server!

1 Like

Congratulations on the hard work—it’s clear this is a quality product. I’ve tested it and currently have it active on my server. First of all, I want to highlight the incredible attention to detail. That’s one of the things I really appreciate about Critter: he’s not doing this for the money, but out of passion for the game and the desire to create something like “Busted” for everyone to enjoy.

Once again, congratulations on this amazing script. I’m definitely looking forward to more releases of the same caliber. I highly recommend having this on your server—it’s super engaging, and if you’ve got around 5–6 people, it’s incredibly fun.

Good luck, Critter! :rocket:

2 Likes

Update v1.0.2


:wrench: fix: Code cleanup and various fixes not announced in v1.0.1


:warning:This update changes the following files:

  • All private files.
  • fxmanifest.lua

Update v1.0.3


:pushpin: feat: Added the possibility of only joining Busted from the map location (where you get teleported after leaving the lobby). This fixes the “exploit” of teleporting from everywhere on the map to the map location.

:pushpin: feat (in 1.0.2 already): You can now add a list of escape locations, instead of having only one predefined location.

:wrench: fix: Hopefully fix an issue where the minigame starts before players are fully loaded. This is especially important for users with Low end PCs, or for servers that use unoptimized addon vehicles.


:warning:This update changes the following files:

  • All private files.
  • /public/client/client_connection.lua (for the map location feat)
  • /public/shared/sh_locales.lua (check --1.0.3 comment)
  • config.lua (check --1.0.3 comments)
  • fxmanifest.lua

Update v1.0.4


:pushpin: feat: Added copPredefinedSpawns table in the Config, to allow you to set…well… predefined cop spawns, when the minigame starts. Having predefined spawns allows you to have more stable and predictable games, since you won’t have to rely on the automatic spawn system.

:wrench: fix: Correctly restart lobbies after a game is finised (this is related to the fix on the previous update).

:wrench: fix: Fix an issue where automatic spawnpoint would not work, if the previous game finished far away from the bank.


:warning:This update changes the following files:

  • All private files.
  • config.lua (check --1.0.4 comment)
  • fxmanifest.lua

Awesome game mode and well made! Critter is also an awesome guy that helped with some debug stuff (my screw ups LOL)

Update v1.0.5


:wrench: fix: Fix an issue where players would sometimes desync, and their vehicles would not get locked & unstuck when the game started.


:warning:This update changes the following files:

  • All private files.
  • config.lua (check --1.0.5 comment)
  • fxmanifest.lua