You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+6-30Lines changed: 6 additions & 30 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,6 +25,8 @@ resources/
25
25
├── index.mjs
26
26
├── client.mjs
27
27
└── resource.cfg
28
+
AltV.Net.Host.dll
29
+
AltV.Net.Host.runtimeconfig.json
28
30
server.cfg
29
31
altv-server.exe
30
32
```
@@ -105,32 +107,30 @@ but require full path import like ```import * as auth from 'client/auth.mjs';```
105
107
106
108
.NET Core SDK can be found [here](https://dotnet.microsoft.com/download). You have to install the sdk, the runtime isn't needed.
107
109
108
-
## Assembly setup (more control for server developers, probably better performance as well)
110
+
## Setup
109
111
110
112
### Create a project with Visual Studio 17 (Windows)
111
113
112
114
* Go to "File -> New -> Project..." now the Project Wizard should appear.
113
115
* In the left Column select "Installed -> Visual C# -> .NET Core".
114
-
* Now select "Console Application (.NET Core)" and choose "Name", "Location" and the "Solution name".
116
+
* Now select "Class Library (.NET Core)" and choose "Name", "Location" and the "Solution name".
115
117
* To setup the correct NuGet Packages open the Manager under "Tools -> NuGet Package Manager -> Manage NuGet Packages for Solution..."
116
118
* Select Browse and search for AltV.Net and install the packages "AltV.Net", ("AltV.Net.Async" when you need async thread save api access)
117
119
* Now go to "Project -> {Your Project Name} Properties... -> Build", here you can select the Output path where the dll should be saved.
118
120
119
121
To get the Resource running on the server, you have to create a "resource.cfg" file. Copy the resource.cfg, AltV.Net.dll and all other dependencied with your resource dll file to altv-server/resources/{YourResourceName}/.
120
122
121
-
- (For now) create empty assembly.cfg in your resource.
122
123
Boilerplate AltV.Net.Example.csproj:
123
124
```
124
125
<Project Sdk="Microsoft.NET.Sdk">
125
126
126
127
<PropertyGroup>
127
-
<TargetFramework>netcoreapp2.2</TargetFramework>
128
-
<OutputType>Exe</OutputType>
128
+
<TargetFramework>netcoreapp3.0</TargetFramework>
129
129
</PropertyGroup>
130
130
131
131
<ItemGroup>
132
132
<!--Use latest version from https://www.nuget.org/packages/AltV.Net-->
## Class Library setup (less control for server developers (don't support mysql))
188
-
189
-
### Create a project with Visual Studio 17 (Windows)
190
-
191
-
* Go to "File -> New -> Project..." now the Project Wizard should appear.
192
-
* In the left Column select "Installed -> Visual C# -> .NET Core".
193
-
* Now select "Class Library (.NET Core)" and choose "Name", "Location" and the "Solution name".
194
-
* To setup the correct NuGet Packages open the Manager under "Tools -> NuGet Package Manager -> Manage NuGet Packages for Solution..."
195
-
* Select Browse and search for AltV.Net and install the packages "AltV.Net", ("AltV.Net.Async" when you need async thread save api access)
196
-
* Now go to "Project -> {Your Project Name} Properties... -> Build", here you can select the Output path where the dll should be saved.
197
-
198
-
To get the Resource running on the server, you have to create a "resource.cfg" file. Copy the resource.cfg, AltV.Net.dll and all other dependencied with your resource dll file to altv-server/resources/{YourResourceName}/.
199
-
200
-
201
177
### Events
202
178
203
179
There is currently a single limitation that dictionaries aren't working in windows but on linux.
0 commit comments