<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.rage.mp/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=JockeyBird</id>
	<title>RAGE Multiplayer Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.rage.mp/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=JockeyBird"/>
	<link rel="alternate" type="text/html" href="https://wiki.rage.mp/wiki/Special:Contributions/JockeyBird"/>
	<updated>2026-06-23T17:51:49Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.40.0</generator>
	<entry>
		<id>https://wiki.rage.mp/w/index.php?title=Object::getClosestObjectOfType&amp;diff=20760</id>
		<title>Object::getClosestObjectOfType</title>
		<link rel="alternate" type="text/html" href="https://wiki.rage.mp/w/index.php?title=Object::getClosestObjectOfType&amp;diff=20760"/>
		<updated>2021-07-01T15:25:41Z</updated>

		<summary type="html">&lt;p&gt;JockeyBird: /* Example */ should work now, apparently, forEach messes with return...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Has 8 params in the latest patches.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;isMission - if true doesn&#039;t return mission objects&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;mp.game.object.getClosestObjectOfType(x, y, z, radius, modelHash, isMission, p6, p7);&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
=== Required Arguments ===&lt;br /&gt;
*&#039;&#039;&#039;x:&#039;&#039;&#039; float&lt;br /&gt;
*&#039;&#039;&#039;y:&#039;&#039;&#039; float&lt;br /&gt;
*&#039;&#039;&#039;z:&#039;&#039;&#039; float&lt;br /&gt;
*&#039;&#039;&#039;radius:&#039;&#039;&#039; float&lt;br /&gt;
*&#039;&#039;&#039;modelHash:&#039;&#039;&#039; Model hash or name&lt;br /&gt;
*&#039;&#039;&#039;isMission:&#039;&#039;&#039; Boolean&lt;br /&gt;
*&#039;&#039;&#039;p6:&#039;&#039;&#039; Boolean&lt;br /&gt;
*&#039;&#039;&#039;p7:&#039;&#039;&#039; Boolean&lt;br /&gt;
===Return value===&lt;br /&gt;
*&#039;&#039;&#039;Object handle&#039;&#039;&#039;&lt;br /&gt;
==Example==&lt;br /&gt;
I use it for interaction with objects of type. E.g. atms, vending machines, bins, etc...&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
const player = mp.players.local;&lt;br /&gt;
// atms&lt;br /&gt;
// There are four different types of atms, so I will create this array with hashes of them&lt;br /&gt;
atms = [&lt;br /&gt;
mp.game.joaat(&amp;quot;prop_atm_01&amp;quot;), &lt;br /&gt;
mp.game.joaat(&amp;quot;prop_atm_02&amp;quot;),&lt;br /&gt;
mp.game.joaat(&amp;quot;prop_atm_03&amp;quot;),&lt;br /&gt;
mp.game.joaat(&amp;quot;prop_fleeca_atm&amp;quot;)&lt;br /&gt;
];&lt;br /&gt;
// I need a range. I make this variable to ease any configuration&lt;br /&gt;
var atmRange = 1.5;&lt;br /&gt;
nextToAtm = function(player) {&lt;br /&gt;
    // We want to iterate over every type of atm&lt;br /&gt;
    for (let i = 0; i &amp;lt; atms.length; i++) {&lt;br /&gt;
        const atmHash = atms[i];&lt;br /&gt;
        // any atm withing range our check object, or nothing&lt;br /&gt;
        var check = mp.game.object.getClosestObjectOfType(player.position.x, player.position.y, player.position.z, atmRange, atmHash, false, true, true);&lt;br /&gt;
        // object -&amp;gt; true, nothing -&amp;gt; false&lt;br /&gt;
        if (check) {&lt;br /&gt;
            return true;&lt;br /&gt;
        }&lt;br /&gt;
    });&lt;br /&gt;
    // If none of the types of atms is in reach, we&#039;ll return false&lt;br /&gt;
    return false;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
{{Object_s_function_c}}&lt;br /&gt;
[[Category:Clientside API]]&lt;br /&gt;
[[Category:TODO: Example]]&lt;/div&gt;</summary>
		<author><name>JockeyBird</name></author>
	</entry>
	<entry>
		<id>https://wiki.rage.mp/w/index.php?title=Object::getClosestObjectOfType&amp;diff=20759</id>
		<title>Object::getClosestObjectOfType</title>
		<link rel="alternate" type="text/html" href="https://wiki.rage.mp/w/index.php?title=Object::getClosestObjectOfType&amp;diff=20759"/>
		<updated>2021-07-01T03:28:36Z</updated>

		<summary type="html">&lt;p&gt;JockeyBird: Example: forgot to define player&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Has 8 params in the latest patches.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;isMission - if true doesn&#039;t return mission objects&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;mp.game.object.getClosestObjectOfType(x, y, z, radius, modelHash, isMission, p6, p7);&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
=== Required Arguments ===&lt;br /&gt;
*&#039;&#039;&#039;x:&#039;&#039;&#039; float&lt;br /&gt;
*&#039;&#039;&#039;y:&#039;&#039;&#039; float&lt;br /&gt;
*&#039;&#039;&#039;z:&#039;&#039;&#039; float&lt;br /&gt;
*&#039;&#039;&#039;radius:&#039;&#039;&#039; float&lt;br /&gt;
*&#039;&#039;&#039;modelHash:&#039;&#039;&#039; Model hash or name&lt;br /&gt;
*&#039;&#039;&#039;isMission:&#039;&#039;&#039; Boolean&lt;br /&gt;
*&#039;&#039;&#039;p6:&#039;&#039;&#039; Boolean&lt;br /&gt;
*&#039;&#039;&#039;p7:&#039;&#039;&#039; Boolean&lt;br /&gt;
===Return value===&lt;br /&gt;
*&#039;&#039;&#039;Object handle&#039;&#039;&#039;&lt;br /&gt;
==Example==&lt;br /&gt;
I use it for interaction with objects of type. E.g. atms, vending machines, bins, etc...&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
const player = mp.players.local;&lt;br /&gt;
// atms&lt;br /&gt;
// There are four different types of atms, so I will create this array with hashes of them&lt;br /&gt;
atms = [&lt;br /&gt;
mp.game.joaat(&amp;quot;prop_atm_01&amp;quot;), &lt;br /&gt;
mp.game.joaat(&amp;quot;prop_atm_02&amp;quot;),&lt;br /&gt;
mp.game.joaat(&amp;quot;prop_atm_03&amp;quot;),&lt;br /&gt;
mp.game.joaat(&amp;quot;prop_fleeca_atm&amp;quot;)&lt;br /&gt;
];&lt;br /&gt;
// I need a range. I make this variable to ease any configuration&lt;br /&gt;
var atmRange = 1.5;&lt;br /&gt;
nextToAtm = function(player) {&lt;br /&gt;
    // We want to iterate over every type of atm&lt;br /&gt;
    atms.forEach(atmHash =&amp;gt; {&lt;br /&gt;
        // any atm withing range our check object, or nothing&lt;br /&gt;
        var check = mp.game.object.getClosestObjectOfType(player.position.x, player.position.y, player.position.z, atmRange, atmHash, false, true, true);&lt;br /&gt;
        // object -&amp;gt; true, nothing -&amp;gt; false&lt;br /&gt;
        if (check) {&lt;br /&gt;
            object = check;&lt;br /&gt;
            return true;&lt;br /&gt;
        }&lt;br /&gt;
    });&lt;br /&gt;
    // If none of the types of atms is in reach, we&#039;ll return false&lt;br /&gt;
    return false;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
{{Object_s_function_c}}&lt;br /&gt;
[[Category:Clientside API]]&lt;br /&gt;
[[Category:TODO: Example]]&lt;/div&gt;</summary>
		<author><name>JockeyBird</name></author>
	</entry>
	<entry>
		<id>https://wiki.rage.mp/w/index.php?title=Object::getClosestObjectOfType&amp;diff=20758</id>
		<title>Object::getClosestObjectOfType</title>
		<link rel="alternate" type="text/html" href="https://wiki.rage.mp/w/index.php?title=Object::getClosestObjectOfType&amp;diff=20758"/>
		<updated>2021-07-01T03:06:48Z</updated>

		<summary type="html">&lt;p&gt;JockeyBird: Edited my Example due to some formating mistakes and some wrong code&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Has 8 params in the latest patches.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;isMission - if true doesn&#039;t return mission objects&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;mp.game.object.getClosestObjectOfType(x, y, z, radius, modelHash, isMission, p6, p7);&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
=== Required Arguments ===&lt;br /&gt;
*&#039;&#039;&#039;x:&#039;&#039;&#039; float&lt;br /&gt;
*&#039;&#039;&#039;y:&#039;&#039;&#039; float&lt;br /&gt;
*&#039;&#039;&#039;z:&#039;&#039;&#039; float&lt;br /&gt;
*&#039;&#039;&#039;radius:&#039;&#039;&#039; float&lt;br /&gt;
*&#039;&#039;&#039;modelHash:&#039;&#039;&#039; Model hash or name&lt;br /&gt;
*&#039;&#039;&#039;isMission:&#039;&#039;&#039; Boolean&lt;br /&gt;
*&#039;&#039;&#039;p6:&#039;&#039;&#039; Boolean&lt;br /&gt;
*&#039;&#039;&#039;p7:&#039;&#039;&#039; Boolean&lt;br /&gt;
===Return value===&lt;br /&gt;
*&#039;&#039;&#039;Object handle&#039;&#039;&#039;&lt;br /&gt;
==Example==&lt;br /&gt;
I use it for interaction with objects of type. E.g. atms, vending machines, bins, etc...&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
// atms&lt;br /&gt;
// There are four different types of atms, so I will create this array with hashes of them&lt;br /&gt;
atms = [&lt;br /&gt;
mp.game.joaat(&amp;quot;prop_atm_01&amp;quot;), &lt;br /&gt;
mp.game.joaat(&amp;quot;prop_atm_02&amp;quot;),&lt;br /&gt;
mp.game.joaat(&amp;quot;prop_atm_03&amp;quot;),&lt;br /&gt;
mp.game.joaat(&amp;quot;prop_fleeca_atm&amp;quot;)&lt;br /&gt;
];&lt;br /&gt;
// I need a range. I make this variable to ease any configuration&lt;br /&gt;
var atmRange = 1.5;&lt;br /&gt;
nextToAtm = function(player) {&lt;br /&gt;
    // We want to iterate over every type of atm&lt;br /&gt;
    atms.forEach(atmHash =&amp;gt; {&lt;br /&gt;
        // any atm withing range our check object, or nothing&lt;br /&gt;
        var check = mp.game.object.getClosestObjectOfType(player.position.x, player.position.y, player.position.z, atmRange, atmHash, false, true, true);&lt;br /&gt;
        // object -&amp;gt; true, nothing -&amp;gt; false&lt;br /&gt;
        if (check) {&lt;br /&gt;
            object = check;&lt;br /&gt;
            return true;&lt;br /&gt;
        }&lt;br /&gt;
    });&lt;br /&gt;
    // If none of the types of atms is in reach, we&#039;ll return false&lt;br /&gt;
    return false;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
{{Object_s_function_c}}&lt;br /&gt;
[[Category:Clientside API]]&lt;br /&gt;
[[Category:TODO: Example]]&lt;/div&gt;</summary>
		<author><name>JockeyBird</name></author>
	</entry>
	<entry>
		<id>https://wiki.rage.mp/w/index.php?title=Object::getClosestObjectOfType&amp;diff=20757</id>
		<title>Object::getClosestObjectOfType</title>
		<link rel="alternate" type="text/html" href="https://wiki.rage.mp/w/index.php?title=Object::getClosestObjectOfType&amp;diff=20757"/>
		<updated>2021-07-01T02:59:12Z</updated>

		<summary type="html">&lt;p&gt;JockeyBird: Example added&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Has 8 params in the latest patches.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;isMission - if true doesn&#039;t return mission objects&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;mp.game.object.getClosestObjectOfType(x, y, z, radius, modelHash, isMission, p6, p7);&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
=== Required Arguments ===&lt;br /&gt;
*&#039;&#039;&#039;x:&#039;&#039;&#039; float&lt;br /&gt;
*&#039;&#039;&#039;y:&#039;&#039;&#039; float&lt;br /&gt;
*&#039;&#039;&#039;z:&#039;&#039;&#039; float&lt;br /&gt;
*&#039;&#039;&#039;radius:&#039;&#039;&#039; float&lt;br /&gt;
*&#039;&#039;&#039;modelHash:&#039;&#039;&#039; Model hash or name&lt;br /&gt;
*&#039;&#039;&#039;isMission:&#039;&#039;&#039; Boolean&lt;br /&gt;
*&#039;&#039;&#039;p6:&#039;&#039;&#039; Boolean&lt;br /&gt;
*&#039;&#039;&#039;p7:&#039;&#039;&#039; Boolean&lt;br /&gt;
===Return value===&lt;br /&gt;
*&#039;&#039;&#039;Object handle&#039;&#039;&#039;&lt;br /&gt;
==Example==&lt;br /&gt;
I use it for interaction with objects of type. E.g. atms, vending machines, bins, etc...&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
// atms&lt;br /&gt;
// There are four different types of atms, so I will create this array with hashes of them&lt;br /&gt;
nextToAtm = function(player) {&lt;br /&gt;
    atms = [&lt;br /&gt;
        mp.game.joaat(&amp;quot;prop_atm_01&amp;quot;), &lt;br /&gt;
        mp.game.joaat(&amp;quot;prop_atm_02&amp;quot;),&lt;br /&gt;
        mp.game.joaat(&amp;quot;prop_atm_03&amp;quot;),&lt;br /&gt;
        mp.game.joaat(&amp;quot;prop_fleeca_atm&amp;quot;)&lt;br /&gt;
    ];&lt;br /&gt;
    // I need a range. I make this variable to ease any configuration&lt;br /&gt;
    var atmRange = 1.5;&lt;br /&gt;
    // We want to iterate over every type of atm&lt;br /&gt;
    atms.forEach(atmHash =&amp;gt; {&lt;br /&gt;
        // any atm withing range our check object, or nothing&lt;br /&gt;
        var check = mp.game.object.getClosestObjectOfType(player.position.x, player.position.y, player.position.z, atmRange, atmHash, false, true,         true);&lt;br /&gt;
        // object -&amp;gt; true, nothing -&amp;gt; false&lt;br /&gt;
        if (check) {&lt;br /&gt;
            object = check;&lt;br /&gt;
            return true;&lt;br /&gt;
        }&lt;br /&gt;
    });&lt;br /&gt;
    // If none of the types of atms is in reach, we&#039;ll return false&lt;br /&gt;
    return false;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
{{Object_s_function_c}}&lt;br /&gt;
[[Category:Clientside API]]&lt;br /&gt;
[[Category:TODO: Example]]&lt;/div&gt;</summary>
		<author><name>JockeyBird</name></author>
	</entry>
	<entry>
		<id>https://wiki.rage.mp/w/index.php?title=Getting_Started_with_Server&amp;diff=20755</id>
		<title>Getting Started with Server</title>
		<link rel="alternate" type="text/html" href="https://wiki.rage.mp/w/index.php?title=Getting_Started_with_Server&amp;diff=20755"/>
		<updated>2021-06-29T03:10:48Z</updated>

		<summary type="html">&lt;p&gt;JockeyBird: Added a invalid note to the link&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
*[[Ru:Getting Started with Server]]&lt;br /&gt;
&lt;br /&gt;
This brief tutorial will show you how to run your server on both Windows and Linux distributions.&lt;br /&gt;
&lt;br /&gt;
By default, the server makes use of port 22005 UDP for server access and the port after (here 22006) for the HTTP server hosting the client packages for the clients to download from.&amp;lt;br&amp;gt;      &lt;br /&gt;
So make sure to have done the ports forwarding on your router process and have also unblocked the ports on your firewall before running the server. &lt;br /&gt;
&lt;br /&gt;
=Bridge=&lt;br /&gt;
The following tutorial is found on [https://wiki.gtanet.work/index.php?title=Setting_up_the_Bridge_on_Linux/Windows Setting up the Bridge on Linux/Windows].&lt;br /&gt;
&lt;br /&gt;
=Windows=&lt;br /&gt;
==Prerequisite==&lt;br /&gt;
For a hassle-free installation and operation, it is recommended to have the latest VC Redist.&lt;br /&gt;
&lt;br /&gt;
[https://aka.ms/vs/15/release/VC_redist.x64.exe Microsoft Visual C++ Redistributable 2017]&lt;br /&gt;
&lt;br /&gt;
==Setting up the server==&lt;br /&gt;
1. Download the latest [https://cdn.rage.mp/client/updater.exe updater.exe]. (invalid)&lt;br /&gt;
: &#039;&#039;&#039;Note:&#039;&#039;&#039; Server files are also already included with installation of RAGE-MP Client for Windows.&lt;br /&gt;
&lt;br /&gt;
2. Run the downloaded &#039;&#039;&#039;updater.exe&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
3. Launch &#039;&#039;&#039;server-files/server.exe&#039;&#039;&#039; and you should be able to connect to it (default local host IP: &#039;&#039;&#039;127.0.0.1:22005&#039;&#039;&#039;).&lt;br /&gt;
: Read more about [https://wiki.rage.mp/index.php?title=Server_settings Server Settings].&lt;br /&gt;
&lt;br /&gt;
==Next step==&lt;br /&gt;
[[Getting Started with Development]]&lt;br /&gt;
&lt;br /&gt;
=Linux=&lt;br /&gt;
==Prerequisite==&lt;br /&gt;
It&#039;s recommended to use Debian or Ubuntu to set up a server if you&#039;re new to Linux.&lt;br /&gt;
*Debian 10 or above [https://distrowatch.com/table.php?distribution=debian See more]&lt;br /&gt;
*Ubuntu 18.10 or above [https://distrowatch.com/table.php?distribution=ubuntu See more]&lt;br /&gt;
*An OS that supports glibc v2.28&lt;br /&gt;
&lt;br /&gt;
===Ubuntu===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test&lt;br /&gt;
sudo apt update &amp;amp;&amp;amp; sudo apt install libstdc++6&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Debian===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
echo &#039;deb http://httpredir.debian.org/debian testing main contrib non-free&#039; &amp;gt; /etc/apt/sources.list&lt;br /&gt;
apt update &amp;amp;&amp;amp; apt install -y -t testing libstdc++6&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Setting up server==&lt;br /&gt;
This bash snippet should automate the server installation.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Downloading server&lt;br /&gt;
wget https://cdn.rage.mp/updater/prerelease/server-files/linux_x64.tar.gz&lt;br /&gt;
&lt;br /&gt;
# Extract the server files&lt;br /&gt;
tar -xzf linux_x64.tar.gz&lt;br /&gt;
&lt;br /&gt;
# Accessing the directory&lt;br /&gt;
cd ragemp-srv&lt;br /&gt;
&lt;br /&gt;
# Set executable permission&lt;br /&gt;
chmod +x ragemp-server&lt;br /&gt;
&lt;br /&gt;
# Run the server&lt;br /&gt;
./ragemp-server&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Launching the server as a daemon (systemd)==&lt;br /&gt;
If you want to launch the server as a daemon on the latest version of Ubuntu/Debian/CentOS, you need to follow these steps:&lt;br /&gt;
 &lt;br /&gt;
1. We recommend move your server to /opt&lt;br /&gt;
e.g &#039;&#039;&#039;mv ./ragemp-srv /opt/&#039;&#039;&#039;&lt;br /&gt;
 &lt;br /&gt;
2. Create the systemd unit (e.g /etc/systemd/system/rageserv.service) and enter this config:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;ini&amp;quot;&amp;gt;&lt;br /&gt;
[Unit]&lt;br /&gt;
Description=RAGE-MP Dedicated server&lt;br /&gt;
After=network.target&lt;br /&gt;
StartLimitIntervalSec=0&lt;br /&gt;
 &lt;br /&gt;
[Service]&lt;br /&gt;
Type=simple&lt;br /&gt;
Restart=always&lt;br /&gt;
RestartSec=1&lt;br /&gt;
; not safe, change root to another user&lt;br /&gt;
User=root&lt;br /&gt;
WorkingDirectory=/opt/ragemp-srv&lt;br /&gt;
ExecStart=/opt/ragemp-srv/ragemp-server&lt;br /&gt;
 &lt;br /&gt;
[Install]&lt;br /&gt;
WantedBy=multi-user.target&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Important: If you have not moved the directory, you need to edit WorkingDirectory and ExecStart with new absolute paths.&#039;&#039;&#039;&lt;br /&gt;
 &lt;br /&gt;
3. After saving the new unit we recommend you to update your systemd unit&#039;s list.&lt;br /&gt;
 &lt;br /&gt;
4. Finally! Now you can enable and run the unit via these commands:&lt;br /&gt;
#  systemctl enable rageserv&lt;br /&gt;
#  systemctl start rageserv&lt;br /&gt;
 &lt;br /&gt;
If you want to watch status of your server you need enter:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
systemctl status rageserv&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to restart your server you need to enter:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
systemctl restart rageserv&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
More commands and other details can be found [https://www.freedesktop.org/software/systemd/man/systemctl.html#Unit%20File%20Commands here.]&lt;br /&gt;
&lt;br /&gt;
==Installing screen (Optional)==&lt;br /&gt;
For running the server in the background, we recommend using screen, mainly for its ease of use.&lt;br /&gt;
&lt;br /&gt;
===Debian based (Ubuntu &amp;amp; derivatives)===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt-get install screen&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===CentOS 6.x/7.x===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
yum install screen&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Starting the server===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
screen -dmS GTASERVER -L bash -c &#039;cd ~/srv &amp;amp;&amp;amp; ./server&#039; &amp;amp;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;Parameter explanation:&amp;lt;/u&amp;gt;&lt;br /&gt;
* &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; inline&amp;gt;screen -dmS&amp;lt;/syntaxhighlight&amp;gt; starts a separate shell without directly opening an interface towards it (detached mode). The &amp;lt;tt&amp;gt;S&amp;lt;/tt&amp;gt; param defines a session name for the newly created session (in this case &amp;lt;code&amp;gt;GTASERVER&amp;lt;/code&amp;gt;), so that it is easier to manage in the future.&lt;br /&gt;
* &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; inline&amp;gt;screen -L&amp;lt;/syntaxhighlight&amp;gt; basically logs whatever error that is shown by the server through the separate shell into a file for easier reference in the future.&lt;br /&gt;
&#039;&#039;&#039;!IMPORTANT!&#039;&#039;&#039;&lt;br /&gt;
* Log output will be saved as &amp;lt;code&amp;gt;screenlog.&#039;&#039;_number_&#039;&#039;&amp;lt;/code&amp;gt; in the server directory.&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;amp;&amp;lt;/code&amp;gt; &#039;&#039;&#039;IS IMPORTANT&#039;&#039;&#039; IF YOU WANT TO TERMINATE THE PROCESS GRACEFULLY.&lt;br /&gt;
&lt;br /&gt;
===Stopping the server===&lt;br /&gt;
There are usually two ways to stop the server; One that we call a &#039;&#039;&#039;graceful&#039;&#039;&#039; shutdown that sends the server a signal for termination and the other, well, a &#039;&#039;&#039;crash&#039;&#039;&#039; since it does not allow the code to run through the termination process correctly.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;RECOMMENDED:&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
kill $(ps h --ppid $(screen -ls | grep GTASERVER | cut -d. -f1) -o pid)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOT RECOMMENDED:&#039;&#039;&#039; It does not shut down the server gracefully&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
screen -S GTASERVER -X quit &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Troubleshooting=&lt;br /&gt;
==Linux==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
./server: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.22&#039; not found (required by ./server)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make sure GCC/G++ 6 or newer is installed, follow the [[#Prerequisite_2|Prerequisite]].&lt;br /&gt;
&lt;br /&gt;
= See also =&lt;br /&gt;
* [[Server settings]]&lt;br /&gt;
{{ScriptingTutorials}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Tutorials]]&lt;/div&gt;</summary>
		<author><name>JockeyBird</name></author>
	</entry>
</feed>