Simple Robbery Script For QB Core Servers (works with PS-Dispatch)

Hello FiveM community! :star2:

I’m excited to share a simple yet effective robbery script for your FiveM server! This script allows players to perform robberies at designated locations and integrates seamlessly with the popular ps-dispatch system to alert police during a heist. :rotating_light::man_police_officer:

Key Features:

  • Robbery Functionality: Players can initiate and complete robberies at specified locations.
  • Police Alerts: Uses ps-dispatch to notify police when a robbery is in progress.
  • Configurable Settings: Easily customize robbery locations and other parameters.

How It Works:

  1. Client Side (client.lua): Handles the player’s interaction with robbery points. When a player starts a robbery, a dispatch alert is triggered to notify the police.
  2. Server Side (server.lua): Manages server-side logic, including synchronization and reward distribution. It ensures all players are aware of ongoing robberies.
  3. Resource Manifest (fxmanifest.lua): Defines the resource and includes necessary metadata.

Setup Guide:

  1. Download the Script:
  • Ensure you have the three main files: client.lua, server.lua, and fxmanifest.lua.
  1. Add to Resources:
  • Place these files in a new folder within your resources directory, for example, simple_robbery.
  1. Update fxmanifest.lua:
  • Ensure it includes the necessary scripts and dependencies. Your fxmanifest.lua should look like this:

lua

Copy code

fx_version 'bodacious'
game 'gta5'

client_scripts {
    'client.lua'
}

server_scripts {
    'server.lua'
}
  1. Configure ps-dispatch:
  • Ensure ps-dispatch is installed and properly configured on your server. This script will use it to alert police during robberies.
  1. Start the Resource:
  • Add start simple_robbery to your server.cfg file to ensure the script starts with your server.
  1. Customization:
  • Open client.lua and server.lua to customize robbery locations, rewards, and other settings to fit your server’s needs.



image

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.