Skip to content

Commit adc7644

Browse files
committed
improve fcnpc warnings, add missing frontmatter and also fix the linux guide
1 parent e79988f commit adc7644

File tree

2 files changed

+75
-30
lines changed

2 files changed

+75
-30
lines changed

frontend/docs/server/Installation.md

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
1+
---
2+
title: Installation
3+
sidebar_label: Installation
4+
description: Guide for transferring your gamemode from SA:MP server to open.mp server.
5+
---
6+
17
**This tutorial is for those who want to transfer their gamemode from SA:MP server to open.mp server.**
28

3-
:::note
9+
:::tip
410

5-
If you are using the FCNPC plugin, please stop for now because this plugin does not work for open.mp currently.
11+
**Good news for FCNPC users!** The legacy FCNPC plugin has been replaced with the official **open.mp NPC component**, which provides the same functionality with better performance and native integration. Simply convert your code to the built-in NPC component instead.
612

713
:::
814

@@ -274,9 +280,9 @@ Or if you prefer you can use the mixed spellings:
274280

275281
<hr />
276282

277-
- **warning 234: function is deprecated (symbol "GetPlayerPoolSize") This function is broken.**
278-
- **warning 234: function is deprecated (symbol "GetVehiclePoolSize") This function is broken.**
279-
- **warning 234: function is deprecated (symbol "GetActorPoolSize") This function is broken.**
283+
- **warning 234: function is deprecated (symbol "GetPlayerPoolSize") This function is fundamentally broken.**
284+
- **warning 234: function is deprecated (symbol "GetVehiclePoolSize") This function is fundamentally broken.**
285+
- **warning 234: function is deprecated (symbol "GetActorPoolSize") This function is fundamentally broken.**
280286

281287
Replace `GetPlayerPoolSize()` with `MAX_PLAYERS`
282288

frontend/docs/server/LinuxServerInstallation.md

Lines changed: 64 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
---
2+
title: Linux Server Installation
3+
sidebar_label: Linux Server Installation
4+
description: Comprehensive guide on installing an open.mp server on Ubuntu or another Debian based Linux.
5+
---
6+
17
**This guide contains a comprehensive guide on installing an open.mp server on Ubuntu or another Debian based Linux.
28
Whether you're a beginner or just looking to refresh your knowledge, this guide may have something useful for you!**
39

@@ -7,9 +13,9 @@ If you are using the SA:MP server and didn't convert to open.mp yet, **[please s
713

814
:::
915

10-
:::note
16+
:::tip
1117

12-
If you are using the FCNPC plugin, please stop for now because this plugin does not work for open.mp currently.
18+
**Good news for FCNPC users!** The legacy FCNPC plugin has been replaced with the official **open.mp NPC component**, which provides the same functionality with better performance and native integration. Simply convert your code to the built-in NPC component instead.
1319

1420
:::
1521

@@ -57,33 +63,54 @@ Seek online guides or your hosting provider's documentation if you're unsure how
5763
sudo useradd -M svc-omp-server
5864
```
5965

60-
4. Locking the service sccount:
66+
4. Locking the service account:
6167
- Let's prevent the service account from being used for login:
6268

6369
```
6470
sudo usermod -L svc-omp-server
6571
```
6672

67-
5. Creating a directory for the server files:
73+
5. Adding your user to the service group:
74+
- Add your current user to the svc-omp-server group so you can manage files:
75+
76+
```
77+
sudo usermod -aG svc-omp-server $USER
78+
```
79+
80+
:::warning
81+
82+
You need to log out and log back in for group changes to take effect!
83+
84+
:::
85+
86+
6. Creating a directory for the server files:
6887
- We will use the /opt directory, this is the standard location for third-party applications:
6988

7089
```
7190
sudo mkdir /opt/omp-server
7291
```
7392

74-
6. Setting permissions for the directory:
93+
7. Setting permissions for the directory:
7594
- Changing the group of the directory to match the service account:
7695

7796
```
7897
sudo chgrp svc-omp-server /opt/omp-server
7998
```
8099

81-
- Setting the g+s flag so new files inherit the correct group and remove access for others:
100+
- Give the group read, write, and execute permissions:
101+
102+
```
103+
sudo chmod g+rwx /opt/omp-server
104+
```
105+
106+
- Setting the g+s flag so new files inherit the correct group:
82107

83108
```
84109
sudo chmod g+s /opt/omp-server
85110
```
86111

112+
- Remove access for others:
113+
87114
```
88115
sudo chmod o-rwx /opt/omp-server
89116
```
@@ -92,14 +119,14 @@ Seek online guides or your hosting provider's documentation if you're unsure how
92119

93120
## Phase 2: Installing open.mp Server Files
94121

95-
7. Let's navigate to the server directory:
122+
8. Let's navigate to the server directory:
96123
- We need to move to the /opt/omp-server directory where the server will be stored:
97124

98125
```
99126
cd /opt/omp-server
100127
```
101128

102-
8. Downloading the open.mp server files:
129+
9. Downloading the open.mp server files:
103130
- Download the latest release of the open.mp server:
104131

105132
```
@@ -113,7 +140,7 @@ Seek online guides or your hosting provider's documentation if you're unsure how
113140

114141
:::
115142

116-
9. Extracting the server files:
143+
10. Extracting the server files:
117144
- Once downloaded, extract the files:
118145

119146
```
@@ -124,8 +151,8 @@ Seek online guides or your hosting provider's documentation if you're unsure how
124151

125152
## Phase 3: Configuring and Starting the Server
126153

127-
10. Installing the required x86 libraries:
128-
- Since the server runs as a 32-bit application, you need to enable 32-bit architecture support:
154+
11. Installing the required packages:
155+
- Since the server runs as a 32-bit application, you need to enable 32-bit architecture support and install screen:
129156

130157
```
131158
sudo dpkg --add-architecture i386
@@ -136,10 +163,10 @@ Seek online guides or your hosting provider's documentation if you're unsure how
136163
```
137164
138165
```
139-
sudo apt install libc6:i386
166+
sudo apt install libc6:i386 screen
140167
```
141168
142-
11. Making the server executable:
169+
12. Making the server executable:
143170
- Change the permissions so the server can be executed (only required once!):
144171
145172
```
@@ -150,40 +177,52 @@ Seek online guides or your hosting provider's documentation if you're unsure how
150177
sudo chmod +x omp-server
151178
```
152179
153-
12. Starting the server:
154-
- Use the following command to start the server in the background:
180+
13. Starting the server:
181+
- Use screen to start the server in a detachable session as the service account:
155182
156183
```
157-
nohup ./omp-server &
184+
sudo -u svc-omp-server screen -dmS omp-server ./omp-server
158185
```
159186
160-
- The terminal will output a process ID (PID). Write this number down for future reference.
187+
:::tip
188+
189+
This creates a detached screen session named "omp-server" running as the service account. You can attach to it anytime to see the console!
190+
191+
:::
161192
162193
<hr />
163194
164195
## Phase 4: Managing the Server
165196
166-
13. Stopping the server:
167-
- To stop the server, use the PID from step 12 and run:
197+
14. Viewing the server console:
198+
- To attach to the running server and see the console output:
168199
169200
```
170-
sudo kill <PID>
201+
sudo -u svc-omp-server screen -r omp-server
171202
```
172203
173-
14. Finding the Process ID (if forgotten):
174-
- If you forget the process ID, run:
204+
- To detach from the screen session (leave it running), press: `Ctrl+A` then `D`
205+
206+
15. Stopping the server:
207+
- Attach to the screen session (step 14), then stop the server gracefully by typing `/exit` in the console or pressing `Ctrl+C`
208+
- Alternatively, you can kill the screen session:
175209
176210
```
177-
top
211+
sudo -u svc-omp-server screen -X -S omp-server quit
178212
```
179213
180-
- Look for the omp-server process in the list, note the PID, press 'Q' to quit, and then kill the process as shown in step 13.
214+
16. Checking if the server is running:
215+
- To see all screen sessions:
216+
217+
```
218+
sudo -u svc-omp-server screen -ls
219+
```
181220
182221
<hr />
183222
184223
## Phase 5: Uploading Your Gamemode and Files
185224
186-
15. Upload your custom gamemodes and scripts:
225+
17. Upload your custom gamemodes and scripts:
187226
- Use WinSCP or Filezilla to transfer your gamemodes and scripts to the /opt/omp-server directory.
188227
Important: Make sure to use .so files for Linux plugins, as .dll files are only supported on Windows.
189228

0 commit comments

Comments
 (0)