Skip to content
This repository was archived by the owner on Aug 18, 2020. It is now read-only.

Commit c755a74

Browse files
authored
Merge pull request #8 from blockba5her/v2.1
v2.1 Update
2 parents a47a6cc + 6ea0118 commit c755a74

88 files changed

Lines changed: 4702 additions & 1935 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,11 @@ luac.out
4040
*.yml
4141
*.userprefs
4242

43-
# Annoying files
44-
src/.vs/DispatchSystem/v15/sqlite3/storage.ide
45-
4643
# Build folders
4744
src/Client/obj/*
4845
src/Server/obj/*
4946
src/Common/obj/*
47+
src/DumpUnloader/obj/*
5048
src/bin/*
5149
.vs/*
52-
src/.vs/*
50+
src/.vs/*

README.md

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
1-
# Dispatch Systems
1+
# DispatchSystem
2+
3+
Discord:
24

35
[![Discord](https://discordapp.com/api/guilds/358081805850640384/widget.png)](https://discord.gg/ZcTayce)
46

5-
> Dispatch Systems is a CAD/MDT system for ingame FiveM use, this is not a permenant solution, but it works for free. This is an open source free project courtesy of BlockBa5her (the coder). It is free for anyone to use, as long as they do not re-distribute the software under their own name. It does not store data in CouchDB and MySQL so EssentialMode is not needed. It stores all of the player's information in the RAM of the computer, so the next restart of the server clears all of the names that it has stored. It now also comes with database settings for saving Civilian Profiles and Vehicles to 2 files.
7+
## Summary
8+
9+
Dispatch Systems is a CAD/MDT system for ingame FiveM use, this is not a permenant solution, but it works for free. This is an open source free project courtesy of BlockBa5her (the coder). It is free for anyone to use, as long as they do not re-distribute the software under their own name. It does not store data in CouchDB and MySQL so EssentialMode is not needed. It stores all of the player's information in the RAM of the computer, but saves all of the data once the server is restarted. It now also comes with storage settings for saving Civilian Profiles and Vehicles in a file.
610

711
## Uses
812

@@ -14,7 +18,7 @@
1418
* C# with open source code
1519
* Availability to everyone, not just people who pay
1620
* Open for suggestions and always looking for more to add-on too
17-
* Will always stay non-SQL/CouchDB based for easy use (with included database settings)
21+
* Will always stay non-SQL/CouchDB based for easy use (with included storage settings)
1822

1923
## Pictures
2024

@@ -26,18 +30,17 @@
2630
<a href="https://i.gyazo.com/78258256b01b67ce32d8bbe602b20866.png"><img src="https://i.gyazo.com/78258256b01b67ce32d8bbe602b20866.png" width="500" alt="Tickets and Notes"></img></a>
2731
<a href="https://i.gyazo.com/e4b5ce6ca98c82fcc85739443037922e.png"><img src="https://i.gyazo.com/e4b5ce6ca98c82fcc85739443037922e.png" width="500" alt="Dispatch Main"></img></a>
2832
<a href="https://i.gyazo.com/b9578ed701735082606ca0fe140317f2.png"><img src="https://i.gyazo.com/b9578ed701735082606ca0fe140317f2.png" width="500" alt="Dispatch BOLO"></img></a>
33+
<a href="https://i.imgur.com/a0WEauz.png"><img src="https://i.imgur.com/a0WEauz.png" width="500" alt="Civ menu display"></img></a>
34+
<a href="https://i.imgur.com/h6waE4d.png"><img src="https://i.imgur.com/h6waE4d.png" width="500" alt="Leo menu display"></img></a>
2935

3036
## Commands
3137

32-
### ---Civilian Commands---
33-
34-
* `/civ` - Opens the civilian NUI menu In-game
35-
36-
### ---Police Commands---
37-
38-
* `/leo` - Opens the officer NUI menu In-game (Can be used to for other emergency personel)
38+
* `/dsciv` - Opens the civilian NUI menu In-game
39+
* `/dsleo` - Opens the officer NUI menu In-game (Can be used to for other emergency personel)
40+
* `/dsdmp` - Dumps all of the info of DispatchSystem into a file labeled `dispatchsystem.dmp` in the root directory, please only use if DispatchSystem is not working properly.
3941

4042
## In the works
4143

4244
1. Arrest ability - `/arrest {first} {last}` arrests a ped and show it in the system
4345
2. Warrant Types - `/warrant {type}` have different types of bench warrants and also a toggle for outstanding
46+
3. Bug fixes - There seems to be a lot of bugs that popped up in v2.0 of DispatchSystem, I'm hard at working trying to fix all of them

docs/api.md

Lines changed: 0 additions & 158 deletions
This file was deleted.

docs/building.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ These errors have not occured with anyone, but I just want to make sure that the
88

99
* Both project file say that there are missing dependencies/references
1010
1. Just add both of the references back to the right project, the references can be found in the `ref` folder in the clone
11+
2. Sometimes the NuGet packages are weird and don't follow the clone, so just download the package CloNET & MaterialSkin again.
1112
> TODO: More to add once more errors popup
1213
1314
## Build location

docs/installation.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Installation guide
2+
3+
## Deciding options
4+
Decide what options you would want to have on your server. The most important things to decide on are the database feature, and the server feature. They are both togglable in the server's `settings.ini` file. The server feature is what allows the client to connect to the server, and the database is where it stores all of your data on restart.
5+
6+
## Basic installation
7+
To install all of the stuff on the server, you can make a drag and drop the resource folder `dispatchsystem` inside of the download folder inside of your `resources/` folder. From there, you can go inside of the resource folder and change all of the `ini` settings. Now all that's left to do is put the resource inside your `server.cfg`
8+
9+
## Client installation
10+
To install the client is easy. All you have to do is make sure that the `dispatchsystem` resource has the `server` setting enabled. After that, just make sure that you have port `33333` open to use (If on web hoster or VPS it's already open). Now, you just have to configure your client's settings so that the IP matches with the IP that your FiveM server is run off of.
11+
12+
## Common issues
13+
A lot of issues have been appearing with DispatchSystem lately. That is why I integrated the `/dsdmp` command to allow you to dump your server information to a file, and delete the rest of the info on the server. The `dispatchsystem.dmp` file that is exported in the dump process is located at the root of your FiveM directory.

docs/server.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
# Setting up the Server
22

33
## Toggling the server
4-
54
Basically, just open up the `settings.ini` that comes with the server, and change the option under the `[server]` tag that says `enable` to `0`
65

76
## Setting up the server
8-
97
Don't change any settings in the INI, unless you are having problems. All of the settings in there should work with your average joe
108

119
## Setting up the client
12-
1310
In the `settings.ini`, change the the IP of the server to the IP of your server, and keep the PORT the same unless you changed it on the server's side
1411

12+
## Toggling the database
13+
In the `settings.ini` of the server, change the `database` option to 0.
14+
1515
## Ports to have open
1616

17-
If you are running this off a basic home internet, then you will need to open the PORT `33333`, and that is 5 threes just to confirm. If you are running this off a VPS or hosting website then you should be good from opening ports.
17+
If you are running this off a basic home internet, then you will need to open the PORT `33333`, and that is 5 threes just to confirm. If you are running this off a VPS or hosting website then you shouldn't have to open any ports because they are already open for you.

src/Client/App.config

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
<?xml version="1.0" encoding="utf-8" ?>
1+
<?xml version="1.0" encoding="utf-8"?>
22
<configuration>
33
<startup>
4-
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
4+
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1"/>
55
</startup>
6-
</configuration>
6+
</configuration>

src/Client/Client.csproj

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
1212
<FileAlignment>512</FileAlignment>
1313
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
14+
<TargetFrameworkProfile />
1415
</PropertyGroup>
1516
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
1617
<PlatformTarget>AnyCPU</PlatformTarget>
@@ -21,6 +22,7 @@
2122
<DefineConstants>DEBUG;TRACE</DefineConstants>
2223
<ErrorReport>prompt</ErrorReport>
2324
<WarningLevel>4</WarningLevel>
25+
<Prefer32Bit>false</Prefer32Bit>
2426
</PropertyGroup>
2527
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
2628
<PlatformTarget>AnyCPU</PlatformTarget>
@@ -30,15 +32,15 @@
3032
<DefineConstants>TRACE</DefineConstants>
3133
<ErrorReport>prompt</ErrorReport>
3234
<WarningLevel>4</WarningLevel>
35+
<Prefer32Bit>false</Prefer32Bit>
3336
</PropertyGroup>
3437
<PropertyGroup>
3538
<ApplicationIcon>icon.ico</ApplicationIcon>
3639
</PropertyGroup>
3740
<PropertyGroup />
3841
<ItemGroup>
3942
<Reference Include="CloNET, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
40-
<SpecificVersion>False</SpecificVersion>
41-
<HintPath>..\packages\CloneCommando.CloNET.0.4.2\lib\net461\CloNET.dll</HintPath>
43+
<HintPath>..\packages\CloneCommando.CloNET.0.5.4\lib\net461\CloNET.dll</HintPath>
4244
</Reference>
4345
<Reference Include="MaterialSkin, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
4446
<HintPath>..\packages\MaterialSkin.Updated.0.2.2\lib\MaterialSkin.dll</HintPath>
@@ -185,7 +187,9 @@
185187
</None>
186188
</ItemGroup>
187189
<ItemGroup>
188-
<None Include="App.config" />
190+
<None Include="App.config">
191+
<SubType>Designer</SubType>
192+
</None>
189193
</ItemGroup>
190194
<ItemGroup>
191195
<Content Include="icon.ico">

src/Client/Config.cs

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,40 +11,43 @@ namespace DispatchSystem.cl
1111
{
1212
public class Config
1313
{
14-
public static IPAddress IP { get; private set; }
14+
public static IPAddress Ip { get; private set; }
1515
public static int Port { get; private set; }
1616

17-
public static void Create(string FilePath)
17+
public static void Create(string filePath)
1818
{
19-
string[] lines = File.ReadAllLines(FilePath);
19+
string[] lines = File.ReadAllLines(filePath);
2020

2121
foreach (string[] line in lines.Where(x => !x.StartsWith(";")).Select(x => x.Split('=').Select(y => y.Trim()).ToArray()))
2222
switch (line[0])
2323
{
2424
case "IP":
2525
if (line[1] == "changeme")
2626
{
27-
MessageBox.Show("Looks like you forgot to change the config.\nPlease edit your config and then come back ༼ つ ◕_◕ ༽つ", "DispatchSystem", MessageBoxButtons.OK, MessageBoxIcon.Error);
27+
MessageBox.Show(
28+
"Looks like you forgot to change the config.\nPlease edit your config and then come back ༼ つ ◕_◕ ༽つ",
29+
"DispatchSystem", MessageBoxButtons.OK, MessageBoxIcon.Error);
2830
Environment.Exit(0);
2931
}
3032

3133
if (!IPAddress.TryParse(line[1], out IPAddress address))
3234
{
33-
MessageBox.Show("The ip address is invalid.", "DispatchSystem", MessageBoxButtons.OK, MessageBoxIcon.Error);
35+
MessageBox.Show("The ip address is invalid.", "DispatchSystem", MessageBoxButtons.OK,
36+
MessageBoxIcon.Error);
3437
Environment.Exit(0);
3538
}
3639

37-
IP = address;
40+
Ip = address;
3841
break;
39-
4042
case "Port":
41-
if (!int.TryParse(line[1], out int _Port) || _Port < 1024 || _Port > 65536)
43+
if (!int.TryParse(line[1], out int port) || port < 1024 || port > 65536)
4244
{
43-
MessageBox.Show("The port is invalid.\nMake sure it is a positive integer within 1025-65535.", "DispatchSystem", MessageBoxButtons.OK, MessageBoxIcon.Error);
45+
MessageBox.Show("The port is invalid.\nMake sure it is a positive integer within 1025-65535.",
46+
"DispatchSystem", MessageBoxButtons.OK, MessageBoxIcon.Error);
4447
Environment.Exit(0);
4548
}
4649

47-
Port = _Port;
50+
Port = port;
4851
break;
4952
}
5053
}

0 commit comments

Comments
 (0)