From 7b143b51ef7265cbb52b8b2cd7dd24bd3b5951d9 Mon Sep 17 00:00:00 2001 From: adib-yg Date: Wed, 17 Jan 2024 16:39:28 +0330 Subject: [PATCH 1/4] update config.json.md --- docs/server/config.json.md | 56 ++++++++++++++++++++++---------------- 1 file changed, 33 insertions(+), 23 deletions(-) diff --git a/docs/server/config.json.md b/docs/server/config.json.md index 27ff9288a..09ca8e8a7 100644 --- a/docs/server/config.json.md +++ b/docs/server/config.json.md @@ -16,18 +16,23 @@ description: open.mp server configuration file. ## Custom Models (Artwork) -| Key | Type | Default value | Read-only | Rule | Effect | -|-------------|--------|---------------|-----------|------|--------------------------------------------------------------------------------------------------------------------------| -| cdn | string | | ✅ | ❌ | An http address for a remote model server. | -| enable | bool | true | ✅ | ❌ | Toggles if the server uses custom models from the /models folder. Set to '**true**' to enable or '**false**' to disable. | -| models_path | string | models | ✅ | ❌ | The path where the custom models are located. | +| Key | Type | Default value | Read-only | Rule | Effect | +|---------------------|--------|---------------|-----------|------|--------------------------------------------------------------------------------------------------------------------------| +| artwork.cdn | string | | ✅ | ❌ | An http address for a remote model server. | +| artwork.enable | bool | true | ✅ | ❌ | Toggles if the server uses custom models from the /models folder. Set to '**true**' to enable or '**false**' to disable. | +| artwork.models_path | string | models | ✅ | ❌ | The path where the custom models are located. | -## Config +## Chat Filter -| Key | Type | Default value | Read-only | Rule | Effect | -|-------------------|------|---------------|-----------|------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| chat_input_filter | bool | true | ❌ | ❌ | Toggles the chat input filter. Disable it to use of chars like % in the chat. | -| enable_query | bool | true | ❌ | ❌ | Toggles if the server information should be displayed in the server browser. Set to '**true**' to enable or '**false**' to disable. Players can still join a server that has disabled querying, but the server browser will not display any information. | +| Key | Type | Default value | Read-only | Rule | Effect | +|-------------------|------|---------------|-----------|------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| chat_input_filter | bool | true | ❌ | ❌ | Toggles the chat input filter. Disable it to use of chars like % in the chat. You can also use the [ToggleChatTextReplacement](../scripting/functions/ToggleChatTextReplacement) function. | + +## Server Query + +| Key | Type | Default value | Read-only | Rule | Effect | +|--------------|------|---------------|-----------|------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| enable_query | bool | true | ❌ | ❌ | Toggles if the server information should be displayed in the server browser. Set to '**true**' to enable or '**false**' to disable. Players can still join a server that has disabled querying, but the server browser will not display any information. | ## Game @@ -120,9 +125,9 @@ description: open.mp server configuration file. | network.time_sync_rate | int | 30000 | ❌ | ❌ | The rate at which a player's game time is updated in milliseconds. | | network.use_lan_mode | bool | false | ❌ | ❌ | Deprecated variable, has no effect. | -> [*] Lower values of aiming_sync_rate, in_vehicle_sync_rate and on_foot_sync_rate increases sync performance, but uses more bandwidth. +> [*] Lower values of `aiming_sync_rate`, `in_vehicle_sync_rate` and `on_foot_sync_rate` increases sync performance, but uses more bandwidth. -## Server +## Server Lock | Key | Type | Default value | Read-only | Rule | Effect | |----------|--------|---------------|-----------|------|------------------------------------------------------------------------------------------------------------------------------| @@ -130,11 +135,11 @@ description: open.mp server configuration file. ## Pawn -| Key | Type | Default value | Read-only | Rule | Effect | -|----------------|--------------|---------------|-----------|------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| legacy_plugins | list, string | [] | ✅ | ❌ | The .dll or .so file in the plugins folder, the server should use to run as a plugin. Plugins are scripts which are designed to enhance gamemodes and filterscripts. | -| main_scripts | list, string | [ "test 1" ] | ✅ | ❌ | The .amx file in the gamemodes folder, the server should use to run as a gamemode. | -| side_scripts | list, string | [] | ✅ | ❌ | The .amx file in the filterscripts folder, the server should use to run as a filterscript. Filterscripts are scripts that run in the background of your gamemode. They are there to add extras to the server without editing the gamemode. It is very useful if you want to carry a specific property to more than one gamemode. | +| Key | Type | Default value | Read-only | Rule | Effect | +|----------------|--------------|---------------|-----------|------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| legacy_plugins | list, string | [] | ✅ | ❌ | The .dll or .so file in the /plugins folder, the server should use to run as a plugin. Plugins are scripts which are designed to enhance gamemodes and filterscripts.
Example: `["mysql", "streamer"]` | +| main_scripts | list, string | ["test 1"] | ✅ | ❌ | The .amx file in the /gamemodes folder, the server should use to run as a gamemode. | +| side_scripts | list, string | [] | ✅ | ❌ | The .amx file in the /filterscripts folder, the server should use to run as a filterscript. Filterscripts are scripts that run in the background of your gamemode. They are there to add extras to the server without editing the gamemode. It is very useful if you want to carry a specific property to more than one gamemode.
Example: `["filterscripts/Race_System"]` | ## RCON @@ -144,13 +149,18 @@ description: open.mp server configuration file. | rcon.enable | bool | false | ✅ | ❌ | Toggles if the [Remote Console](RemoteConsole) feature should be used. Set to '**true**' to enable or '**false**' to disable. | | rcon.password | string | changeme | ❌ | ❌ | The password used to administrate the server and use the remote console (rcon). You must make sure to change this to something hard to crack so that others cannot take control of your server. Your server will NOT start if changeme is the RCON password! | -## Config +## Sleep and Ticks + +| Key | Type | Default value | Read-only | Rule | Effect | +|---------------|--------|---------------|-----------|------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| sleep | float | 5.0 | ❌ | ❌ | The time in milliseconds the main open.mp and raknet networking thread will "sleep" idly during each sync cycle. Higher values decreases server processing, but reduces sync quality. Lower values increases server processing, but improves sync quality. It is not advisable to change this value unless your player count is very high and you have server fps stability issues. | +| use_dyn_ticks | bool | true | ✅ | ❌ | dynticks config is basically for keeping your server's tickrate at a constant count by using cpu more to cover the gap if there's any drop.
It is calculated using provided sleep value so if sleep is 5, constant tick count would be 1000 / 5 = 200 ticks per second.
open.mp modifies internal sleep value on the fly based on each tick's code execution time, just to keep it steady at 200 ticks, and lower sleep means more cpu usage (which is not a massive difference if server code is written well) | + +## Web URL -| Key | Type | Default value | Read-only | Rule | Effect | -|---------------|--------|---------------|-----------|------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| sleep | float | 5.0 | ❌ | ❌ | The time in milliseconds the main open.mp and raknet networking thread will "sleep" idly during each sync cycle. Higher values decreases server processing, but reduces sync quality. Lower values increases server processing, but improves sync quality. It is not advisable to change this value unless your player count is very high and you have server fps stability issues. | -| use_dyn_ticks | bool | true | ✅ | ❌ | | -| website | string | open.mp | ❌ | ✅ | The website people can visit to gain more information about the server. | +| Key | Type | Default value | Read-only | Rule | Effect | +|---------|--------|---------------|-----------|------|-------------------------------------------------------------------------| +| website | string | open.mp | ❌ | ✅ | The website people can visit to gain more information about the server. | ## Discord From 7d32c54163adecb1621feff43d4522de4561cf3d Mon Sep 17 00:00:00 2001 From: adib-yg Date: Wed, 17 Jan 2024 16:40:13 +0330 Subject: [PATCH 2/4] update SendRconCommand.md --- docs/scripting/functions/SendRconCommand.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/docs/scripting/functions/SendRconCommand.md b/docs/scripting/functions/SendRconCommand.md index 11fec213b..3e8c92d8d 100644 --- a/docs/scripting/functions/SendRconCommand.md +++ b/docs/scripting/functions/SendRconCommand.md @@ -41,9 +41,17 @@ format(szCmd, sizeof(szCmd), "mapname %s", szMapName); SendRconCommand(szCmd); // PRO TIP: You don't need `format` in open.mp -SendRconCommand("mapname %s", szMapName); +SendRconCommand("game.map %s", szMapName); ``` +## Notes + +:::info + +See [config.json](../../server/config.json) + +::: + ## Related Functions - [IsPlayerAdmin](IsPlayerAdmin): Checks if a player is logged into RCON. From 9a515858ba08984d637f83f67fa96039935baf45 Mon Sep 17 00:00:00 2001 From: adib-yg Date: Wed, 17 Jan 2024 16:40:38 +0330 Subject: [PATCH 3/4] delete GetPlayer3DTextLabelVirtualW.md --- .../functions/GetPlayer3DTextLabelVirtualW.md | 56 ------------------- 1 file changed, 56 deletions(-) delete mode 100644 docs/scripting/functions/GetPlayer3DTextLabelVirtualW.md diff --git a/docs/scripting/functions/GetPlayer3DTextLabelVirtualW.md b/docs/scripting/functions/GetPlayer3DTextLabelVirtualW.md deleted file mode 100644 index 6bc9a4f47..000000000 --- a/docs/scripting/functions/GetPlayer3DTextLabelVirtualW.md +++ /dev/null @@ -1,56 +0,0 @@ ---- -title: GetPlayer3DTextLabelVirtualW -description: Gets the player's 3D text label virtual world id. -tags: ["player", "3dtextlabel"] ---- - -:::warning - -This function is deprecated. Please see [GetPlayer3DTextLabelVirtualWorld](GetPlayer3DTextLabelVirtualWorld). - -::: - -## Description - -Gets the player's 3D text label virtual world id. - -| Name | Description | -| --------- | ------------------------------------------------------------------------- | -| playerid | The ID of the player. | -| Text3D:textid | The ID of the player's 3D text label to get the virtual world id of. | - -## Returns - -Returns the virtual world id of the player's 3D text label. - -## Examples - -```c -new PlayerText3D:playerTextId; -new Float:X, Float:Y, Float:Z; -new worldid; - -GetPlayerPos(playerid, X, Y, Z); -playerTextId = CreatePlayer3DTextLabel(playerid, "Hello\nI'm at your position", 0x008080FF, X, Y, Z, 40.0); - -worldid = GetPlayer3DTextLabelVirtualW(playerid, playerTextId); -``` - -## Notes - -:::warning - -There is no virtual world support for player 3D text labels. -This function just returns the player's virtual world! - -::: - -:::tip - -This function is just short name of [GetPlayer3DTextLabelVirtualWorld](GetPlayer3DTextLabelVirtualWorld). - -::: - -## Related Functions - -- [Get3DTextLabelVirtualWorld](Get3DTextLabelVirtualWorld): Gets the 3D text label virtual world id. From f9fb5fd20d3ff90549bbdd5105d60573c38bf982 Mon Sep 17 00:00:00 2001 From: adib-yg Date: Wed, 17 Jan 2024 16:40:48 +0330 Subject: [PATCH 4/4] delete SetPlayer3DTextLabelVirtualW.md --- .../functions/SetPlayer3DTextLabelVirtualW.md | 47 ------------------- 1 file changed, 47 deletions(-) delete mode 100644 docs/scripting/functions/SetPlayer3DTextLabelVirtualW.md diff --git a/docs/scripting/functions/SetPlayer3DTextLabelVirtualW.md b/docs/scripting/functions/SetPlayer3DTextLabelVirtualW.md deleted file mode 100644 index e535c6fec..000000000 --- a/docs/scripting/functions/SetPlayer3DTextLabelVirtualW.md +++ /dev/null @@ -1,47 +0,0 @@ ---- -title: SetPlayer3DTextLabelVirtualW -description: Sets the player's 3D text label virtual world id. -tags: ["player", "3dtextlabel"] ---- - -:::warning - -This function is deprecated. Please see [SetPlayer3DTextLabelVirtualWorld](SetPlayer3DTextLabelVirtualWorld). - -::: - -## Description - -Sets the player's 3D text label virtual world id. - -| Name | Description | -| --------- | ------------------------------------------------------------------------- | -| playerid | The ID of the player. | -| PlayerText3D:textid | The ID of the player's 3D text label to set the virtual world id. | -| VirtualWorld | The virtual world in which you are able to see the 3D Text | - -## Examples - -```c -new PlayerText3D:playerTextId; -new Float:X, Float:Y, Float:Z; - -GetPlayerPos(playerid, X, Y, Z); -playerTextId = CreatePlayer3DTextLabel(playerid, "Hello\nI'm at your position", 0x008080FF, X, Y, Z, 40.0); - -SetPlayer3DTextLabelVirtualW(playerid, playerTextId, 60); -``` - -## Notes - -:::warning - -There is no virtual world support for player 3D text labels. -This function does nothing and is fundamentally broken! - -::: - -## Related Functions - -- [GetPlayer3DTextLabelVirtualWorld](GetPlayer3DTextLabelVirtualWorld): Gets the player's 3D text label virtual world id. -- [Set3DTextLabelVirtualWorld](Set3DTextLabelVirtualWorld): Sets the 3D text label virtual world id.