Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs for version 1.3.1.2748 #1032

Merged
merged 6 commits into from
Aug 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 44 additions & 1 deletion docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,48 @@ title: Changelog
description: open.mp development progress and changelog.
---

## **[v1.2.0.2670](https://github.com/openmultiplayer/open.mp/releases/tag/v1.2.0.2670) (Latest)**
## **[v1.3.1.2748](https://github.com/openmultiplayer/open.mp/releases/tag/v1.3.1.2748) (Latest)**

A new version of open.mp server is finally out, there has been a lot of fixes, bunch of performance improvements, and a few additions.

Our launcher also now received a new update which you can get by simply opening your launcher and updating it through the update dialog. For longer version of changelog please read it from here: https://github.com/openmultiplayer/launcher/releases/tag/v1.4.0

**Added:**

- Add server logo config variable to [config.json](server/config.json), allowing servers to set a logo to be shown in our launcher and discord status.
- Add more data validity checks for dialog responses.
- Add validity checks for menu rows.
- Add human readable HTTP errors.

**Changes:**

- Remove unnecessary OnPlayerConnect and OnPlayerDisconnect when a side script (filterscript) is (un)loaded. Instead introduced [OnScriptLoadPlayer](scripting/callbacks/OnScriptLoadPlayer) and [OnScriptUnloadPlayer](scripting/callbacks/OnScriptUnloadPlayer) callbacks.
- Remove bunch of pawn native deprecation from runtime warnings.
- Check CDN URL validity.
- Stop spectator sync being broadcasted.
- Default values for health and armour.
- Improve performance for responding to Scores And Pings RPC. (scoreboard)
- Change invalid weapon slot to `-1`

**Fixes:**

- Fix the infamous RakNet crash we've been dealing with since the beginning, affecting a few servers.
- Fix string not shown in rare cases of using format.
- Fix the problem with crashdetect not being able to find file name and line number when more than one script was loaded.
- Fix a lot of RakNet crashes and safer internal memory management.
- Fix several connection issues and proper internal player pool cleanups.
- Fix [GetGameText](scripting/functions/GetGameText) function giving incorrect/corrupt values.
- Fix open.mp windows version not loading when user's windows is set to a language with non-ascii names.
- Fix function and callback headings in `qawno/filterscript.new` and `qawno/gamemode.new` files.

<br />

<hr />

## [v1.2.0.2670](https://github.com/openmultiplayer/open.mp/releases/tag/v1.2.0.2670)

<details>
<summary>Click here</summary>

We encourage every open.mp server to update to this version. There has been not only noticeable performance improvements, but also **critical security fixes**.

Expand All @@ -25,6 +66,8 @@ We encourage every open.mp server to update to this version. There has been not
- Validate damage reasons (weapons) in various places.
- Synchronize bans so multiple players are banned at once if needed.

</details>

<br />

<hr />
Expand Down
37 changes: 37 additions & 0 deletions docs/scripting/callbacks/OnScriptLoadPlayer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
title: OnScriptLoadPlayer
description: This callback is called for each connected player when a script is loaded.
tags: ["player"]
---

<VersionWarn name='callback' version='omp v1.3.1.2748' />

## Description

This callback is called for each connected player when a script is loaded.

| Name | Description |
| -------- | ----------------------------------------------------------------------------- |
| playerid | The ID of the player that script is loaded for. |
| bool:isEntryScript | Determining whether it's an entry script (main script) or a side script. |

## Returns

This callback does not handle returns.

## Examples

```c
public OnScriptLoadPlayer(playerid, bool:isEntryScript)
{
printf("Script loaded for player ID %d (isEntryScript: %s)", playerid, isEntryScript ? "Yes" : "No");
}
```

## Related Callbacks

The following callbacks might be useful, as they're related to this callback in one way or another.

- [OnScriptUnloadPlayer](OnScriptUnloadPlayer): This callback is called for each connected player when a script is unloaded.
- [OnPlayerConnect](OnPlayerConnect): This callback is called when a player connects to the server.
- [OnPlayerDisconnect](OnPlayerDisconnect): This callback is called when a player leaves the server.
37 changes: 37 additions & 0 deletions docs/scripting/callbacks/OnScriptUnloadPlayer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
title: OnScriptUnloadPlayer
description: This callback is called for each connected player when a script is unloaded.
tags: ["player"]
---

<VersionWarn name='callback' version='omp v1.3.1.2748' />

## Description

This callback is called for each connected player when a script is unloaded.

| Name | Description |
| -------- | ----------------------------------------------------------------------------- |
| playerid | The ID of the player that script is unloaded for. |
| bool:isEntryScript | Determining whether it's an entry script (main script) or a side script. |

## Returns

This callback does not handle returns.

## Examples

```c
public OnScriptUnloadPlayer(playerid, bool:isEntryScript)
{
printf("Script unloaded for player ID %d (isEntryScript: %s)", playerid, isEntryScript ? "Yes" : "No");
}
```

## Related Callbacks

The following callbacks might be useful, as they're related to this callback in one way or another.

- [OnScriptLoadPlayer](OnScriptLoadPlayer): This callback is called for each connected player when a script is loaded.
- [OnPlayerConnect](OnPlayerConnect): This callback is called when a player connects to the server.
- [OnPlayerDisconnect](OnPlayerDisconnect): This callback is called when a player leaves the server.
14 changes: 11 additions & 3 deletions docs/server/config.json.md
Original file line number Diff line number Diff line change
Expand Up @@ -215,19 +215,27 @@ omp-server --default-config

| Key | Type | Default value | Read-only | Rule | Effect |
|----------------|--------|-------------------------|-----------|------|------------------------------------------------------------------------|
| discord.invite | string | https://discord.gg/samp | ❌ | ❌ | The address of your server discord that appears in the server browser. |
| discord.invite | string | https://discord.gg/samp | ❌ | ❌ | The address of your server discord that appears in the omp launcher. |

![](https://i.ibb.co/cTRq5pr/294345382-54d77460-da32-458e-bcfa-10ebec90fbfa.png)

## Banners

| Key | Type | Default value | Read-only | Rule | Effect |
|---------------|--------|---------------|-----------|------|----------------------------------------------------------------------------|
| banners.light | string | | ❌ | ❌ | Your server's light banner url address that appears in the server browser. |
| banners.dark | string | | ❌ | ❌ | Your server's dark banner url address that appears in the server browser. |
| banners.light | string | | ❌ | ❌ | Your server's light banner url address that appears in the omp launcher. |
| banners.dark | string | | ❌ | ❌ | Your server's dark banner url address that appears in the omp launcher. |

![](https://i.ibb.co/86T8wYG/image.png)

## Server Logo

| Key | Type | Default value | Read-only | Rule | Effect |
|---------------|--------|---------------|-----------|------|----------------------------------------------------------------------------|
| logo | string | | ❌ | ❌ | Your server's logo url address that appears in the omp launcher and our discord status. |

![](https://i.ibb.co/VQZch1Y/image-1.png)

<br />

:::note
Expand Down