Skip to content

Commit 90fc061

Browse files
committed
Convert .astro pages to mdx
1 parent 647b159 commit 90fc061

20 files changed

Lines changed: 459 additions & 1554 deletions

web/src/pages/Contributing.mdx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
import AutoStarlightPage from '@src/components/AutoStarlightPage.astro';
22
import { SITE_CONTRIBUTING_URL } from "@src/content.constants";
33

4-
<section data-pagefind-ignore>
5-
64
<AutoStarlightPage frontmatter={{
75
template: 'doc',
86
title: 'How you can help',
97
tableOfContents: true
108
}}>
119

10+
<section data-pagefind-ignore>
1211
Multi Theft Auto has loads of areas in which you can help us. In turn, we'll be more than happy to help you get started with any ideas you have, help test them and - if they're good enough - release them to the whole community.
1312
This page outlines the key areas you could do something in, of course, there are many things we've not thought of, so think outside the box!
1413

@@ -45,5 +44,5 @@ Before you make changes check out [Contribution Guidelines](https://github.com/m
4544
### Grant
4645
You can donate to MTA [here](https://multitheftauto.com/donate/manage.php).
4746

48-
</AutoStarlightPage>
49-
</section>
47+
</section>
48+
</AutoStarlightPage>

web/src/pages/reference/Clothes_replacement.mdx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ import { clothingModels, clothingTextures } from '@src/data/clothes_ids.ts';
99
}
1010
}}>
1111

12-
<div id="_top"></div>
13-
1412
### Replacing models (DFF)
1513
Starting with version **1.6.0 r22987**, CJ's clothing models can be replaced.
1614
```lua
@@ -19,6 +17,7 @@ Starting with version **1.6.0 r22987**, CJ's clothing models can be replaced.
1917
local dff = engineLoadDFF("custom_afrobeard.dff")
2018
engineReplaceModel(dff, 30001)
2119
```
20+
2221
#### Model IDs and names
2322
<details>
2423
<summary>Full list of model IDs that are associated with CJ clothing models.</summary>

web/src/pages/reference/Dimension.astro

Lines changed: 0 additions & 57 deletions
This file was deleted.
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
import AutoStarlightPage from "@src/components/AutoStarlightPage.astro";
2+
import SeeAlsoSection from "@src/components/SeeAlsoSection.astro";
3+
import { getSeeAlsoLinksFromList } from "@src/utils/general";
4+
5+
<AutoStarlightPage frontmatter={{
6+
template: 'doc',
7+
title: 'Dimension',
8+
tableOfContents: false,
9+
}}>
10+
11+
Dimensions are a way of separating parts of the game world from each other. Each dimension can contain elements of the types listed below. These are are only visible to players in the same dimension. You can, in theory, have up to 65535 dimensions.
12+
13+
The following [Element](/reference/Element/) types can be used in the Dimension system:
14+
* [Player](/reference/player/)
15+
* [Ped](/reference/ped/)
16+
* [Vehicle](/reference/vehicle/)
17+
* [Object](/reference/object/)
18+
* [Pickup](/reference/pickup/)
19+
* [Marker](/reference/marker/)
20+
* [Collision shape](/reference/colshape/)
21+
* [Blip](/reference/blip/)
22+
* [Radar area](/reference/radararea/)
23+
* [Team](/reference/team/)
24+
* [Sound](/reference/sound/)
25+
* [Weapon](/reference/weapon/)
26+
* [Light](/reference/light/)
27+
* [Water](/reference/water/)
28+
* Custom dummy elements ([createElement](/reference/createElement/))
29+
30+
The camera's dimension is updated when:
31+
* The local player joins the server (set to 0)
32+
* [resetMapInfo](/reference/resetMapInfo/) is called (set to 0)
33+
* The local player spawns (set to the player's dimension)
34+
* [setElementDimension](/reference/setElementDimension/) is called
35+
36+
## Uses
37+
38+
A useful use of this is for unique [interiors](/reference/Interior/). For example, there is only one actual Pizza restaurant in San Andreas, with each warp point going to the same place. This works fine in single player games (as you aren't going to be in two places at once), but with multiplayer this can be confusing, as you could enter in one place and see all the players who entered in another. To avoid this, you can split the players into dimensions, so they will only see players who entered in the same place, duplicating the Pizza restaurant interior as many times as you want with different dimensions.
39+
40+
## Relevant scripting functions
41+
42+
* [setElementDimension](/reference/setElementDimension/)
43+
* [getElementDimension](/reference/getElementDimension/)
44+
* [spawnPlayer](/reference/spawnPlayer/)
45+
46+
<SeeAlsoSection seeAlsoLinks={getSeeAlsoLinksFromList([
47+
'reference:Interior',
48+
'reference:Entity',
49+
])} currentId='' />
50+
51+
</AutoStarlightPage>

web/src/pages/reference/Filepath.astro

Lines changed: 0 additions & 41 deletions
This file was deleted.
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
import StarlightPage from '@astrojs/starlight/components/StarlightPage.astro';
2+
import NoteBox from '@src/components/NoteBox.astro';
3+
4+
<StarlightPage frontmatter={{
5+
template: 'doc',
6+
title: 'Filepath',
7+
tableOfContents: false,
8+
}}>
9+
10+
A `filepath` is a path that leads up to a file. These are relative to the root directory of the resource it is being called from.
11+
12+
It is also possible to use special filepaths in order to reference files from other resources. This can be done with the following syntax:
13+
```text
14+
:<resourceName>/file.ext
15+
```
16+
17+
So, for example:
18+
```lua
19+
xmlLoadFile ( ":helpmanager/help.xml" )
20+
```
21+
22+
<NoteBox type='info'>Server side filepaths which refer to resources will work correctly even if the other resource is not running. However client side filepaths require the target resource to be running.</NoteBox>
23+
24+
### Client file security
25+
26+
To protect a client file from being read by another server, prepend the filepath with `@` when the file is created:
27+
```lua
28+
xmlCreateFile ( "@:myresource/someinfo.xml" )
29+
fileCreate ( "@listofthings.txt" )
30+
```
31+
32+
To read a private file, `@` must also be prepended when the file is reopened:
33+
```lua
34+
xmlLoadFile ( "@:myresource/someinfo.xml" )
35+
fileOpen ( "@listofthings.txt" )
36+
```
37+
38+
Notes:
39+
* The filepath without `@` is read/writeable by all servers.
40+
* The public and all the private versions of a particular filepath can exist at the same time. Which one is accessed depends upon the usage of `@` and the server that is currently connected.
41+
* The server file `mods/deathmatch/server-id.keys` is used for private file security. Keep a copy of it in a safe place!
42+
43+
</StarlightPage>

web/src/pages/reference/Interior.astro

Lines changed: 0 additions & 44 deletions
This file was deleted.
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
import AutoStarlightPage from "@src/components/AutoStarlightPage.astro";
2+
import SeeAlsoSection from "@src/components/SeeAlsoSection.astro";
3+
import { getSeeAlsoLinksFromList } from "@src/utils/general";
4+
5+
<AutoStarlightPage frontmatter={{
6+
template: 'doc',
7+
title: 'Interior',
8+
tableOfContents: false,
9+
}}>
10+
11+
An interior in GTA is an area that isn't 'outside'. For example, inside houses, casinos, restaurants, shops etc. Players can not, by default, access these. You can use various scripting functions to move elements into these interiors. When you change the interior a player is in, they can only see the non-player elements in that interior. Players can see each other in whatever interior they are in.
12+
13+
You can have up to 255 interiors, interior 0 being the first one and referring to the normal GTA world.
14+
15+
The camera's interior is updated when:
16+
* The local player joins the server (set to 0)
17+
* [resetMapInfo](/reference/resetMapInfo/) is called (set to 0)
18+
* The local player spawns (set to the player's interior)
19+
* [setElementInterior](/reference/setElementInterior/) is called
20+
21+
## Uses
22+
23+
To allow a player to enter an interior, you should use the [setElementInterior](/reference/setElementInterior/) function on the player you wish to move. You can also use this function on other elements, for example to make a vehicle or object appear in the interior.
24+
25+
## Dimensions
26+
27+
The original GTA interiors are reused in a number of places throughout the game - e.g. each fast food restaurant interior is used many times. [Dimensions](/reference/Dimension/) are a feature that was added to MTA to solve this problem. You can allocate each instance of the interior a separate dimension which will mean that the players in each dimension won't be able to see each other or interact with each other. This will mean that the interiors appear to be entirely separate, despite physically being in the same place.
28+
29+
## Relevant scripting functions
30+
31+
* [setElementInterior](/reference/setElementInterior/)
32+
* [getElementInterior](/reference/getElementInterior/)
33+
* [spawnPlayer](/reference/spawnPlayer/)
34+
35+
<SeeAlsoSection seeAlsoLinks={getSeeAlsoLinksFromList([
36+
'reference:Dimension',
37+
'reference:ID_Lists/Interiors',
38+
'reference:Entity',
39+
])} currentId='' />
40+
41+
</AutoStarlightPage>

web/src/pages/reference/Local_Scheme_Handler.astro

Lines changed: 0 additions & 35 deletions
This file was deleted.
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
import StarlightPage from '@astrojs/starlight/components/StarlightPage.astro';
2+
3+
<StarlightPage frontmatter={{
4+
template: 'doc',
5+
title: 'Local Scheme Handler',
6+
tableOfContents: false,
7+
}}>
8+
9+
In many cases it is necessary to access files stored on the local disk from browsers.
10+
11+
### Scheme format
12+
`http://mta/resourceName/file.extension`
13+
14+
* **resourceName:** The [resource](/reference/resource/) name, local is a special name for the current resource.
15+
* **file.extension:** The file path within resourceName. Check [filepath](/reference/Filepath/).
16+
17+
You can use this scheme format for [loadBrowserURL](/reference/loadBrowserURL/) as well as in HTML files e.g. `<img/>`; tags.
18+
19+
### Examples
20+
##### Example 1
21+
22+
`http://mta/myResource/assets/myImage.png` <br/>
23+
Refers to the file **assets/myImage.png** in a resource named myResource.
24+
25+
##### Example 2
26+
`http://mta/local/assets/myImage.png` <br/>
27+
Refers to the file **assets/myImage.png** in the current resource.
28+
29+
</StarlightPage>

0 commit comments

Comments
 (0)