The robbery and police system is completely configurable and simple within config.lua.
Basic configuration
The basic configuration of polices and alarms will be configured as follows by default.
Read each comment within the configuration to understand what to do in each configuration.
Config.StartAlarm =true-- Alarm sound, if you do not enable this, the dispatch will not appearConfig.StartAlarmChance =25-- Percentage for the alarm to soundConfig.ReqPolice =true-- Do you want police in your city to enable robberies?Config.ReqPoliceCount =5-- Minimum police to start a robberyConfig.ReqJobPolice ='police' -- Police job nameConfig.RefreshPolice = 1000 -- Ammount of time to check por police count again, higher for more performance, don't use below 1000ms
Dispatch configuration
If the alarm is false, it will never launch a dispatch.
Once we configure this section, we can go directly to configure the percentage of probability for the alarm to sound, if the alarm sounds, it will launch a dispatch, which is in client/custom/dispatch/*.lua.
You can completely remove the inside of the event and add your own dispatch.