Skip to content

Commit

Permalink
Merge pull request #839 from adib-yg/master
Browse files Browse the repository at this point in the history
Update format.md & config.json.md
  • Loading branch information
adib-yg authored Jan 16, 2024
2 parents 20a0fa0 + 1a77494 commit 78efa4b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
6 changes: 6 additions & 0 deletions docs/scripting/functions/format.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,16 @@ format(result, sizeof(result), "This is a %s containing the number %i.", string,
// This is a simple message containing the number 42.
```
<br />
```c
new string[64];
format(string, sizeof(string), "Your score is: %d", GetPlayerScore(playerid));
SendClientMessage(playerid, 0xFF8000FF, string);
```

<br />

```c
new string[32];
new hour, minute, second;
Expand All @@ -65,6 +69,8 @@ format(string, sizeof(string), "The time is %02d:%02d:%02d.", hour, minute, seco
// will output something like "The time is 09:45:02."
```
<br />
```c
new string[32];
format(string, sizeof(string), "43%s of my shirts are black.", "%%");
Expand Down
10 changes: 4 additions & 6 deletions docs/server/config.json.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,15 @@ description: open.mp server configuration file.
| allow_interior_weapons | bool | true ||| Toggles whether the usage of weapons in interiors is allowed or not. '**true**' to enable weapons in interiors, '**false**' to disable. |
| chat_radius | float | 200.0 ||| Set a radius limitation for the chat. Only players at a certain distance from the player will see their message in the chat. Also changes the distance at which a player can see other players on the map at the same distance. |
| death_drop_amount | int | 0 ||| |
| gravity\* | float | 0.008 ||| The global gravity that the server uses. |
| gravity | float | 0.008 ||| The global gravity that the server uses. |
| group_player_objects | bool | false ||| |
| lag_compensation_mode | int | 1 ||| **0**: Fully disable lag compensation.<br /><br />**1**: Fully enable lag compensation.<br /><br />**2**: Enable position-only lag compensation. This means player rotation won't be lag compensated for. |
| map | string | ||| The mapname that appears in the server browser. This can be anything, e.g. My Stunt Map. |
| mode | string | ||| The mode that will be shown in the server browser. Using [SetGameModeText](../scripting/functions/SetGameModeText) has the same effect and overrides the value used in config.json. If you have multiple gamemodes that require different gamemode texts, use that function. |
| nametag_draw_radius | float | 70.0 ||| Set the maximum distance to display the names of players. |
| player_marker_draw_radius | float | 250.0 ||| Set the marker radius for all players. |
| player_marker_mode | int | 1 ||| **0**: Marker mode off<br /> <br />**1**: Marker mode global<br /> <br />**2**: Marker mode streamed<br /><br />[Marker Modes](../scripting/resources/markermodes) |
| time\* | int | 12 ||| The global time that the server uses and will be shown in the server browser. |
| time | int | 12 ||| The global time that the server uses and will be shown in the server browser. |
| use_all_animations | bool | false ||| Allow use of the animations missing from some versions. '**true**' to enable all animations, '**false**' to disable. |
| use_chat_radius | bool | false ||| Enable/Disable chat radius. |
| use_entry_exit_markers | bool | true ||| Enable/Disable all the interior entrances and exits in the game (the yellow arrows at doors). |
Expand All @@ -58,9 +58,7 @@ description: open.mp server configuration file.
| use_vehicle_friendly_fire | bool | false ||| Enable friendly fire for team vehicles. Players will be unable to damage teammates' vehicles. |
| use_zone_names | bool | false ||| Allows to turn on zone / area names such as the "Vinewood" or "Doherty" text at the bottom-right of the screen as they enter the area. |
| vehicle_respawn_time | int | 10000 ||| Set vehicles respawn time in milliseconds. (Default 10 seconds) |
| weather\* | int | 10 ||| The global weather that the server uses and will be shown in the server browser. |

> [*] Some settings are a different type than you might think.
| weather | int | 10 ||| The global weather that the server uses and will be shown in the server browser. |

## Language

Expand All @@ -77,7 +75,7 @@ description: open.mp server configuration file.
| log_cookies | bool | false ||| Toggles logging of connection cookies requested by newly connecting players. Set to '**true**' to enable or '**false**' to disable. |
| log_deaths | bool | true ||| Toggles if player death should be shown in the server console. Set to '**true**' to enable or '**false**' to disable. |
| log_queries | bool | false ||| Toggles if all queries sent to the server by players should be logged. Set to '**true**' to enable or '**false**' to disable. It is considerably useful during a DDoS attack. |
| log_sqlite | bool | false ||| Logs sqlite db\_\* function errors in the server console. |
| log_sqlite | bool | false ||| Logs sqlite DB\_\* function errors in the server console. |
| log_sqlite_queries | bool | false ||| Logs all sqlite DB_Query calls, including the query string. |
| timestamp_format | string | [%Y-%m-%dT%H:%M:%S%z] ||| The timestamp format that should be used. The format is based on the [strftime](http://cplusplus.com/reference/clibrary/ctime/strftime/) format from C/C++. Here are some examples:<br /><br />**[%H:%M:%S]** This displays only the time.<br /><br />**[%d/%m/%Y %H:%M:%S]** This would display the date in dd/mm/yyyy format followed by the time in hour:minute:second format. |
| use_prefix | bool | true ||| Toggles if prefixes such as [Info] should be printed with every console message. Set to '**true**' to enable or '**false**' to disable. |
Expand Down

0 comments on commit 78efa4b

Please sign in to comment.