GettingStarted: Difference between revisions

Jump to navigation Jump to search
2,020 bytes removed ,  12 August 2021
no edit summary
No edit summary
No edit summary
Line 2: Line 2:
== General Stages ==
== General Stages ==


Download the server files on the Downloads page at [https://gtaconnected.com gtaconnected.com].
- Download the server files on the Downloads page at [https://gtaconnected.com gtaconnected.com].
 
- Unzip/extract the server files to an empty folder.
Extract the server files to an empty folder.
- Change settings in server.xml ([[ServerConfiguration|available settings]])
 
- Run the server executable. For Windows, this will be Server.exe for 32-bit and Server_x64.exe for 64-bit. For Linux, there are several options to do this, see the [[LinuxServer|linux server]] manual page.
Change settings in server.xml.
 
Run Server.exe.


== Player Spawning and Camera Fading ==
== Player Spawning and Camera Fading ==
Line 15: Line 12:


== Manual ==
== Manual ==
Check the [[ServerManual|Server Manual]] page.
Check the [[ServerManual|Server Manual]] page.


== Creating a New Resource ==
== Resources ==
 
Check the [[Resources|resources]] page.
==== Add your resource to server.xml ====
Open file "server.xml" in a text editor, such as Notepad or Notepad++. The file is found in your server folder.<br>
Scroll down to the "<resources>" tag, which is currently at the bottom of the xml file.<br>
Add a "<resource>" tag inside the "<resources>" tag, and give it an attribute with the name "src" and a value of the name of your new resource.<br>
For example:
{{CodeSyntax|1=<resources>
<!-- you will need to put the resources in the folder before any work -->
<resource src="freeroam" />
<resource src="my_new_resource" />
</resources>}}
 
==== Create folder for your resource ====
Open the "resources" folder, which is found in your root server directory.<br>
Create a new folder called "my_new_resource".
 
==== Create meta.xml for your resource ====
Create a file called "meta.xml" inside your "my_new_resource" folder.<br>
Add the following XML text to your meta.xml file:<br>
{{CodeSyntax|1=<meta>
<info author="your_username_here" description="Description for your new resource here." />
 
<script src="my_server_script.js" type="server" language="javascript" />
<script src="my_client_script.js" type="client" language="javascript" />
</meta>}}
 
==== Edit meta.xml for your resource ====
Fill in the defaults for the <info> tag, which include the author and description attributes.<br>
A resource doesn't need to have both server and client scripts, however this example includes both.<br><br>
 
A <script> tag is needed for each script (file) in your resource.<br>
The src attribute for the <script> tag, is the filename of a script, which will be inside your "my_new_resource" folder.<br>
A script can also be in a folder, or a folder in a folder, etc, inside your "my_new_resource" folder.<br><br>
 
The type attribute for the <script> tag, can be either "server" or "client".<br>
Server scripts run on the server, client scripts run on the client.<br>
Different scripting functionality is provided for the server and the client.<br><br>
 
The language attribute for the <script> tag, can be "javascript", "lua", or "squirrel".<br>
A resource can use multiple languages, if desired.<br>
It is also possible to transfer data between different languages, both in the same resource or in different resources, if desired.<br><br>
2,603

edits

Navigation menu