Skip to content

Commit 270e1a3

Browse files
committed
2 parents ff6ae71 + ab7a675 commit 270e1a3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+64
-57
lines changed

functions/Cursor/isCursorShowing.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,18 +34,18 @@ client:
3434
- path: 'examples/isCursorShowing-3.lua'
3535
description: |
3636
This example creates a function to set the state of the [player](/player)'s cursor using the [showCursor](/showCursor) function.
37-
exampleTitle: 'Toggle Cursor'
37+
title: 'Toggle Cursor'
3838
- path: 'examples/isCursorShowing-4.lua'
3939
description: |
4040
If you are already advanced in scripting, using this code is recommended, as it is much more compact:
4141
append: true
42-
exampleTitle: 'Toggle Cursor'
42+
title: 'Toggle Cursor (Advanced)'
4343
- path: 'examples/isCursorShowing-5.lua'
4444
description: |
4545
This example creates a function that allows the [player](/player) to change the state of the cursor using the [showCursor](/showCursor) and [bindKey](/bindKey) functions.
46-
exampleTitle: 'Toggle Cursor by binded key'
46+
title: 'Toggle Cursor by bound key'
4747
- path: 'examples/isCursorShowing-6.lua'
4848
description: |
4949
If you are already advanced in scripting, using this code is recommended, as it is much more compact:
5050
append: true
51-
exampleTitle: 'Toggle Cursor by binded key'
51+
title: 'Toggle Cursor by bound key (Advanced)'

functions/Element/getElementHealth.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
shared: &shared
22
name: 'getElementHealth'
33
oop:
4-
entity: element
4+
element: element
55
method: getHealth
66
variable: health
77
pair: 'setElementHealth'

functions/Element/getElementPosition.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
shared: &shared
22
name: 'getElementPosition'
33
oop:
4-
entity: element
4+
element: element
55
method: getPosition
66
variable: position
77
pair: 'setElementPosition'

functions/Element/setElementHealth.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
shared: &shared
22
name: 'setElementHealth'
33
oop:
4-
entity: element
4+
element: element
55
method: setHealth
66
variable: health
77
pair: 'getElementHealth'

functions/Element/setElementPosition.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
shared: &shared
22
name: 'setElementPosition'
33
oop:
4-
entity: element
4+
element: element
55
method: setPosition
66
variable: position
77
pair: 'getElementPosition'

functions/File/fileClose.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ shared: &shared
55
content: |
66
It is important to remember to close a file after you've finished all your operations on it, especially if you've been writing to the file. If you don't close a file and your resource crashes, all changes to the file may be lost.
77
oop:
8-
entity: file
8+
element: file
99
method: close
1010
description: Closes a file handle obtained by [[fileCreate]] or [[fileOpen]].
1111
parameters:

functions/File/fileCopy.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ shared: &shared
55
content: |
66
If you do not want to share the content of the created file with other servers, prepend the file path with @ (See [[filepath]] for more information).
77
oop:
8-
entity: file
8+
element: file
99
static: true
1010
method: copy
1111
description: This function copies a file.

functions/File/fileCreate.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ shared: &shared
1111
content: |
1212
It is important to remember to close a file after you've finished all your operations on it, especially if you've been writing to the file. If you don't close a file and your resource crashes, all changes to the file may be lost.
1313
oop:
14-
entity: file
14+
element: file
1515
static: true
1616
method: new
1717
description: Creates a new file in a directory of a resource. If there already exists a file with the specified name, it is overwritten with an empty file.

functions/File/fileDelete.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
shared: &shared
22
name: fileDelete
33
oop:
4-
entity: file
4+
element: file
55
static: true
66
method: delete
77
description: Deletes the specified file.

functions/File/fileExists.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
shared: &shared
22
name: fileExists
33
oop:
4-
entity: file
4+
element: file
55
static: true
66
method: exists
77
description: This functions checks whether a specified file exists inside a resource.

functions/File/fileFlush.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ shared: &shared
44
- type: 'info'
55
content: '[[fileClose]] automatically flushes the file.'
66
oop:
7-
entity: file
7+
element: file
88
method: flush
99
description: |
1010
Forces pending disk writes to be executed. [[fileWrite]] doesn't directly write to the hard disk but places the data in a temporary buffer; only when there is enough data in the buffer it is actually written to disk. Call this function if you need the data written right now without closing the file. This is useful for log files that might want to be read while the resource is still executing. `fileFlush` can be called after each log entry is written. Without this, the file may appear empty or outdated to the user.

functions/File/fileGetContents.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ shared: &shared
55
content: |
66
Please note that even if you enable SD #22 and #23 on your server, you are not protected from user attacks, which can happen after verification of the file, but before you read the contents of such verified file. This function enables you to safely read the contents of a meta.xml-listed file on both client and server.
77
oop:
8-
entity: file
8+
element: file
99
method: getContents
1010
description: |
1111
Reads the entire contents of the file, optionally verifies the read contents by computing and comparing the checksum with the expected one, and returns the content as string. The file cursor position is not modified by calls to this function. File must be added in the [[meta.xml]].

functions/File/fileGetPath.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
shared: &shared
22
name: fileGetPath
33
oop:
4-
entity: file
4+
element: file
55
method: getPath
66
variable: path
77
description: This function retrieves the path of the given file.

functions/File/fileGetPos.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ shared: &shared
22
name: fileGetPos
33
pair: fileSetPos
44
oop:
5-
entity: file
5+
element: file
66
method: getPos
77
variable: pos
88
description: Returns the current read/write position in the given file.

functions/File/fileGetSize.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
shared: &shared
22
name: fileGetSize
33
oop:
4-
entity: file
4+
element: file
55
method: getSize
66
variable: size
77
description: Returns the total size in **bytes** of the given file.

functions/File/fileIsEOF.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ shared: &shared
77
content: |
88
When you open a file, its file position is set to the beginning of the file. Each call to [[fileRead]] or [[fileWrite]] moves the position ahead by the amount of bytes that were read/written. This way, by using [[fileIsEOF]] you can check if you've passed through the whole file.
99
oop:
10-
entity: file
10+
element: file
1111
method: isEOF
1212
variable: eof
1313
description: Checks if the file position is at the end of the file.

functions/File/fileOpen.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ shared: &shared
44
- type: 'important'
55
content: To prevent memory leaks, ensure each successful call to [[fileOpen]] has a matching call to [[fileClose]].
66
oop:
7-
entity: file
7+
element: file
88
constructorclass: File
99
description: Opens an existing file for reading and writing.
1010
parameters:

functions/File/fileRead.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ shared: &shared
44
- type: 'info'
55
content: '[[fileOpen]] sets the read/write position to the beginning of the file. [[fileGetSize]] gets the total size in bytes of given file.'
66
oop:
7-
entity: file
7+
element: file
88
method: read
99
description: Reads the specified number of bytes from the given file starting at its current read/write position, and returns them as a string.
1010
parameters:

functions/File/fileRename.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ shared: &shared
55
content: |
66
Also with this function you can move specified file to a new location, new folder or even to another resource's folder. But for this action executing resource must have `ModifyOtherObjects` [[ACL]] right set to true.
77
oop:
8-
entity: file
8+
element: file
99
method: rename
1010
description: Renames the specified file.
1111
parameters:

functions/File/fileSetPos.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
shared: &shared
22
name: fileSetPos
33
oop:
4-
entity: file
4+
element: file
55
method: setPos
66
variable: pos
77
description: Sets the current read/write position in the file.

functions/File/fileWrite.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ shared: &shared
55
content: |
66
It is important to remember to close a file after you've finished all your operations on it, especially if you've been writing to the file. If you don't close a file and your resource crashes, all changes to the file may be lost.
77
oop:
8-
entity: file
8+
element: file
99
method: write
1010
description: Writes one or more strings to a given file, starting at the current read/write position. Advances the position over the number of bytes that were written.
1111
parameters:

functions/Player/getPlayerName.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
shared: &shared
22
name: 'getPlayerName'
33
oop:
4-
entity: player
4+
element: player
55
method: getName
66
variable: name
77
pair: 'setPlayerName'

functions/Vehicle/createVehicle.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ shared: &shared
1111
content: |
1212
It's worth nothing that the position of the vehicle is the center point of the vehicle, not its base. As such, you need to ensure that the z value (vertical axis) is some height above the ground. You can find the exact height using the client side function [getElementDistanceFromCentreOfMassToBaseOfModel](/getElementDistanceFromCentreOfMassToBaseOfModel), or you can estimate it yourself and just spawn the vehicle so it drops to the ground.
1313
oop:
14-
entity: vehicle
14+
element: vehicle
1515
constructorclass: Vehicle
1616
description: |
1717
This function creates a [vehicle](/vehicle) at the specified location.

functions/Vehicle/setVehicleSirensOn.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
shared: &shared
22
name: 'setVehicleSirensOn'
33
oop:
4-
entity: vehicle
4+
element: vehicle
55
method: setSirensOn
66
variable: sirensOn
77
pair: 'getVehicleSirensOn'

functions/XML/xmlCopyFile.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ shared: &shared
55
content: |
66
To prevent memory leaks, ensure each call to **xmlCopyFile** has a matching call to [xmlUnloadFile](/xmlUnloadFile).
77
oop:
8-
entity: xmlnode
8+
element: xmlnode
99
method: copy
1010
description: |
1111
This function copies all contents of a certain node in a XML document to a new document file, so the copied node becomes the new file's root node. The new file will not be saved to file system until [xmlSaveFile](/xmlSaveFile) is called.

functions/XML/xmlCreateChild.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
shared: &shared
22
name: 'xmlCreateChild'
33
oop:
4-
entity: xmlnode
4+
element: xmlnode
55
method: createChild
66
description: |
77
This function creates a new child node under an XML node.

functions/XML/xmlCreateFile.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ shared: &shared
88
content: |
99
If you do not want to share the content of the created file with other servers, prepend the file path with @ (See [filepath](/filepath) for more information).
1010
oop:
11-
entity: xmlnode
11+
element: xmlnode
1212
constructorclass: XML
1313
description: |
1414
This function creates a new XML document, which can later be saved to a file by using [xmlSaveFile](/xmlSaveFile). This function will overwrite the file specified if it already exists.

functions/XML/xmlDestroyNode.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
shared: &shared
22
name: 'xmlDestroyNode'
33
oop:
4-
entity: xmlnode
4+
element: xmlnode
55
method: destroy
66
description: |
77
This function destroys a XML node from the XML node tree.

functions/XML/xmlFindChild.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
shared: &shared
22
name: 'xmlFindChild'
33
oop:
4-
entity: xmlnode
4+
element: xmlnode
55
method: findChild
66
description: |
77
This function returns a named child node of an XML node.

functions/XML/xmlLoadFile.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
shared: &shared
22
name: 'xmlLoadFile'
33
oop:
4-
entity: XML
4+
element: xmlnode # This will actually show as XML
55
static: true
66
method: load
77
description: |

functions/XML/xmlLoadString.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
shared: &shared
22
name: 'xmlLoadString'
33
oop:
4-
entity: XML
4+
element: xmlnode # This will actually show as XML
55
static: true
66
method: loadstring
77
description: |

functions/XML/xmlNodeGetAttribute.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ shared: &shared
22
name: 'xmlNodeGetAttribute'
33
pair: 'xmlNodeSetAttribute'
44
oop:
5-
entity: xmlnode
5+
element: xmlnode
66
method: getAttribute
77
description: |
88
This function is used to return an attribute of a node in a configuration file.

functions/XML/xmlNodeGetAttributes.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
shared: &shared
22
name: 'xmlNodeGetAttributes'
33
oop:
4-
entity: xmlnode
4+
element: xmlnode
55
method: getAttributes
66
variable: attributes
77
description: |

functions/XML/xmlNodeGetChildren.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
shared: &shared
22
name: 'xmlNodeGetChildren'
33
oop:
4-
entity: xmlnode
4+
element: xmlnode
55
method: getChildren
66
variable: children
77
description: |

functions/XML/xmlNodeGetName.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ shared: &shared
22
name: 'xmlNodeGetName'
33
pair: 'xmlNodeSetName'
44
oop:
5-
entity: xmlnode
5+
element: xmlnode
66
method: getName
77
variable: name
88
description: |

functions/XML/xmlNodeGetParent.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
shared: &shared
22
name: 'xmlNodeGetParent'
33
oop:
4-
entity: xmlnode
4+
element: xmlnode
55
method: getParent
66
variable: parent
77
description: |

functions/XML/xmlNodeGetValue.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ shared: &shared
22
name: 'xmlNodeGetValue'
33
pair: 'xmlNodeSetValue'
44
oop:
5-
entity: xmlnode
5+
element: xmlnode
66
method: getValue
77
variable: value
88
description: |

functions/XML/xmlNodeSetAttribute.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ shared: &shared
22
name: 'xmlNodeSetAttribute'
33
pair: 'xmlNodeGetAttribute'
44
oop:
5-
entity: xmlnode
5+
element: xmlnode
66
method: setAttribute
77
description: |
88
This function is used to edit an attribute of a node in a configuration file.

functions/XML/xmlNodeSetName.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ shared: &shared
22
name: 'xmlNodeSetName'
33
pair: 'xmlNodeGetName'
44
oop:
5-
entity: xmlnode
5+
element: xmlnode
66
method: setName
77
variable: name
88
description: |

functions/XML/xmlNodeSetValue.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ shared: &shared
22
name: 'xmlNodeSetValue'
33
pair: 'xmlNodeGetValue'
44
oop:
5-
entity: xmlnode
5+
element: xmlnode
66
method: setValue
77
variable: value
88
description: |

functions/XML/xmlSaveFile.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
shared: &shared
22
name: 'xmlSaveFile'
33
oop:
4-
entity: xmlnode
4+
element: xmlnode
55
method: saveFile
66
description: |
77
This function saves a loaded XML file.

functions/XML/xmlUnloadFile.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
shared: &shared
22
name: 'xmlUnloadFile'
33
oop:
4-
entity: xmlnode
4+
element: xmlnode
55
method: unload
66
description: |
77
Unloads an XML document from memory.

0 commit comments

Comments
 (0)