Hello FiveM community!
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.
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:
- 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. - Server Side (
server.lua
): Manages server-side logic, including synchronization and reward distribution. It ensures all players are aware of ongoing robberies. - Resource Manifest (
fxmanifest.lua
): Defines the resource and includes necessary metadata.
Setup Guide:
- Download the Script:
- Ensure you have the three main files:
client.lua
,server.lua
, andfxmanifest.lua
.
- Add to Resources:
- Place these files in a new folder within your
resources
directory, for example,simple_robbery
.
- 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'
}
- Configure
ps-dispatch
:
- Ensure
ps-dispatch
is installed and properly configured on your server. This script will use it to alert police during robberies.
- Start the Resource:
- Add
start simple_robbery
to yourserver.cfg
file to ensure the script starts with your server.
- Customization:
- Open
client.lua
andserver.lua
to customize robbery locations, rewards, and other settings to fit your server’s needs.
![image](https://forum-cfx-re.akamaized.net/original/5X/0/d/6/0/0d607288fed51648fe2620ab5807c6e22034553b.png)