Skip to content

Commit f4be1f7

Browse files
add missing element types and auto-redirect to old wiki
1 parent 6e5253e commit f4be1f7

40 files changed

+228
-69
lines changed

elements/blip.yaml renamed to elements/General/blip.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,5 @@ name: 'blip'
22
description: |
33
The blip class represents small icons or blips that can be shown on a player's radar.
44
5-
The element type of this class is **"blip"**.
6-
75
The list of blip icons are available on the [Radar Blips](/radar_blips) page.
86

elements/building.yaml renamed to elements/General/building.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ name: 'building'
22
description: |
33
The building class represents static 3D models in the GTA world.
44
5-
The element type of this class is **"building"**.
6-
75
notes:
86
- |
97
There is a distinction in GTA: San Andreas between static and dynamic models (these use a separate streaming system). Examples of buildings include building models, roads, and terrain. Objects created as [Buildings](/building) can contain **glass** and **shadows**, unlike those created as [Objects](/building) (which are missing these features).

elements/camera.yaml renamed to elements/General/camera.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,3 @@ name: 'camera'
22
description: |
33
The camera class represents the local player camera rendering the game to the screen.
44
5-
The element type of this class is **"camera"**.
6-

elements/col.yaml renamed to elements/General/col.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ description: |
88
To split a .col file into multiple files, you can use [CollEditor2](http://www.steve-m.com/downloads/tools/colleditor2/).
99
1010
Collision data can also be embedded in DFF files. At the moment, vehicle collision replacement works with DFF embedded collisions only.
11-
12-
The element type of this class is **"col"**.
1311
see_also:
1412
- 'functions:any:Engine'
1513
- 'events:any:Engine'
Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
name: 'collision_shape'
1+
name: 'colshape'
22
description: |
33
The collision shape class represents invisible collision detection shapes that can be created in the GTA world. Collision shapes are typically used to detect physical entities moving through them and perform actions when they do.
4-
5-
The element type for this class is **"colshape"**.
64
see_also:
75
- 'functions:any:ColShape'
86
- 'events:any:ColShape'

elements/console.yaml renamed to elements/General/console.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ name: 'console'
22
description: |
33
The Server Console class represents the server console.
44
5-
The element type of this class is **"console"**.
6-
75
In the server console you can use many different commands, affecting the players using the server. Please note that only console commands can be used, and that some commands can not be used through the in-game client console, only through the Server Console.
86
97
You can view all latest available server console commands by entering **"help"** into the server console window.

elements/dff.yaml renamed to elements/General/dff.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ description: |
44
55
Collision data can also be embedded in DFF files. At the moment, vehicle collision replacement works with DFF embedded collisions only.
66
7-
The element type of this class is **"dff"**.
8-
97
see_also:
108
- 'functions:any:Engine'
119
- 'events:any:Engine'

elements/effect.yaml renamed to elements/General/effect.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,4 @@ name: 'effect'
22
description: |
33
The Effect class represents custom effect elements in the game world such as smoke, sparks, fire etc.
44
5-
The element type of this class is **"effect"**.
6-
75
TODO all effects table
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
11
name: 'light'
22
description: |
33
The light class represents colored, 3D lights in the GTA world. There are a couple different types of lights, which are point lights, spot lights and dark lights.
4-
5-
The element type of this class is **"light"**.

elements/marker.yaml renamed to elements/General/marker.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,3 @@ name: 'marker'
22
description: |
33
The marker class represents colored, 3D shapes in the GTA world. There are several types of markers, including cylinders and checkpoints. In scripts, markers are often used to mark spots and trigger some sort of action when a player goes into them.
44
5-
The element type of this class is **"marker"**.
6-

elements/object.yaml renamed to elements/General/object.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ name: 'object'
22
description: |
33
The object class represents dynamic and static 3D models placed in the GTA world.
44
5-
The element type of this class is **"object"**.
6-
75
notes:
86
- |
97
Objects only represent models **created by a script**, they do not represent objects that are part of GTA's default landscape (these belong to the "building pool").

elements/ped.yaml renamed to elements/General/ped.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,3 @@ description: |
44
55
The [createPed](/createPed) function specifically creates an NPC, but all other ped functions work on both players and NPC's as they're pretty much the same thing to San Andreas.
66
7-
The element type of a NPC is **"ped"**.
8-

elements/pickup.yaml renamed to elements/General/pickup.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,3 @@ name: 'pickup'
22
description: |
33
The pickup class represents weapon, health, or armor pickups in the GTA world. Pickups can be picked up by players when they are walked over. Players will not be given health or armor pickups if their health or armor is already full.
44
5-
The element type of this class is **"pickup"**.
6-

elements/player.yaml renamed to elements/General/player.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,3 @@ name: 'player'
22
description: |
33
The player class represents pedestrians controlled by clients. A player element is created when a client connects to the server and destroyed when that client quits. Players cannot be created or destroyed otherwise.
44
5-
The element type of this class is **"player"**.
6-

elements/projectile.yaml renamed to elements/General/projectile.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ name: 'projectile'
22
description: |
33
The projectile class represents the projectiles of certain weapons that are created when the weapon is fired. Alternatively these can be created using [createProjectile](/createProjectile).
44
5-
The element type of this class is **"projectile"**.
6-
75
notes:
86
- |
97
**16: Grenade**

elements/radar_area.yaml renamed to elements/General/radararea.yaml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
1-
name: 'radar_area'
1+
name: 'radararea'
22
description: |
33
The radar area class represents coloured areas that can be displayed on a player's radar.
44
5-
The element type of this class is **"radararea"**.
6-
75
86
see_also:
97
- 'functions:any:RadarArea'

elements/searchlight.yaml renamed to elements/General/searchlight.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,3 @@ name: 'searchlight'
22
description: |
33
The searchlight class represents special spotlights in the GTA world. They are different to common spotlights because their visual effects.
44
5-
The element type of this class is **"searchlight"**.
6-

elements/sound.yaml renamed to elements/General/sound.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ description: |
66
77
Sound elements can also be manipulated using the other [Client audio functions](/client_audio_functions).
88
9-
The element type of this class is **"sound"**.
10-
119
1210
see_also:
1311
- 'functions:any:Audio'

elements/team.yaml renamed to elements/General/team.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,3 @@ description: |
44
55
A common misconception is that players would be child elements of team elements. This is wrong. Being part of a team is merely a relational connection rather than a change in element hierarchy. To perform logic on all the players of a team you have to use the [getPlayersInTeam](/getPlayersInTeam) function.
66
7-
The element type of this class is **"team"**.
8-

elements/txd.yaml renamed to elements/General/txd.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ name: 'txd'
22
description: |
33
The TXD class represents a RenderWare Texture Dictionary (TXD) loaded by the client, which can be imported into a custom model to texture it.
44
5-
The element type of this class is **"txd"**.
6-
75
see_also:
86
- 'functions:any:Engine'
97
- 'events:any:Engine'

elements/vehicle.yaml renamed to elements/General/vehicle.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,3 @@ name: 'vehicle'
22
description: |
33
The vehicle class represents vehicles in the GTA world. Vehicles can be occupied and controlled by players and peds.
44
5-
The element type of this class is **"vehicle"**.
6-

elements/water.yaml renamed to elements/General/water.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,3 @@ description: |
44
55
A water element represents one such polygon. You can create water elements using [createWater](/createWater).
66
7-
The element type of this class is **"water"**.
8-

elements/weapon.yaml renamed to elements/General/weapon.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,3 @@ name: 'weapon'
22
description: |
33
The Weapon class represents a custom static weapon. Weapon elements created by [createWeapon](/createWeapon) can be manipulated with the following scripting functions.
44
5-
The element type of this class is **"weapon"**.
6-

elements/Misc/account.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
name: 'account'
2+
description: |
3+
The **account** class represents a [player](/player)'s server account. You can get the **account** object associated to any client using [getPlayerAccount](/getPlayerAccount).
4+
5+
Accounts are unique to each client and can be used to store information that is persistent across map changes and user sessions. Clients that join without an account are given a temporary 'guest' account. This can store information like any other account, but isn't saved across sessions.
6+
7+
When a user logs in or out, the account object assigned to them will change. As such, you must not assume that the account attached to a client remains constant during their session.
8+
9+
PHP code to check password hashes from the MTA server database is [here](/Account_PHP).
10+

elements/Misc/acl.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: 'acl'
2+
description: |
3+
ACL or Access Control List is a set of rights grouped together to create a list, they are defined in the [ACL.xml](/Access_Control_List) file as <acl> nodes. These ACLs can then be added to certain [ACL Groups](/aclgroup) to grant or deny these groups specified permissions or acces to server scripting functions defined in the ACL. Example of an ACL:
4+
5+
```xml
6+
<acl name="Example">
7+
<right name="general.ModifyOtherObjects" access="true" />
8+
<right name="function.startResource" access="true" />
9+
<right name="function.stopResource" access="true" />
10+
<right name="function.shutdown" access="false" />
11+
<right name="command.shutdown" access="false" />
12+
</acl>
13+
```
14+
15+
This creates ACL called *Example* and gives resources access to start/stop resources and modify other resources but denies access to shutting down the server. Players that are in group using this ACL will be denied access to `shutdown` command.
16+

elements/Misc/aclgroup.yaml

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
name: 'aclgroup'
2+
description: |
3+
ACL Groups are groups that holds objects such as accounts, and resources which allows them to do some things depending on the permission the group has/holds.
4+
5+
#### Default Groups
6+
7+
MTA has provided some default groups with increasing permissions. These groups are:
8+
9+
- **Everyone**
10+
- **Moderator**
11+
- **SuperModerator**
12+
- **Admin**
13+
- **Console** - This controls permissions of people who are using the console through `<object name="user.Console" />`
14+
- **RPC** - Remote Procedure Call. Specifically grants access to callRemote only and disables commands of default resources. Check the function for details.
15+
16+
To explain further, I will use the Everyone group as an example. By default it looks like this:
17+
18+
```xml
19+
<group name="Everyone">
20+
<acl name="Default" />
21+
<object name="user.*" />
22+
<object name="resource.*" />
23+
</group>
24+
```
25+
26+
You will first notice the acl name inside the group. It defines what permissions the group has. Users and resources in this group will have the permissions specified on the "Default" acl name list.
27+
28+
**Note**: You will notice this group is special, in that it includes every user and resource by using a **wildcard (\*)** where the user or resource name would be.
29+
30+
Now, scroll further down the ACL and you will see the `<acl name="Default" />` listing. Note I have trimmed this list dramatically due to its length.
31+
32+
```xml
33+
<acl name="Default">
34+
<right name="command.start" access="false" />
35+
<right name="command.stop" access="false" />
36+
<right name="command.stopall" access="false" />
37+
...etc etc...
38+
<right name="function.executeCommandHandler" access="false" />
39+
<right name="function.setPlayerMuted" access="false" />
40+
<right name="function.restartResource" access="false" />
41+
...etc etc...
42+
<right name="general.adminpanel" access="false" />
43+
<right name="general.tab_players" access="false" />
44+
<right name="general.tab_resources" access="false" />
45+
...etc etc...
46+
<right name="command.freeze" access="false" />
47+
<right name="command.shout" access="false" />
48+
<right name="command.spectate" access="false" />
49+
...etc etc...
50+
</acl>
51+
```
52+
53+
- `Function` entries are MTA scripting functions. For example, if a resource needed to use restartResource and was only in the 'Everyone' group (with the 'Default' list), it would be denied access to restartResource and fail to work correctly.
54+
- `Commands` are created when a resource uses addCommandHandler. An example would be typing /createvehicle [vehicle] in the chatbox for the freeroam resource. This controls whether users in the group using this ACL can use the command. Note: commands have no effect on resources within the group. Commands are only related to users.
55+
- `General` is a custom right name group created by the admin resource but it works on the same principles. The script works with them by using hasObjectPermissionTo
56+
57+
You will notice some groups such as admin have multiple `<acl name="" />` nodes. An example is the admin group:
58+
59+
```xml
60+
<group name="Admin">
61+
<acl name="Moderator" />
62+
<acl name="SuperModerator" />
63+
<acl name="Admin" />
64+
<acl name="RPC" />
65+
<object name="resource.admin" />
66+
<object name="resource.webadmin" />
67+
<object name="user.Ransom" />
68+
</group>
69+
```
70+
71+
This gives all the permissions defined in each <acl name="" /> node in order of listing. So for example, the admin group makes sure all the permissions are given to admins by using all the lists. If there are any conflicts, the lowest entry wins. For example, pretend these 2 acls were in a group in the following order:
72+
73+
- `<acl name="Default">` sets `<right name="general.ModifyOtherObjects" access="false" />`
74+
- `<acl name="Admin">` sets `<right name="general.ModifyOtherObjects" access="true" />`
75+
- For all users and resources in group admin: `<right name="general.ModifyOtherObjects" access="true" />`

elements/Misc/ban.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
name: ban
2+
description: |
3+
A **ban** is a pointer that represents a banned player arbitrarily. The following functions allow interaction with a ban.

elements/Misc/db-connection.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
name: db-connection
2+
description: 'The **db-connection** class represents a database connection.'

elements/Misc/resource.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
name: resource
2+
description: |
3+
A resource object refers to a resource that is loaded in the server.
4+
5+
A name, state, root element, base directory path are associated to a resource, among other attributes.
6+

elements/Misc/textdisplay.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
name: textdisplay
2+
description: |
3+
A textdisplay object refers to a "canvas" that can contain many items of text ([textitems](/textitem)).
4+
5+
Each display can be seen by multiple observers ([players](/player)) and each observer can see multiple displays. For example, you could have a display that showed a score, and a display that showed information specific to one team, such as the location of a flag. Every player would be an observer of the first display and each team would have their own display that its players would be observers of.

elements/Misc/textitem.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
name: textitem
2+
description: |
3+
A textitem object represents a single area of text, much like a label does in standard GUI programing.
4+
5+
A text item can only be seen by players if it is added to a [textdisplay](/textdisplay) they are observers of using [textDisplayAddText](/textDisplayAddText).

elements/Misc/timer.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
name: timer
2+
description: |
3+
A **timer** object refers to a timer set to execute a function a certain number of times with a specified delay.
4+
5+
Note that after a timer has completed all its iterations, it is destroyed and any stored pointers to it become invalid. Also timers are not under the resource hierarchy, because they are not elements, for instance, if you create a timer, it will not be destroyed when the resource in which it was created is stopped, so in this case you should kill the timer manually.

elements/Misc/xmlnode.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
name: xmlnode
2+
description: 'A xmlnode is an object that represents a node in a XML document tree.'

functions/Element/getElementPosition.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ shared: &shared
1313
- [object](/object)
1414
- [pickup](/pickup)
1515
- [marker](/marker)
16-
- [collision shapes](/collision_shapes)
16+
- [collision shapes](/colshape)
1717
- [blip](/blip)
18-
- [radar areas](/radar_areas)
18+
- [radar areas](/radararea)
1919
parameters:
2020
- name: 'theElement'
2121
type: 'element'

web/src/content.config.ts

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,6 @@ import { glob } from 'astro/loaders';
55

66
export const collections = {
77
docs: defineCollection({ loader: docsLoader(), schema: docsSchema() }),
8-
elements: defineCollection({
9-
loader: glob({
10-
pattern: "**/*.yaml",
11-
base: "../elements",
12-
generateId: ({ entry }) => entry.replace(/\.yaml$/, '')
13-
}),
14-
}),
158
functions: defineCollection({
169
loader: glob({
1710
pattern: "**/*.yaml",
@@ -32,6 +25,16 @@ export const collections = {
3225
}
3326
})
3427
}),
28+
elements: defineCollection({
29+
loader: glob({
30+
pattern: "**/*.yaml",
31+
base: "../elements",
32+
generateId: ({ entry }) => {
33+
// Extract the file name without the folder
34+
return ((entry.split('/') || []).pop() || '').replace(/\.yaml$/, '');
35+
}
36+
}),
37+
}),
3538
classes: defineCollection({
3639
loader: glob({
3740
pattern: "**/*.yaml",

web/src/content.constants.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
export const SITE_TITLE = 'Multi Theft Auto: Wiki';
22
export const SITE_URL = 'https://wiki.preview.multitheftauto.com';
3+
export const OLD_WIKI_URL = 'https://wiki.multitheftauto.com';
4+
export const OLD_WIKI_REDIRECT = true; // Set to false to disable redirecting to old wiki on 404

0 commit comments

Comments
 (0)