https://wiki.multitheftauto.com/api.php?action=feedcontributions&user=Ccw&feedformat=atomMulti Theft Auto: Wiki - User contributions [en]2024-03-19T04:48:31ZUser contributionsMediaWiki 1.39.3https://wiki.multitheftauto.com/index.php?title=DbQuery&diff=67753DbQuery2020-11-20T03:20:26Z<p>Ccw: </p>
<hr />
<div>__NOTOC__<br />
{{Server function}}<br />
This function starts a database query using the supplied connection. Use the returned query handle with [[dbPoll]] to get the result, or [[dbFree]] if you don't want the result.<br />
{{Tip|The server command [[Server_Commands#debugdb|debugdb 2]] will output verbose information on each query to a logging file (usually '''logs/db.log''')}}<br />
{{Important Note|It is strongly recommended to use this function asynchronously, as presented in "This example starts a select query and processes the result in an inline callback function with custom arguments:"}}<br />
==Syntax== <br />
<syntaxhighlight lang="lua"><br />
handle dbQuery ( [ function callbackFunction, [ table callbackArguments, ] ] element databaseConnection, string query [, var param1 [, var param2 ...]] )<br />
</syntaxhighlight><br />
{{OOP||[[connection]]:query}}<br />
===Required Arguments===<br />
*'''databaseConnection:''' A database connection element previously returned from [[dbConnect]]<br />
*'''query:''' An SQL query. Positions where parameter values will be inserted are marked with a '''?'''<br />
<br />
===Optional Arguments===<br />
*'''callbackFunction:''' An optional function to be called when a result is ready. The function will only be called if the result has not already been read with [[dbPoll]]. The function is called with the query handle as the first argument.<br />
*'''callbackArguments:''' An optional table containing extra arguments to be sent to the callback function.<br />
*'''paramX:''' A variable number of parameters. These must be strings or numbers - it is important to make sure they are of the correct type. Also, the number of parameters passed must be equal to the number of '''?''' characters in the query string.<br />
String parameters are automatically quoted and escaped as required. (If you do not want a string quoted, use '''??''')<br />
<br />
===Returns===<br />
Returns a query handle unless the connection is incorrect, in which case it return ''false''.<br />
<br />
==Example==<br />
This example starts an INSERT query and frees the result:<br />
<syntaxhighlight lang="lua"><br />
local qh = dbQuery( connection, "INSERT INTO table_name VALUES (?,?,?)", "aaa", "bbb", 10 )<br />
dbFree( qh )<br />
</syntaxhighlight><br />
<br />
<br />
This example starts a select query and waits for the result: (server freeze included)<br />
<syntaxhighlight lang="lua"><br />
local qh = dbQuery( connection, "SELECT * FROM table_name" )<br />
local result = dbPoll( qh, -1 )<br />
</syntaxhighlight><br />
<br />
<br />
This example starts a select query and processes the result in a callback function:<br />
<syntaxhighlight lang="lua"><br />
function aaa()<br />
dbQuery( myCallback, connection, "SELECT * FROM table_name" )<br />
end<br />
<br />
function myCallback(qh)<br />
local result = dbPoll( qh, 0 ) -- Timeout doesn't matter here because the result will always be ready<br />
end<br />
</syntaxhighlight><br />
<br />
<br />
This example starts a select query and processes the result in an inline callback function with custom arguments:<br />
<syntaxhighlight lang="lua"><br />
dbQuery( function(qh, tag, score)<br />
local result = dbPoll( qh, 0 ) -- Timeout doesn't matter here because the result will always be ready<br />
outputDebugString( tag ) -- Prints "hello"<br />
outputDebugString( score ) -- Prints 2000<br />
end<br />
,{"hello",2000}, connection, "SELECT * FROM table_name" )<br />
</syntaxhighlight><br />
<br />
<br />
'''''Note''': It is usually good practice to surround table and column names with backticks (`) in case they contain spaces or SQL keywords (and therefore cause syntax errors). This is especially true when using variables for table and column names, as potential problems may not be apparent when the script is first written.''<br><br />
<br />
This example shows how to use backticks and '''??''' for parts of the query that are not column values:<br />
<syntaxhighlight lang="lua"><br />
dbExec( connection, "UPDATE `??` SET `??`=?", tableName, columnName, columnValue )<br />
</syntaxhighlight><br />
<br />
==Requirements==<br />
{{Requirements|1.1.1-9.03328|n/a}}<br />
<br />
==See Also==<br />
{{SQL_functions}}</div>Ccwhttps://wiki.multitheftauto.com/index.php?title=Authorized_Serial_Account_Protection&diff=67120Authorized Serial Account Protection2020-08-03T20:51:01Z<p>Ccw: Reverted edits by Willder (talk) to last revision by Rychardgamer</p>
<hr />
<div>=FAQ=<br />
==Help, I can't login (game)==<br />
To allow the last attempted serial, use the '''authserial''' command in the server console.<br/><br />
For example, to allow the last attempted serial for account ''MrBob'', enter the following command in the server console:<br />
authserial MrBob<br />
<br />
==Help, I can't login (HTTP)==<br />
To login to the HTTP web interface, there are two options:<br />
====Authorize an IP address:====<br />
* Join the MTA server<br />
* Login to the account<br />
* Disconnect from MTA server (optional)<br />
* Login via HTTP<br />
or<br />
<br />
====Set a special password:====<br />
* Use the command '''authserial <account_name> httppass''' in the server console<br />
* Note the supplied 7 digit code<br />
* Login via HTTP and append the supplied 7 digit code to your password<br />
<br/><br />
=Main documentation=<br />
==Introduction==<br />
New from 1.5.3, Authorized Serial Account Protection provides a way to prevent password reuse causing damage to your server.<br />
==How to enable==<br />
Open '''mtaserver.conf''' and find ''<auth_serial_groups>'' and change to below.<br />
(If ''<auth_serial_groups>'' does not exist, then add it)<br />
<auth_serial_groups>Admin</auth_serial_groups><br />
If you wish to protect other ACL groups, then add them separated by commas, e.g.:<br />
<auth_serial_groups>Admin,SuperModerator</auth_serial_groups><br />
<br />
==How to disable==<br />
Open '''mtaserver.conf''' and find ''<auth_serial_groups>'' and change to below<br />
<auth_serial_groups></auth_serial_groups><br />
{{Note|Authorized Serial Account Protection helps prevent your server from getting hacked. If there is a chance any of your admins are using the same password on other servers, then do not disable this feature.}}<br />
==How to use==<br />
To allow the last attempted serial for an account, enter the following command in the server console:<br />
authserial <account_name><br />
To view authorized serials for an account:<br />
authserial <account_name> list<br />
To remove the newest authorized serial for an account:<br />
authserial <account_name> remove<br />
To enable HTTP login from an unauthorized IP, use the following command to get a 7 digit code which should be appended to the HTTP login password ''(Requires server version 1.5.4-9.11302)''<br />
authserial <account_name> httppass</div>Ccwhttps://wiki.multitheftauto.com/index.php?title=Server_mtaserver.conf&diff=65998Server mtaserver.conf2020-04-25T03:12:12Z<p>Ccw: </p>
<hr />
<div>This page lists the settings that can be set in the settings file. ''Setting from the default '''mtaserver.conf''' settings file is in italics''.<br />
<br />
<br />
====servername====<br />
:''<servername>Default MTA Server</servername>''<br />
:This parameter specifies the name the server will be visible as in the ingame server browser and on Game-Monitor. It is a required parameter. <br />
<br />
====owner_email_address====<br />
:''<owner_email_address></owner_email_address>''<br />
:This parameter specifies the contact email addresses for the owner(s) of this server. <br />
:The email addresses will not be publicly available, and only used by MTA administrators to contact the server owner. <br />
:Note: Missing or incorrect owner_email_address can affect visibility in the master server list. <br />
:Values: Comma separated list of email addresses<br />
<br />
====serverip====<br />
:''<serverip>auto</serverip><br />
:'''ONLY USE THIS PARAMETER IF YOU ARE SURE OF WHAT YOU ARE DOING''' - it is generally only needed for professional servers and should be left at the default value otherwise.<br />
: This parameter specifies the IP to use for servers that have multiple IP addresses. If set to auto, it will automatically detect and use the server's standard local IP address.<br />
:Values: auto or x.x.x.x ; default value: auto<br />
:SERVERIP SHOULD BE LEFT SET TO auto UNLESS YOU ARE SURE OF WHAT YOU ARE DOING<br />
:WARNING: SETTING serverip AND THEN ASKING FOR SUPPORT CAN CAUSE DEATH OR INJURY<br />
<br />
====serverport====<br />
:''<serverport>22003</serverport> <br />
:This parameter specifies the UDP port on which the server will be accepting incoming player connections;<br />
:default value: 22003. It is a required parameter.<br />
<br />
====maxplayers====<br />
:''<maxplayers>32</maxplayers><br />
:This parameter specifies the number of maximum player slots available on the server;<br />
:default value: 32. It is a required parameter.<br />
<br />
====httpserver====<br />
<!-- no longer present in mtaserver.conf --><br />
:''<httpserver>1</httpserver><br />
:This parameter specifies whether the built-in http server will be used.<br />
:Values: 0 - disabled , 1 - enabled ; default value: 1. Optional parameter.<br />
:More information: [[Server_Manual#Using_the_web_interface|Using the web interface]]<br />
<br />
====httpport====<br />
:''<httpport>22005</httpport><br />
:This parameter specifies the TCP port on which the server will be accepting incoming http connections. It can be set to the same value as <serverport>. It is a required parameter if <httpserver> is set to 1.<br />
:More information: [[Server_Manual#Using_the_web_interface|Using the web interface]]<br />
<br />
====httpdownloadurl====<br />
:''<httpdownloadurl></httpdownloadurl><br />
:If set, this parameter specifies the external URL from which clients will be able to download needed resources ingame. Otherwise they will download them directly from the server.<br />
:More information: [[Server_Manual#Configuring_an_external_web_server|Configuring an external web server]]<br />
<br />
====httpmaxconnectionsperclient====<br />
:''<httpmaxconnectionsperclient>5</httpmaxconnectionsperclient><br />
:This parameter limits the number of http connections each client can make. Depending on the type of http server that is used, a lower figure may reduce download timeouts. Only relevant when using an external http server.<br />
:Available range: 1 to 8.<br />
<br />
====httpdosthreshold====<br />
:''<httpdosthreshold>20</httpdosthreshold><br />
:This parameter limits the number http connections that an IP can initiate over a short period of time.<br />
:Available range: 1 to 100. default value: 20<br />
<br />
====http_dos_exclude====<br />
:''<http_dos_exclude></http_dos_exclude><br />
:This parameter lists the IP addresses that are to be excluded from http dos threshold limits.<br />
:e.g. 88.11.22.33,101.2.3.4<br />
<br />
====allow_gta3_img_mods====<br />
:''<allow_gta3_img_mods>none</allow_gta3_img_mods><br />
:By default, the server will block the use of locally customized gta3.img player skins<br />
:This setting can be used to allow such mods. Not recommended for competitive servers.<br />
:Values: none, peds ; default value: none<br />
<br />
====client_file====<br />
:''<nowiki><!-- <client_file name="data/carmods.dat" verify="0" /> --></nowiki><br />
:By default, the server will block the use of customized GTA:SA data files.<br />
:To allow specific client files, add one or more of the above lines.<br />
:More information: [[Anti-cheat_guide#.3Cclient_file_name.3D.22data.2Fcarmods.dat.22_verify.3D.220.22.2F.3E|Anti-cheat guide]]<br />
<br />
====disableac====<br />
:''<disableac></disableac><br />
:Comma separated list of disabled anti-cheats.<br />
:e.g. To disable anti-cheat #2 and #3, use: 2,3<br />
:More information: [[Anti-cheat_guide#.3Cdisableac.3E.3C.2Fdisableac.3E|Anti-cheat guide]]<br />
<br />
====enablesd====<br />
:''<enablesd>31,32</enablesd><br />
:Comma separated list of enabled special detections. A special detection is a type of anti-cheat for (usually) harmless game modifications. <br />
:Competitive servers may wish to enable certain special detections, but most servers should leave this setting on its default.<br />
:Values: special detection (SD) codes ; default value: 31,32 (e.g. enables special detections #31 and #32)<br />
:More information: [[Anti-cheat_guide#.3Cenablesd.3E.3C.2Fenablesd.3E|Anti-cheat guide]]<br />
<br />
====minclientversion====<br />
:''<minclientversion></minclientversion><br />
:Minimum client version. Clients with a lower version will not be allowed to connect. After disconnection, clients will be given an opportunity to download an update. If left blank, this setting is disabled and there are no restrictions on who can connect. Version numbers are described in [[getPlayerVersion]] and look like this: 1.1.0-9.03100.0<br />
:This parameter can changed and saved while the server is running with [[setServerConfigSetting]]<br />
:'''Note that this setting only determines if the client should be prompted to update. The actual build number they receive will be the [[http://nightly.mtasa.com/ver highest available]].'''<br />
<br />
====minclientversion_auto_update====<br />
:''<minclientversion_auto_update>1</minclientversion_auto_update><br />
:This parameter specifies if/when the <minclientversion> setting is automatically updated.<br />
:Keeping <minclientversion> updated can help reduce cheating.<br />
:Note: The instant setting (2) is only recommended for competitive servers.<br />
:Values: 0 - disabled, 1 - enabled (delayed by a few days), 2 - enabled (instant) ; default value: 1.<br />
<br />
====recommendedclientversion====<br />
:''<recommendedclientversion></recommendedclientversion><br />
:Recommended client version. When connecting, if clients have a lower version, they will be given the option to download an update. If left blank, this setting is disabled.<br />
:This parameter can changed and saved while the server is running with [[setServerConfigSetting]]<br />
:'''Note that this setting only determines if the client should be prompted to update. The actual build number they receive will be the [[http://nightly.mtasa.com/ver highest available]].'''<br />
<br />
====ase====<br />
:''<ase>1</ase><br />
:This parameter can be used to make the server report to Game-Monitor master servers, allowing it to be visible in the in-game server browser. An additional UDP port needs to be available for this to work (value from <serverport> + 123 , so on a default <serverport> value 22003 the right port will be 22126 ).<br />
:Available values: 0 - disabled , 1 - enabled. Optional parameter, defaults to 0.<br />
<br />
====donotbroadcastlan====<br />
:''<donotbroadcastlan>0</donotbroadcastlan><br />
:This parameter allows you to disable LAN broadcasting. <br />
<br />
====password====<br />
:''<password></password> <br />
:If set, players will have to provide a password specified below, before they can connect to the server. If left blank, server doesn't require a password from them.<br />
:This parameter can changed and saved while the server is running with [[setServerPassword]] or [[setServerConfigSetting]]<br />
<br />
====bandwidth_reduction====<br />
:''<bandwidth_reduction>medium</bandwidth_reduction> <br />
:This parameter reduces the server's bandwidth usage by using various optimizations.<br />
:Values: none, medium or maximum ; default value: medium<br />
:This parameter can be changed and saved while the server is running with [[setServerConfigSetting]]<br />
<br />
====unoccupied_vehicle_syncer_distance====<br />
<!-- no longer present in mtaserver.conf --><br />
:''<unoccupied_vehicle_syncer_distance>130</unoccupied_vehicle_syncer_distance><br />
:This parameter determines the distance limit for remote synced unoccupied vehicles<br />
:Available range: 50 - 400; default value: 130<br />
:This parameter can be changed and saved while the server is running with [[setServerConfigSetting]]<br />
<br />
====ped_syncer_distance====<br />
<!-- no longer present in mtaserver.conf --><br />
:''<ped_syncer_distance>100</ped_syncer_distance><br />
:This parameter determines the distance limit for remote synced peds<br />
:Available range: 50 - 400; default value: 100<br />
:This parameter can be changed and saved while the server is running with [[setServerConfigSetting]]<br />
<br />
====player_sync_interval====<br />
:''<player_sync_interval>100</player_sync_interval> <br />
:This parameter determines the time in milliseconds between player sync packets.<br />
:Available range: 50 - 500; default value: 100<br />
:This parameter can be changed and saved while the server is running with [[setServerConfigSetting]]<br />
:Suggested values for this and the other sync_interval settings can be found here: [[Sync_interval_settings|Sync interval settings]]<br />
<br />
====lightweight_sync_interval====<br />
:''<lightweight_sync_interval>1500</lightweight_sync_interval> <br />
:This parameter determines the time in milliseconds between lightweight (player) sync packets.<br />
:Available range: 200 - 4000; default value: 1500<br />
:This parameter can be changed and saved while the server is running with [[setServerConfigSetting]]<br />
:Suggested values for this and the other sync_interval settings can be found here: [[Sync_interval_settings|Sync interval settings]]<br />
<br />
====camera_sync_interval====<br />
:''<camera_sync_interval>500</camera_sync_interval> <br />
:This parameter determines the time in milliseconds between camera sync packets.<br />
:Available range: 200 - 400; default value: 500<br />
:This parameter can be changed and saved while the server is running with [[setServerConfigSetting]]<br />
:Suggested values for this and the other sync_interval settings can be found here: [[Sync_interval_settings|Sync interval settings]]<br />
<br />
====ped_sync_interval====<br />
:''<ped_sync_interval>400</ped_sync_interval> <br />
:This parameter determines the time in milliseconds between ped sync packets.<br />
:Available range: 200 - 4000; default value: 400<br />
:This parameter can be changed and saved while the server is running with [[setServerConfigSetting]]<br />
:Suggested values for this and the other sync_interval settings can be found here: [[Sync_interval_settings|Sync interval settings]]<br />
<br />
====unoccupied_vehicle_sync_interval====<br />
:''<unoccupied_vehicle_sync_interval>1000</unoccupied_vehicle_sync_interval> <br />
:This parameter determines the time in milliseconds between unoccupied vehicle sync packets.<br />
:Available range: 200 - 4000; default value: 1000<br />
:This parameter can be changed and saved while the server is running with [[setServerConfigSetting]]<br />
:Suggested values for this and the other sync_interval settings can be found here: [[Sync_interval_settings|Sync interval settings]]<br />
<br />
====keysync_mouse_sync_interval====<br />
:''<keysync_mouse_sync_interval>100</keysync_mouse_sync_interval> <br />
:This parameter determines the minimum time in milliseconds between key sync packets due to mouse movement.<br />
:Available range: 50 - 500; default value: 100<br />
:This parameter can be changed and saved while the server is running with [[setServerConfigSetting]]<br />
:Suggested values for this and the other sync_interval settings can be found here: [[Sync_interval_settings|Sync interval settings]]<br />
<br />
====keysync_analog_sync_interval====<br />
:''<keysync_analog_sync_interval>100</keysync_analog_sync_interval> <br />
:This parameter determines the minimum time in milliseconds between key sync packets due to joystick movement.<br />
:Available range: 50 - 500; default value: 100<br />
:This parameter can be changed and saved while the server is running with [[setServerConfigSetting]]<br />
:Suggested values for this and the other sync_interval settings can be found here: [[Sync_interval_settings|Sync interval settings]]<br />
<br />
====bullet_sync====<br />
:''<bullet_sync>1</bullet_sync> <br />
:This parameter can improve the reliability of shots when using certain weapons. However, it uses more bandwidth.<br />
:Note that bullet sync will be active regardless of this setting when certain [[setGlitchEnabled|glitches]] are enabled.<br />
:Values: 0 - disabled , 1 - enabled ; default value: 1.<br />
:This parameter can be changed and saved while the server is running with [[setServerConfigSetting]]<br />
<br />
====vehext_percent====<br />
:''<vehext_percent>0</vehext_percent><br />
:This parameter sets the amount of extrapolation that clients will apply to remote vehicles. <br />
:This can reduce some of the latency induced location disparency by predicting where the remote vehicles will probably be.<br />
:Depending on the gamemode, an incorrect prediction may have a negative effect. <br />
:Therefore this setting should be considered experimental.<br />
:Available range: 0 to 100. Default - 0<br />
<br />
====vehext_ping_limit====<br />
:''<vehext_ping_limit>150</vehext_ping_limit><br />
:This parameter places a limit on how much time (in milliseconds) the vehicle extrapolation will attempt to compensate for.<br />
:Only relevant if <vehext_percent> is greater than zero.<br />
:Available range: 50 to 500. Default - 150<br />
<br />
====latency_reduction====<br />
:''<latency_reduction>0</latency_reduction><br />
:This parameter can reduce the delay of player actions appearing on remote clients by 2 frames (approx 50ms).<br />
:Due to the impact this may have on shot lag compensation, it should be considered experimental.<br />
:Values: 0 - disabled , 1 - enabled ; default value: 0.<br />
:Bugs caused by enabling latency_reduction: http://bugs.mtasa.com/view.php?id=8191 + http://bugs.mtasa.com/view.php?id=8226<br />
<br />
====threadnet====<br />
<!-- no longer present in mtaserver.conf --><br />
:''<threadnet>1</threadnet><br />
:This parameter specifies whether or not to run the network synchronization on another thread.<br />
:Enabling will make the sync smoother, but may increase CPU usage slightly.<br />
:Values: 0 - disabled , 1 - enabled ; default value: 1.<br />
:This parameter can be changed and saved while the server is running with [[setServerConfigSetting]]<br />
<br />
====idfile====<br />
:''<idfile>server-id.keys</idfile> <br />
:Specifies the location and file name of this servers unique private key. This is used to prevent private files saved on the client from being read by other servers. <br />
:Keep a backup of this file in a safe place. Default value: server-id.keys<br />
:More information about client private files: [[Filepath]]<br />
<br />
====logfile====<br />
:''<logfile>logs/server.log</logfile><br />
:Specifies the location and name of the main server log file. If left blank, server won't be saving this file.<br />
<br />
====authfile====<br />
:''<authfile>logs/server_auth.log</authfile><br />
:As well as the main log file, login successes and failures are logged here for easy reviewing of security issues. If left blank, this file is not used<br />
<br />
====dbfile====<br />
:''<dbfile>logs/db.log</dbfile><br />
:Specifies the location and name of the file used to log database queries. The server command [[Server_Commands#debugdb|debugdb]] sets the amount of logging.<br />
<br />
====loadstringfile====<br />
:''<nowiki><!-- <loadstringfile>logs/loadstring.log</loadstringfile> --></nowiki><br />
:Specifies the location and name of the file used to log loadstring function calls. If left blank or not set, no logging is done.<br />
<br />
====acl====<br />
:''<acl>acl.xml</acl> <br />
:This parameter specifies the location and name of the Access Control List settings file. If left<br />
:blank, server will use acl.xml file, located in the same folder as this configuration file.<br />
<br />
====scriptdebuglogfile====<br />
:''<scriptdebuglogfile>logs/scripts.log</scriptdebuglogfile> <br />
:Specifies the location and name of the debugscript log file. If left blank, server won't be saving this file.<br />
<br />
====scriptdebugloglevel====<br />
:''<scriptdebugloglevel>0</scriptdebugloglevel><br />
:Specifies the level of the debugscript log file. Available values: 0, 1, 2, 3. When not set, defaults to 0.<br />
<br />
====htmldebuglevel====<br />
:''<htmldebuglevel>0</htmldebuglevel><br />
:Specifies the level of the html debug. Available values: 0, 1, 2, 3. When not set, defaults to 0.<br />
<br />
====filter_duplicate_log_lines====<br />
:''<filter_duplicate_log_lines>1</filter_duplicate_log_lines><br />
:Specifies whether or not duplicate log lines should be filtered. Available values: 0 or 1, defaults to 1.<br />
<br />
====fpslimit====<br />
:''<fpslimit>36</fpslimit><br />
:Specifies the frame rate limit that will be applied to connecting clients.<br />
:Available range: 25 to 100. Default: 36.<br />
:When running the map editor locally (i.e. from the client), the default FPS limit is 50.<br />
:This parameter can be changed and saved while the server is running with [[setServerConfigSetting]]<br />
<br />
====voice====<br />
:''<voice>0</voice><br />
:This parameter specifies whether or not to enable player voice chat in-game<br />
:Values: 0 - disabled , 1 - enabled<br />
<br />
====voice_samplerate====<br />
:''<voice_samplerate>1</voice_samplerate><br />
:This parameter specifies the sample rate for voice chat. 'voice' parameter must be set to 1 for this to be effective. Higher settings use more bandwidth and increase the sampling quality of voice chat<br />
:Values: 0 - Narrowband (8kHz), 1 - Wideband (16kHz), 2 - Ultrawideband (32kHz). Default - 1<br />
<br />
====voice_quality====<br />
:''<voice_quality>4</voice_quality><br />
:This parameter specifies the voice quality for voice chat. 'voice' parameter must be set to 1 for this to be effective. Higher settings use more bandwidth and increase the the overall quality of voice chat<br />
:Available range: 0 to 10. Default - 4<br />
<br />
====voice_bitrate====<br />
:''<nowiki><!-- <voice_bitrate>24600</voice_bitrate> --></nowiki><br />
:Specifies the voice bitrate, in bps. This optional parameter overrides the previous two settings. If not set, MTA handles this automatically. Use with care.<br />
<br />
====backup_path====<br />
:''<backup_path>backups</backup_path><br />
:This parameter specifies the path to use for a basic backup of some server files. Note that basic backups are only made during server startup. Default value: backups<br />
<br />
====backup_interval====<br />
:''<backup_interval>3</backup_interval><br />
:This parameter specifies the number of days between each basic backup. Backups are only made during server startup, so the actual interval maybe much longer. Setting backup_interval to 0 will disable backups<br />
:Available range: 0 to 30. Default - 3<br />
<br />
====backup_copies====<br />
:''<backup_copies>10</backup_copies><br />
:This parameter specifies the maximum number of backup copies to keep. Setting backup_copies to 0 will disable backups<br />
:Available range: 0 to 100. Default - 10<br />
<br />
====compact_internal_databases====<br />
:''<compact_internal_databases>1</compact_internal_databases><br />
:This parameter specifies when the internal sqlite databases should be defragmented.<br />
:For more info see: http://www.sqlite.org/lang_vacuum.html<br />
:Values: 0 - Never, 1 - On server start only after basic backup, 2 - On server start always. Default - 1<br />
<br />
====crash_dump_upload====<br />
:''<crash_dump_upload>1</crash_dump_upload><br />
:This parameter specifies whether server crash dump files should be sent to MTA HQ.<br />
:Values: 0 - Off, 1 - On. Default - 1<br />
<br />
====fakelag====<br />
<!-- no longer present in mtaserver.conf --><br />
:''<fakelag>0</fakelag><br />
:This parameter specifies whether the [[Command fakelag|fakelag and sfakelag]] commands are enabled<br />
:Values: 0 - Off, 1 - On. Default - 0<br />
<br />
====auth_serial_groups====<br />
:''<auth_serial_groups>Admin</auth_serial_groups><br />
:This parameter lists the ACL groups that are protected by serial authorization.<br />
:Login attempts to a protected account from a second serial are blocked until the serial is manually authorized via the authserial command.<br />
:For more info see: https://mtasa.com/authserial<br />
:Note: This is security critical feature and disabling auth_serial_groups can affect visibility in the master server list.<br />
:Values: Comma separated list of ACL groups. Default - Admin<br />
<br />
====auth_serial_http====<br />
:''<auth_serial_http>1</auth_serial_http><br />
:This parameter specifies if the authorized serial login checks should also apply to the http interface.<br />
:Protected account login attempts to the http interface will only succeed if the IP address matches one recently used by the account holder in-game.<br />
:For more info see: https://mtasa.com/authserialhttp<br />
:Note: This is security critical feature and disabling auth_serial_http can affect visibility in the master server list.<br />
:Values: 0 - Off, 1 - Enabled. Default - 1<br />
<br />
====auth_serial_http_ip_exceptions====<br />
:''<auth_serial_http_ip_exceptions>127.0.0.1</auth_serial_http_ip_exceptions><br />
:This parameter specifies which IP addresses should always pass auth_serial_http checks.<br />
:Values: Comma separated list of IP addresses<br />
<br />
====database_credentials_protection====<br />
:''<database_credentials_protection>1</database_credentials_protection><br />
:This parameter specifies if extra security measures are applied to resources which use [[dbConnect]] with MySQL.<br />
:The extra measures are:<br />
: - script files cannot be accessed with [[fileOpen]]<br />
: - [[meta.xml]] is read-only<br />
:'''NOTE:''' This only protects resources which use [[dbConnect]] with MySQL.<br />
:Values: 0 - Off, 1 - Enabled. Default - 1<br />
<br />
====module====<br />
:''<nowiki><!-- <module src="sample_win32.dll" /> --></nowiki><br />
:''<nowiki><!-- <module src="sample_linux.so" /> --></nowiki><br />
:Specifies the module(s) which are loaded with the server. To load several modules, add more <module> parameter(s). Optional parameter.<br />
<br />
====resource====<br />
:''<resource src="admin" startup="1" protected="0" /><br />
:''<resource src="defaultstats" startup="1" protected="0" /><br />
:''<resource src="helpmanager" startup="1" protected="0" /><br />
:''<resource src="joinquit" startup="1" protected="0" /><br />
:''<resource src="mapcycler" startup="1" protected="0" /><br />
:''<resource src="mapmanager" startup="1" protected="0" /><br />
:''<resource src="parachute" startup="1" protected="0" /><br />
:''<resource src="resourcebrowser" startup="1" protected="1" default="true" /><br />
:''<resource src="resourcemanager" startup="1" protected="1" /><br />
:''<resource src="scoreboard" startup="1" protected="0" /><br />
:''<resource src="spawnmanager" startup="1" protected="0" /><br />
:''<resource src="voice" startup="1" protected="0" /><br />
:''<resource src="votemanager" startup="1" protected="0" /><br />
:''<resource src="webadmin" startup="1" protected="0" /><br />
:''<resource src="play" startup="1" protected="0" /><br />
<br />
:Specifies persistent resources which are loaded when the server starts. Persistent resources are not stopped even if all the other resources that depend on them stop; that is, the only way to stop them is by explicitly using the ''stop'' server command or [[stopResource]] scripting function. To load several resources, add more <resource> parameters.<br />
<br />
:In addition, there are several flags which control how the server deals with each resource:<br />
<br />
:* '''src''': the resource name. This is the only mandatory flag.<br />
:* '''startup''': controls whether the resource will be started with the server or not. If "1", "true" or "yes", the resource will be started. If not specified, defaults to not starting the resource.<br />
:* '''protected''': if "1", "true" or "yes", the resource will not be able to be stopped when started. Otherwise, even if not specified, it will default to the normal behaviour.<br />
:* '''default''': if given a "1", "true" or "yes" value, this resource will be the one who populates the built-in HTTP server main page, which is seen when no resource is given in the web address. It is not possible to have more than one default resource.<br />
<br />
==Deprecated settings==<br />
<br />
The following settings have been deprecated in the production version of MTA:SA and no longer work.<br />
<br />
====networkencryption====<br />
<!-- no longer present in mtaserver.conf - also seems to be deprecated in code --><br />
:''<networkencryption>1</networkencryption><br />
:This parameter specifies whether communications between the server and client is encrypted. Encryption can help prevent network data being viewed and modified.<br />
:Values: 0 - disabled , 1 - enabled ; default value: 1. Optional parameter.<br />
:This parameter can changed and saved while the server is running with [[setServerConfigSetting]]<br />
<br />
====autologin====<br />
<!-- removed from MTA:SA at https://github.com/multitheftauto/mtasa-blue/commit/e392c417da03b295c7f8342a7f6c1467d094db12#diff-b828bcbfff7135920f9a1179be3e3617 --><br />
:''<autologin>0</autologin><br />
:Specifies whether or not players should automatically be logged in based on their IP adresses.<br />
:Values: 0 - disabled , 1 - enabled ; default value: 0.<br />
<br />
[[Category: Support]]<br />
[[ru:Server mtaserver.conf]]</div>Ccwhttps://wiki.multitheftauto.com/index.php?title=Server_mtaserver.conf&diff=65973Server mtaserver.conf2020-04-22T19:29:39Z<p>Ccw: Reverted edits by KAL3NZI (talk) to last revision by Botder</p>
<hr />
<div>This page lists the settings that can be set in the settings file. ''Setting from the default '''mtaserver.conf''' settings file is in italics''.<br />
<br />
<br />
====servername====<br />
:''<servername>Default MTA Server</servername>''<br />
:This parameter specifies the name the server will be visible as in the ingame server browser and on Game-Monitor. It is a required parameter. <br />
<br />
====owner_email_address====<br />
:''<owner_email_address></owner_email_address>''<br />
:This parameter specifies the contact email addresses for the owner(s) of this server.<br />
:The email addresses will not be publicly available, and only used by MTA administrators to contact the server owner.<br />
:Note: Missing or incorrect owner_email_address can affect visibility in the master server list.<br />
:Values: Comma separated list of email addresses<br />
<br />
====serverip====<br />
:''<serverip>auto</serverip><br />
:'''ONLY USE THIS PARAMETER IF YOU ARE SURE OF WHAT YOU ARE DOING''' - it is generally only needed for professional servers and should be left at the default value otherwise.<br />
: This parameter specifies the IP to use for servers that have multiple IP addresses. If set to auto, it will automatically detect and use the server's standard local IP address.<br />
:Values: auto or x.x.x.x ; default value: auto<br />
:SERVERIP SHOULD BE LEFT SET TO auto UNLESS YOU ARE SURE OF WHAT YOU ARE DOING<br />
:WARNING: SETTING serverip AND THEN ASKING FOR SUPPORT CAN CAUSE DEATH OR INJURY<br />
<br />
====serverport====<br />
:''<serverport>22003</serverport> <br />
:This parameter specifies the UDP port on which the server will be accepting incoming player connections;<br />
:default value: 22003. It is a required parameter.<br />
<br />
====maxplayers====<br />
:''<maxplayers>32</maxplayers><br />
:This parameter specifies the number of maximum player slots available on the server;<br />
:default value: 32. It is a required parameter.<br />
<br />
====httpserver====<br />
<!-- no longer present in mtaserver.conf --><br />
:''<httpserver>1</httpserver><br />
:This parameter specifies whether the built-in http server will be used.<br />
:Values: 0 - disabled , 1 - enabled ; default value: 1. Optional parameter.<br />
:More information: [[Server_Manual#Using_the_web_interface|Using the web interface]]<br />
<br />
====httpport====<br />
:''<httpport>22005</httpport><br />
:This parameter specifies the TCP port on which the server will be accepting incoming http connections. It can be set to the same value as <serverport>. It is a required parameter if <httpserver> is set to 1.<br />
:More information: [[Server_Manual#Using_the_web_interface|Using the web interface]]<br />
<br />
====httpdownloadurl====<br />
:''<httpdownloadurl></httpdownloadurl><br />
:If set, this parameter specifies the external URL from which clients will be able to download needed resources ingame. Otherwise they will download them directly from the server.<br />
:More information: [[Server_Manual#Configuring_an_external_web_server|Configuring an external web server]]<br />
<br />
====httpmaxconnectionsperclient====<br />
:''<httpmaxconnectionsperclient>5</httpmaxconnectionsperclient><br />
:This parameter limits the number of http connections each client can make. Depending on the type of http server that is used, a lower figure may reduce download timeouts. Only relevant when using an external http server.<br />
:Available range: 1 to 8.<br />
<br />
====httpdosthreshold====<br />
:''<httpdosthreshold>20</httpdosthreshold><br />
:This parameter limits the number http connections that an IP can initiate over a short period of time.<br />
:Available range: 1 to 100. default value: 20<br />
<br />
====http_dos_exclude====<br />
:''<http_dos_exclude></http_dos_exclude><br />
:This parameter lists the IP addresses that are to be excluded from http dos threshold limits.<br />
:e.g. 88.11.22.33,101.2.3.4<br />
<br />
====allow_gta3_img_mods====<br />
:''<allow_gta3_img_mods>none</allow_gta3_img_mods><br />
:By default, the server will block the use of locally customized gta3.img player skins<br />
:This setting can be used to allow such mods. Not recommended for competitive servers.<br />
:Values: none, peds ; default value: none<br />
<br />
====client_file====<br />
:''<nowiki><!-- <client_file name="data/carmods.dat" verify="0" /> --></nowiki><br />
:By default, the server will block the use of customized GTA:SA data files.<br />
:To allow specific client files, add one or more of the above lines.<br />
:More information: [[Anti-cheat_guide#.3Cclient_file_name.3D.22data.2Fcarmods.dat.22_verify.3D.220.22.2F.3E|Anti-cheat guide]]<br />
<br />
====disableac====<br />
:''<disableac></disableac><br />
:Comma separated list of disabled anti-cheats.<br />
:e.g. To disable anti-cheat #2 and #3, use: 2,3<br />
:More information: [[Anti-cheat_guide#.3Cdisableac.3E.3C.2Fdisableac.3E|Anti-cheat guide]]<br />
<br />
====enablesd====<br />
:''<enablesd>31,32</enablesd><br />
:Comma separated list of enabled special detections. A special detection is a type of anti-cheat for (usually) harmless game modifications. <br />
:Competitive servers may wish to enable certain special detections, but most servers should leave this setting on its default.<br />
:Values: special detection (SD) codes ; default value: 31,32 (e.g. enables special detections #31 and #32)<br />
:More information: [[Anti-cheat_guide#.3Cenablesd.3E.3C.2Fenablesd.3E|Anti-cheat guide]]<br />
<br />
====minclientversion====<br />
:''<minclientversion></minclientversion><br />
:Minimum client version. Clients with a lower version will not be allowed to connect. After disconnection, clients will be given an opportunity to download an update. If left blank, this setting is disabled and there are no restrictions on who can connect. Version numbers are described in [[getPlayerVersion]] and look like this: 1.1.0-9.03100.0<br />
:This parameter can changed and saved while the server is running with [[setServerConfigSetting]]<br />
:'''Note that this setting only determines if the client should be prompted to update. The actual build number they receive will be the [[http://nightly.mtasa.com/ver highest available]].'''<br />
<br />
====minclientversion_auto_update====<br />
:''<minclientversion_auto_update>1</minclientversion_auto_update><br />
:This parameter specifies if/when the <minclientversion> setting is automatically updated.<br />
:Keeping <minclientversion> updated can help reduce cheating.<br />
:Note: The instant setting (2) is only recommended for competitive servers.<br />
:Values: 0 - disabled, 1 - enabled (delayed by a few days), 2 - enabled (instant) ; default value: 1.<br />
<br />
====recommendedclientversion====<br />
:''<recommendedclientversion></recommendedclientversion><br />
:Recommended client version. When connecting, if clients have a lower version, they will be given the option to download an update. If left blank, this setting is disabled.<br />
:This parameter can changed and saved while the server is running with [[setServerConfigSetting]]<br />
:'''Note that this setting only determines if the client should be prompted to update. The actual build number they receive will be the [[http://nightly.mtasa.com/ver highest available]].'''<br />
<br />
====ase====<br />
:''<ase>1</ase><br />
:This parameter can be used to make the server report to Game-Monitor master servers, allowing it to be visible in the in-game server browser. An additional UDP port needs to be available for this to work (value from <serverport> + 123 , so on a default <serverport> value 22003 the right port will be 22126 ).<br />
:Available values: 0 - disabled , 1 - enabled. Optional parameter, defaults to 0.<br />
<br />
====donotbroadcastlan====<br />
:''<donotbroadcastlan>0</donotbroadcastlan><br />
:This parameter allows you to disable LAN broadcasting. <br />
<br />
====password====<br />
:''<password></password> <br />
:If set, players will have to provide a password specified below, before they can connect to the server. If left blank, server doesn't require a password from them.<br />
:This parameter can changed and saved while the server is running with [[setServerPassword]] or [[setServerConfigSetting]]<br />
<br />
====bandwidth_reduction====<br />
:''<bandwidth_reduction>medium</bandwidth_reduction> <br />
:This parameter reduces the server's bandwidth usage by using various optimizations.<br />
:Values: none, medium or maximum ; default value: medium<br />
:This parameter can be changed and saved while the server is running with [[setServerConfigSetting]]<br />
<br />
====unoccupied_vehicle_syncer_distance====<br />
<!-- no longer present in mtaserver.conf --><br />
:''<unoccupied_vehicle_syncer_distance>130</unoccupied_vehicle_syncer_distance><br />
:This parameter determines the distance limit for remote synced unoccupied vehicles<br />
:Available range: 50 - 400; default value: 130<br />
:This parameter can be changed and saved while the server is running with [[setServerConfigSetting]]<br />
<br />
====ped_syncer_distance====<br />
<!-- no longer present in mtaserver.conf --><br />
:''<ped_syncer_distance>100</ped_syncer_distance><br />
:This parameter determines the distance limit for remote synced peds<br />
:Available range: 50 - 400; default value: 100<br />
:This parameter can be changed and saved while the server is running with [[setServerConfigSetting]]<br />
<br />
====player_sync_interval====<br />
:''<player_sync_interval>100</player_sync_interval> <br />
:This parameter determines the time in milliseconds between player sync packets.<br />
:Available range: 50 - 500; default value: 100<br />
:This parameter can be changed and saved while the server is running with [[setServerConfigSetting]]<br />
:Suggested values for this and the other sync_interval settings can be found here: [[Sync_interval_settings|Sync interval settings]]<br />
<br />
====lightweight_sync_interval====<br />
:''<lightweight_sync_interval>1500</lightweight_sync_interval> <br />
:This parameter determines the time in milliseconds between lightweight (player) sync packets.<br />
:Available range: 200 - 4000; default value: 1500<br />
:This parameter can be changed and saved while the server is running with [[setServerConfigSetting]]<br />
:Suggested values for this and the other sync_interval settings can be found here: [[Sync_interval_settings|Sync interval settings]]<br />
<br />
====camera_sync_interval====<br />
:''<camera_sync_interval>500</camera_sync_interval> <br />
:This parameter determines the time in milliseconds between camera sync packets.<br />
:Available range: 200 - 400; default value: 500<br />
:This parameter can be changed and saved while the server is running with [[setServerConfigSetting]]<br />
:Suggested values for this and the other sync_interval settings can be found here: [[Sync_interval_settings|Sync interval settings]]<br />
<br />
====ped_sync_interval====<br />
:''<ped_sync_interval>400</ped_sync_interval> <br />
:This parameter determines the time in milliseconds between ped sync packets.<br />
:Available range: 200 - 4000; default value: 400<br />
:This parameter can be changed and saved while the server is running with [[setServerConfigSetting]]<br />
:Suggested values for this and the other sync_interval settings can be found here: [[Sync_interval_settings|Sync interval settings]]<br />
<br />
====unoccupied_vehicle_sync_interval====<br />
:''<unoccupied_vehicle_sync_interval>1000</unoccupied_vehicle_sync_interval> <br />
:This parameter determines the time in milliseconds between unoccupied vehicle sync packets.<br />
:Available range: 200 - 4000; default value: 1000<br />
:This parameter can be changed and saved while the server is running with [[setServerConfigSetting]]<br />
:Suggested values for this and the other sync_interval settings can be found here: [[Sync_interval_settings|Sync interval settings]]<br />
<br />
====keysync_mouse_sync_interval====<br />
:''<keysync_mouse_sync_interval>100</keysync_mouse_sync_interval> <br />
:This parameter determines the minimum time in milliseconds between key sync packets due to mouse movement.<br />
:Available range: 50 - 500; default value: 100<br />
:This parameter can be changed and saved while the server is running with [[setServerConfigSetting]]<br />
:Suggested values for this and the other sync_interval settings can be found here: [[Sync_interval_settings|Sync interval settings]]<br />
<br />
====keysync_analog_sync_interval====<br />
:''<keysync_analog_sync_interval>100</keysync_analog_sync_interval> <br />
:This parameter determines the minimum time in milliseconds between key sync packets due to joystick movement.<br />
:Available range: 50 - 500; default value: 100<br />
:This parameter can be changed and saved while the server is running with [[setServerConfigSetting]]<br />
:Suggested values for this and the other sync_interval settings can be found here: [[Sync_interval_settings|Sync interval settings]]<br />
<br />
====bullet_sync====<br />
:''<bullet_sync>1</bullet_sync> <br />
:This parameter can improve the reliability of shots when using certain weapons. However, it uses more bandwidth.<br />
:Note that bullet sync will be active regardless of this setting when certain [[setGlitchEnabled|glitches]] are enabled.<br />
:Values: 0 - disabled , 1 - enabled ; default value: 1.<br />
:This parameter can be changed and saved while the server is running with [[setServerConfigSetting]]<br />
<br />
====vehext_percent====<br />
:''<vehext_percent>0</vehext_percent><br />
:This parameter sets the amount of extrapolation that clients will apply to remote vehicles. <br />
:This can reduce some of the latency induced location disparency by predicting where the remote vehicles will probably be.<br />
:Depending on the gamemode, an incorrect prediction may have a negative effect. <br />
:Therefore this setting should be considered experimental.<br />
:Available range: 0 to 100. Default - 0<br />
<br />
====vehext_ping_limit====<br />
:''<vehext_ping_limit>150</vehext_ping_limit><br />
:This parameter places a limit on how much time (in milliseconds) the vehicle extrapolation will attempt to compensate for.<br />
:Only relevant if <vehext_percent> is greater than zero.<br />
:Available range: 50 to 500. Default - 150<br />
<br />
====latency_reduction====<br />
:''<latency_reduction>0</latency_reduction><br />
:This parameter can reduce the delay of player actions appearing on remote clients by 2 frames (approx 50ms).<br />
:Due to the impact this may have on shot lag compensation, it should be considered experimental.<br />
:Values: 0 - disabled , 1 - enabled ; default value: 0.<br />
:Bugs caused by enabling latency_reduction: http://bugs.mtasa.com/view.php?id=8191 + http://bugs.mtasa.com/view.php?id=8226<br />
<br />
====threadnet====<br />
<!-- no longer present in mtaserver.conf --><br />
:''<threadnet>1</threadnet><br />
:This parameter specifies whether or not to run the network synchronization on another thread.<br />
:Enabling will make the sync smoother, but may increase CPU usage slightly.<br />
:Values: 0 - disabled , 1 - enabled ; default value: 1.<br />
:This parameter can be changed and saved while the server is running with [[setServerConfigSetting]]<br />
<br />
====idfile====<br />
:''<idfile>server-id.keys</idfile> <br />
:Specifies the location and file name of this servers unique private key. This is used to prevent private files saved on the client from being read by other servers. <br />
:Keep a backup of this file in a safe place. Default value: server-id.keys<br />
:More information about client private files: [[Filepath]]<br />
<br />
====logfile====<br />
:''<logfile>logs/server.log</logfile><br />
:Specifies the location and name of the main server log file. If left blank, server won't be saving this file.<br />
<br />
====authfile====<br />
:''<authfile>logs/server_auth.log</authfile><br />
:As well as the main log file, login successes and failures are logged here for easy reviewing of security issues. If left blank, this file is not used<br />
<br />
====dbfile====<br />
:''<dbfile>logs/db.log</dbfile><br />
:Specifies the location and name of the file used to log database queries. The server command [[Server_Commands#debugdb|debugdb]] sets the amount of logging.<br />
<br />
====loadstringfile====<br />
:''<nowiki><!-- <loadstringfile>logs/loadstring.log</loadstringfile> --></nowiki><br />
:Specifies the location and name of the file used to log loadstring function calls. If left blank or not set, no logging is done.<br />
<br />
====acl====<br />
:''<acl>acl.xml</acl> <br />
:This parameter specifies the location and name of the Access Control List settings file. If left<br />
:blank, server will use acl.xml file, located in the same folder as this configuration file.<br />
<br />
====scriptdebuglogfile====<br />
:''<scriptdebuglogfile>logs/scripts.log</scriptdebuglogfile> <br />
:Specifies the location and name of the debugscript log file. If left blank, server won't be saving this file.<br />
<br />
====scriptdebugloglevel====<br />
:''<scriptdebugloglevel>0</scriptdebugloglevel><br />
:Specifies the level of the debugscript log file. Available values: 0, 1, 2, 3. When not set, defaults to 0.<br />
<br />
====htmldebuglevel====<br />
:''<htmldebuglevel>0</htmldebuglevel><br />
:Specifies the level of the html debug. Available values: 0, 1, 2, 3. When not set, defaults to 0.<br />
<br />
====filter_duplicate_log_lines====<br />
:''<filter_duplicate_log_lines>1</filter_duplicate_log_lines><br />
:Specifies whether or not duplicate log lines should be filtered. Available values: 0 or 1, defaults to 1.<br />
<br />
====fpslimit====<br />
:''<fpslimit>36</fpslimit><br />
:Specifies the frame rate limit that will be applied to connecting clients.<br />
:Available range: 25 to 100. Default: 36.<br />
:When running the map editor locally (i.e. from the client), the default FPS limit is 50.<br />
:This parameter can be changed and saved while the server is running with [[setServerConfigSetting]]<br />
<br />
====voice====<br />
:''<voice>0</voice><br />
:This parameter specifies whether or not to enable player voice chat in-game<br />
:Values: 0 - disabled , 1 - enabled<br />
<br />
====voice_samplerate====<br />
:''<voice_samplerate>1</voice_samplerate><br />
:This parameter specifies the sample rate for voice chat. 'voice' parameter must be set to 1 for this to be effective. Higher settings use more bandwidth and increase the sampling quality of voice chat<br />
:Values: 0 - Narrowband (8kHz), 1 - Wideband (16kHz), 2 - Ultrawideband (32kHz). Default - 1<br />
<br />
====voice_quality====<br />
:''<voice_quality>4</voice_quality><br />
:This parameter specifies the voice quality for voice chat. 'voice' parameter must be set to 1 for this to be effective. Higher settings use more bandwidth and increase the the overall quality of voice chat<br />
:Available range: 0 to 10. Default - 4<br />
<br />
====voice_bitrate====<br />
:''<nowiki><!-- <voice_bitrate>24600</voice_bitrate> --></nowiki><br />
:Specifies the voice bitrate, in bps. This optional parameter overrides the previous two settings. If not set, MTA handles this automatically. Use with care.<br />
<br />
====backup_path====<br />
:''<backup_path>backups</backup_path><br />
:This parameter specifies the path to use for a basic backup of some server files. Note that basic backups are only made during server startup. Default value: backups<br />
<br />
====backup_interval====<br />
:''<backup_interval>3</backup_interval><br />
:This parameter specifies the number of days between each basic backup. Backups are only made during server startup, so the actual interval maybe much longer. Setting backup_interval to 0 will disable backups<br />
:Available range: 0 to 30. Default - 3<br />
<br />
====backup_copies====<br />
:''<backup_copies>10</backup_copies><br />
:This parameter specifies the maximum number of backup copies to keep. Setting backup_copies to 0 will disable backups<br />
:Available range: 0 to 100. Default - 10<br />
<br />
====compact_internal_databases====<br />
:''<compact_internal_databases>1</compact_internal_databases><br />
:This parameter specifies when the internal sqlite databases should be defragmented.<br />
:For more info see: http://www.sqlite.org/lang_vacuum.html<br />
:Values: 0 - Never, 1 - On server start only after basic backup, 2 - On server start always. Default - 1<br />
<br />
====crash_dump_upload====<br />
:''<crash_dump_upload>1</crash_dump_upload><br />
:This parameter specifies whether server crash dump files should be sent to MTA HQ.<br />
:Values: 0 - Off, 1 - On. Default - 1<br />
<br />
====fakelag====<br />
<!-- no longer present in mtaserver.conf --><br />
:''<fakelag>0</fakelag><br />
:This parameter specifies whether the [[Command fakelag|fakelag and sfakelag]] commands are enabled<br />
:Values: 0 - Off, 1 - On. Default - 0<br />
<br />
====auth_serial_groups====<br />
:''<auth_serial_groups>Admin</auth_serial_groups><br />
:This parameter lists the ACL groups that are protected by serial authorization.<br />
:Login attempts to a protected account from a second serial are blocked until the serial is manually authorized via the authserial command.<br />
:For more info see: https://mtasa.com/authserial<br />
:Note: This is security critical feature and disabling auth_serial_groups can affect visibility in the master server list.<br />
:Values: Comma separated list of ACL groups. Default - Admin<br />
<br />
====auth_serial_http====<br />
:''<auth_serial_http>1</auth_serial_http><br />
:This parameter specifies if the authorized serial login checks should also apply to the http interface.<br />
:Protected account login attempts to the http interface will only succeed if the IP address matches one recently used by the account holder in-game.<br />
:For more info see: https://mtasa.com/authserialhttp<br />
:Note: This is security critical feature and disabling auth_serial_http can affect visibility in the master server list.<br />
:Values: 0 - Off, 1 - Enabled. Default - 1<br />
<br />
====auth_serial_http_ip_exceptions====<br />
:''<auth_serial_http_ip_exceptions>127.0.0.1</auth_serial_http_ip_exceptions><br />
:This parameter specifies which IP addresses should always pass auth_serial_http checks.<br />
:Values: Comma separated list of IP addresses<br />
<br />
====database_credentials_protection====<br />
:''<database_credentials_protection>1</database_credentials_protection><br />
:This parameter specifies if extra security measures are applied to resources which use [[dbConnect]] with MySQL.<br />
:The extra measures are:<br />
: - script files cannot be accessed with [[fileOpen]]<br />
: - [[meta.xml]] is read-only<br />
:'''NOTE:''' This only protects resources which use [[dbConnect]] with MySQL.<br />
:Values: 0 - Off, 1 - Enabled. Default - 1<br />
<br />
====module====<br />
:''<nowiki><!-- <module src="sample_win32.dll" /> --></nowiki><br />
:''<nowiki><!-- <module src="sample_linux.so" /> --></nowiki><br />
:Specifies the module(s) which are loaded with the server. To load several modules, add more <module> parameter(s). Optional parameter.<br />
<br />
====resource====<br />
:''<resource src="admin" startup="1" protected="0" /><br />
:''<resource src="defaultstats" startup="1" protected="0" /><br />
:''<resource src="helpmanager" startup="1" protected="0" /><br />
:''<resource src="joinquit" startup="1" protected="0" /><br />
:''<resource src="mapcycler" startup="1" protected="0" /><br />
:''<resource src="mapmanager" startup="1" protected="0" /><br />
:''<resource src="parachute" startup="1" protected="0" /><br />
:''<resource src="resourcebrowser" startup="1" protected="1" default="true" /><br />
:''<resource src="resourcemanager" startup="1" protected="1" /><br />
:''<resource src="scoreboard" startup="1" protected="0" /><br />
:''<resource src="spawnmanager" startup="1" protected="0" /><br />
:''<resource src="voice" startup="1" protected="0" /><br />
:''<resource src="votemanager" startup="1" protected="0" /><br />
:''<resource src="webadmin" startup="1" protected="0" /><br />
:''<resource src="play" startup="1" protected="0" /><br />
<br />
:Specifies persistent resources which are loaded when the server starts. Persistent resources are not stopped even if all the other resources that depend on them stop; that is, the only way to stop them is by explicitly using the ''stop'' server command or [[stopResource]] scripting function. To load several resources, add more <resource> parameters.<br />
<br />
:In addition, there are several flags which control how the server deals with each resource:<br />
<br />
:* '''src''': the resource name. This is the only mandatory flag.<br />
:* '''startup''': controls whether the resource will be started with the server or not. If "1", "true" or "yes", the resource will be started. If not specified, defaults to not starting the resource.<br />
:* '''protected''': if "1", "true" or "yes", the resource will not be able to be stopped when started. Otherwise, even if not specified, it will default to the normal behaviour.<br />
:* '''default''': if given a "1", "true" or "yes" value, this resource will be the one who populates the built-in HTTP server main page, which is seen when no resource is given in the web address. It is not possible to have more than one default resource.<br />
<br />
==Deprecated settings==<br />
<br />
The following settings have been deprecated in the production version of MTA:SA and no longer work.<br />
<br />
====networkencryption====<br />
<!-- no longer present in mtaserver.conf - also seems to be deprecated in code --><br />
:''<networkencryption>1</networkencryption><br />
:This parameter specifies whether communications between the server and client is encrypted. Encryption can help prevent network data being viewed and modified.<br />
:Values: 0 - disabled , 1 - enabled ; default value: 1. Optional parameter.<br />
:This parameter can changed and saved while the server is running with [[setServerConfigSetting]]<br />
<br />
====autologin====<br />
<!-- removed from MTA:SA at https://github.com/multitheftauto/mtasa-blue/commit/e392c417da03b295c7f8342a7f6c1467d094db12#diff-b828bcbfff7135920f9a1179be3e3617 --><br />
:''<autologin>0</autologin><br />
:Specifies whether or not players should automatically be logged in based on their IP adresses.<br />
:Values: 0 - disabled , 1 - enabled ; default value: 0.<br />
<br />
[[Category: Support]]<br />
[[ru:Server mtaserver.conf]]</div>Ccwhttps://wiki.multitheftauto.com/index.php?title=Building_MTASA_Server_on_GNU_Linux&diff=65899Building MTASA Server on GNU Linux2020-04-20T00:08:31Z<p>Ccw: </p>
<hr />
<div>{{Needs Checking|Confirm steps work.}}<br />
<br />
== Installing and Running MTASA server on Linux ==<br />
{{Note|This article is only for developers who changed the server code. If you are looking for the precompiled server (for normal server owners). Go to: [http://linux.mtasa.com/ linux.mtasa.com] and see [[Installing and Running MTASA Server on GNU_Linux]]}}<br />
<br />
<!--<br />
== Compiling on a 64 bit Linux ==<br />
Additional steps for compiling a MTA server on 64 bit Linux:<br />
===Install 32 bit libs for your 64 bit distro===<br />
For 64 bit Debian, this is achieved with:<br />
<br />
apt-get install ia32-libs<br />
<br />
===64 bit Troubleshooting===<br />
* If you get a problem with such as "libreadline.so.5: cannot open shared object file: No such file or directory.", it can be solved on 64 bit Debian Squeeze by doing this:<br />
<br />
apt-get install lib32readline5<br />
<br />
* If you get a problem with such as "libncursesw.so.5 cannot open shared object file: No such file or directory", it can be solved on 64 bit Debian Squeeze by doing this:<br />
<br />
apt-get install lib32ncursesw5<br />
<br />
* Further 64 bit solutions can be found [http://forum.mtasa.com/viewtopic.php?f=106&t=35328#p367282 on the forums]<br />
<br />
* If you are using Cent OS and you get something like /usr/lib/libstdc++.so.6: version `GLIBCXX_3.4.9' not found (required by xmll.so) this can be resolved by doing downloading the archive [[http://archives.fedoraproject.org/pub/archive/fedora/linux/releases/9/Fedora/i386/os/Packages/libstdc++-4.3.0-8.i386.rpm here]] and unpacking it with the following command:<br />
<br />
rpm2cpio libstdc++-4.3.0-8.i386.rpm | cpio -i --make-directories<br />
--><br />
== Preparing your system ==<br />
<br />
In order to build the Multi Theft Auto dedicated server, you will have to set up your system with the correct libraries and tools. How these are installed depends on your distribution.<br />
<br />
Our network module (net.dll or net.so) is distributed as a precompiled binary library. The file for GNU/Linux can be found inside the lastest Linux nightly from [http://nightly.mtasa.com/ here]. Use the net.so from {{Current Version|master}} if you are compiling from the trunk, or the net.so from {{Current Version|full}} if you are compiling the {{Current Version|full}} branch. Be sure the read the top of ''Server/version.h'' as it contains directions on how to compile the different build types.<br />
<br />
=== Debian Linux ===<br />
<br />
Includes derivative distributions such as Ubuntu.<br />
<br />
You will need the necessary build tools, headers and libraries, which are distributed through the following Debian packages (e.g. Debian Lenny):<br />
<br />
* '''build-essential:''' contains the necessary tools, headers and libraries to build applications<br />
* '''automake:''' contains the automake tools<br />
* '''libtool:''' contains the libtool software required to build libraries<br />
<!--<br />
* '''libcurl3-dev:''' contains the cURL library (version 3 without SSL support)<br />
* '''libpcre3-dev:''' contains the PCRE library (version 3)<br />
* '''libsqlite3-dev:''' contains the SQLite library (version 3)<br />
--><br />
* '''libreadline-gplv2-dev:''' contains the readline library (version 5)<br />
* '''libncurses5-dev:''' contains software for controlling writing to the console screen<br />
* '''libncursesw5-dev:''' contains support for wide characters<br />
<!--<br />
* '''libsparsehash-dev:''' contains support for Google's hash-map '''(So you don't have to compile sparehash!)'''<br />
--><br />
* '''default-libmysqlclient-dev:''' contains the MySQL library<br />
* '''git:''' contains the git client used to check out our code repository<br />
To install these packages through apt, use the apt-get install <package list> command as in the following example (execute as root):<br />
<br />
apt-get install build-essential automake libtool<br />
apt-get install libreadline-gplv2-dev libncurses5-dev libncursesw5-dev<br />
apt-get install default-libmysqlclient-dev git <br />
<br />
Note: On Debian 8 systems please use this: '''apt-get install build-essential automake libtool libreadline-gplv2-dev libncurses5-dev libncursesw5-dev libmysqlclient-dev git'''<br />
=== Gentoo Linux ===<br />
You will need the necessary build tools, headers and libraries. Because Gentoo’s portage system is designed to compile any packages on your own system, the necessary build tools will have already been installed. This only leaves you to install the necessary libraries:<br />
<br />
<!--<br />
* '''sqlite:''' contains the SQLite library<br />
* '''curl:''' contains the cURL library; to compile with SSL support, apply the net-misc/curl SSL USE flag<br />
--><br />
* '''git:''' contains the git client used to check out our code repository<br />
To compile and install these packages through ''emerge'', use the '''emerge -v <package list>''' command. The -v option shows additional * * information and can be omitted. (If you want to use any USE flags, prepend emerge with USE="use flags here". You can also use the -pv option to verify that you’re using the correct flags.) Refer to the [http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=2&chap=1 Gentoo Handbook] or manual for more information on emerge.<br />
<br />
Example:<br />
<br />
emerge -v git sqlite<br />
USE=“net-misc/curl ssl” emerge -v curl<br />
<br />
=== Fedora ===<br />
<br />
<br />
You will need these packages to be able to successfully compile a MTA server on Fedora: <br />
* '''glibc-devel:'''<br />
<!--<br />
* '''curl-devel:''' contains the cURL library<br />
* '''pcre-devel:''' contains the PCRE library<br />
* '''sqlite3-devel:''' contains the SQLite library<br />
--><br />
* '''readline-devel:''' contains the readline library<br />
<!--<br />
* '''lua-devel:''' contains the Lua libraries<br />
--><br />
* '''git:''' contains the git client to check out the source code<br />
To install these packages through yum, use the yum install <package list> command as in the following example (execute as root):<br />
<br />
yum install glibc-devel readline-devel git<br />
<br />
== General instructions for {{Current Version|master}} ==<br />
<br />
'''Downloading the source.'''<br />
<br />
First, you need to download the source. Either clone as shown below or [https://github.com/multitheftauto/mtasa-blue/archive/master.zip download a zip snapshot]<br />
<br />
git clone <nowiki>https</nowiki>://github.com/multitheftauto/mtasa-blue.git mtasa-blue<br />
cd mtasa-blue<br />
<br />
Then compile it thus:<br />
<br />
./linux-build.sh<br />
<br />
Then copy the configuration files, network module and resources into '''Bin/server''' by running this command:<br />
<br />
./linux-install-data.sh<br />
<br />
And the resources and stuff should be downloaded and stuff. As well as the net_d.dll file.<br />
<br />
=== '''Troubleshooting''' ===<br />
<br />
If you’re getting any unexpected errors while compiling, please check our [http://bugs.mtasa.com/ Bug tracker] or our [irc://irc.multitheftauto.com/ IRC channel]<br />
<br />
[[ru:Building MTASA Server on GNU Linux]]<br />
[[Category: Development]]</div>Ccwhttps://wiki.multitheftauto.com/index.php?title=Forks&diff=64864Forks2020-01-05T13:33:43Z<p>Ccw: </p>
<hr />
<div>'''This page is meant to be informative for the creators and maintainers of custom MTA builds or forked projects based on the MTA source code. We often get questions related to AC support for them.<br />
'''<br />Information contained on this page isn't relevant for the official MTA build or releases, or open-source contribution to the official MTA repository at https://github.com/multitheftauto/mtasa-blue<br />
<br />
Custom MTA builds and forked projects (as a lot of russian ones exist) that made their own game platform using the MTA source code, will face some challenges relating to anti-cheat.<br />
<br />
<br />Anti-cheat (also called: AC) support is very limited on custom builds/forked projects, and may be dropped entirely in the future (this is actually being considered). You cannot rely on the MTA anti-cheat for your project, or the limited and very basic support that remains in netc.dll for custom projects.<br />
<br />'''We strongly advise that you write and implement your own anti-cheat.'''<br />
<br />
If you cannot do that, and want to use the very limited anti-cheat offered to custom projects, even though we discourage it you can optimize it by the following steps/design choices to still get the most out of limited support (and not hinder it):<br />
<br />
<br />- Always use the latest version of netc.dll (closed-source) e.g from https://mirror.mtasa.com/bdata/netc.dll and https://mirror.mtasa.com/bdata/net.dll matching the master branch of your base MTA source used for fork, actually you can use the latest module always unless MTA commits changed bitstream code or you did<br />
The "bdata" modules are specifically for custom builds & forks and fetched by running https://github.com/multitheftauto/mtasa-blue/blob/master/win-build.bat<br />
<br />- Never block MTAHQ/client or server traffic in your project<br />
<br />
<br />
<br />
<br />If you don't do this and don't have professional developers to write good anti-cheat, then your fork will be more infested with cheaters than other forks enjoying the limited anticheat protection.<br />
<br />A good approach is to write and implement (to your custom build) some of the 'missing' anticheat features yourself, see below:<br />
<br />
'''AC missing on forks/custom builds:'''<br />
* No detection of changes to gta_sa code section<br />
* No detection of changes to certain gta_sa variables<br />
* SetElementData not protected against external changes<br />
* No detection against various Lua injection methods<br />
* Much less AC heuristics and protection of internals<br />
* Continuous updates for all patched methods to write cheats based on (vulnerabilities) aren't guaranteed, although handpicked ones may occasionally land in custom project netc.dll updates.<br />
This is one of the reasons why updating netc.dll to the latest offered version is beneficial.<br />
* MTA dll's aren't checked for modifications or remote hooking/memory writing<br />
<br />
<br />
There are more things missing that we won't mention here, for security reasons.<br />
<br />
<br />
<br />
The reason for limited support is that MTA AC is proprietary unlike MTA itself, and custom builds may do things differently that can set off AC and cause us to need to support custom builds, which we principally don't.<br />
<br />Therefore, laxing it up minimizes the issues that can arise, leaving custom builds a lot of freedom to do awkward things (such as incorrect practise and programming, hacky things) in networking layer or memory.<br />
<br />Basically, to keep it simple, custom projects can deviate in ways that requires adapting of the anti-cheat. Since our anti-cheat is closed source, you cannot do that, and our volunteers reasonably won't be customizing OUR anti-cheat for such projects.<br />
<br />
<br />Note: to visualise it, most of what works (for the 'limited' anti-cheat support that exists for custom projects) are some signature-based detections. No heuristics, patched methods, security by design and patched vulnerabilities.<br />
<br />Signature-based detections of known hacktools and cheats are the weakest possible, and the anti-cheat in the official MTA tackles the actual problem rather than using signatures.<br />
<br />
Note: while AC in MTA official version is one of the strongest around, custom builds clearly do not benefit from it and are like a second SA-MP as a result; cheaters everywhere, even s0beit might work, etcetera.<br />
<br />So any project willing to take things seriously is advised to implement their own anti-cheat eventually, if they got developers experienced in that. Enough to eventually not rely on our limited one at all.<br />
<br />Until then, or until adding some hard checks to minimize the problem, you might need actual admins to use their eyes against (old-school) cheating.<br />
<br />
<br />
<br />Also, MTA takes pride in its good anti-cheat for official builds. When we see a video of blatant cheating on custom projects (such as the prevalent russian ones), we always facepalm ourselves because there it's just so much easier.<br />
<br />It is really sad to see that the maintainers of such projects aren't aware of the risks and actual situation, so that's why we are documenting it on this wiki page now. ===</div>Ccwhttps://wiki.multitheftauto.com/index.php?title=GetRemoteRequestInfo&diff=64511GetRemoteRequestInfo2019-10-11T14:25:50Z<p>Ccw: /* Returns */</p>
<hr />
<div>{{Server client function}}<br />
__NOTOC__<br />
Gets informations of an [[FetchRemote|fetchRemote]] or [[CallRemote|callRemote]] request info.<br />
<br />
==Syntax==<br />
<syntaxhighlight lang="lua"><br />
table getRemoteRequestInfo ( request theRequest[, int postDataLength = 0[, bool includeHeaders = false]] )<br />
</syntaxhighlight><br />
<br />
===Required Arguments===<br />
* '''theRequest''': returned from [[FetchRemote|fetchRemote]], [[CallRemote|callRemote]] or [[GetRemoteRequests|getRemoteRequests]]<br />
<br />
==Returns==<br />
Returns a table when valid, false otherwise<br />
The table contains:<br />
*'''bytesReceived:''' A number specifying the amount of data received so far. Zero means the download is queued<br />
*'''bytesTotal:''' A number specifying the final download size. Will be zero if the remote HTTP server has not set the 'Content-Length' header<br />
*'''currentAttempt:''' A number specifying the current connection attempt<br />
*'''type:''' A string specifying either "fetch" or "call"<br />
*'''url:''' A string specifying the URL<br />
*'''resource:''' The resource which started the request, or false if the resource has since been stopped/restarted<br />
*'''queue:''' A string specifying the queue name<br />
*'''method:''' A string specifying the HTTP method. e.g. "GET" or "POST"<br />
*'''connectionAttempts:''' A number specifying max number connection attempts as declared in the fetchRemote call<br />
*'''connectionTimeout:''' A number specifying connection attempt timeout as declared in the fetchRemote call<br />
*'''postData:''' A string containing the request post data as declared in the fetchRemote call<br />
*'''headers:''' A table containing the request HTTP headers as declared in the fetchRemote call<br />
<br />
==Example==<br />
<section name="Server" class="server" show="true"><br />
This example gets infos about all pending requests and prints them in debugscript<br />
<syntaxhighlight lang="lua"><br />
function CMD_requestInfo(player, _, resourceName)<br />
local res = resourceName and getResourceFromName(resourceName) or not resourceName and nil<br />
<br />
if(res == false) then<br />
outputServerLog("There is no resource named '" .. resourceName .. "'")<br />
return<br />
elseif(res and getResourceState(res) ~= "running") then<br />
outputServerLog("The provided resource '" .. resourceName .. "' is not running")<br />
return<br />
end<br />
<br />
local requests = getRemoteRequests(res)<br />
<br />
for _, request in ipairs(requests) do<br />
local requestInfo = getRemoteRequestInfo(request)<br />
<br />
if(requestInfo) then<br />
iprint(requestInfo)<br />
end<br />
end<br />
end<br />
<br />
addCommandHandler("requestinfo", CMD_requestInfo)<br />
</syntaxhighlight><br />
</section><br />
<section name="Client" class="client" show="true"><br />
This example gets infos about all pending requests and prints them in debugscript<br />
<syntaxhighlight lang="lua"><br />
function CMD_requestInfo(player, _, resourceName)<br />
local res = resourceName and getResourceFromName(resourceName) or not resourceName and nil<br />
<br />
if(res == false) then<br />
outputChatBox("There is no resource named '" .. resourceName .. "'")<br />
return<br />
elseif(res and getResourceState(res) ~= "running") then<br />
outputChatBox("The provided resource '" .. resourceName .. "' is not running")<br />
return<br />
end<br />
<br />
local requests = getRemoteRequests(res)<br />
<br />
for _, request in ipairs(requests) do<br />
local requestInfo = getRemoteRequestInfo(request)<br />
<br />
if(requestInfo) then<br />
iprint(requestInfo)<br />
end<br />
end<br />
end<br />
<br />
addCommandHandler("requestinfo", CMD_requestInfo)<br />
</syntaxhighlight><br />
</section><br />
<br />
<br />
{{Requirements|1.5.7-9.20307|1.5.7-9.20307}}<br />
<br />
==See Also==<br />
{{Resource functions}}</div>Ccwhttps://wiki.multitheftauto.com/index.php?title=GetRemoteRequestInfo&diff=64510GetRemoteRequestInfo2019-10-11T14:24:06Z<p>Ccw: /* Syntax */</p>
<hr />
<div>{{Server client function}}<br />
__NOTOC__<br />
Gets informations of an [[FetchRemote|fetchRemote]] or [[CallRemote|callRemote]] request info.<br />
<br />
==Syntax==<br />
<syntaxhighlight lang="lua"><br />
table getRemoteRequestInfo ( request theRequest[, int postDataLength = 0[, bool includeHeaders = false]] )<br />
</syntaxhighlight><br />
<br />
===Required Arguments===<br />
* '''theRequest''': returned from [[FetchRemote|fetchRemote]], [[CallRemote|callRemote]] or [[GetRemoteRequests|getRemoteRequests]]<br />
<br />
==Returns==<br />
Returns a table when valid, false otherwise<br />
The table contains:<br />
*'''bytesReceived:''' A number specifying the amount of data received so far. Zero means the download is queued<br />
*'''bytesTotal:''' A number specifying the final download size. Will be zero if the remote HTTP server has not set the 'Content-Length' header<br />
*'''currentAttempt:''' A number specifying the current connection attempt<br />
*'''type:''' A string specifying either "fetch" or "call"<br />
*'''url:''' A string specifying the URL<br />
*'''resource:''' The resource which started the request, or false if the resource has since been stopped/restarted<br />
*'''queue:''' A string specifying the queue name<br />
*'''method:''' A string specifying the HTTP method. e.g. "GET" or "POST"<br />
*'''connectionAttempts:''' A number specifying max number connection attempts as declared in the fetchRemote call<br />
*'''connectionTimeout:''' A number specifying connection attempt timeout as declared in the fetchRemote call<br />
*'''postData:''' A string containing the request post data<br />
*'''headers:''' A table containing the HTTP headers as declared in the fetchRemote call<br />
<br />
==Example==<br />
<section name="Server" class="server" show="true"><br />
This example gets infos about all pending requests and prints them in debugscript<br />
<syntaxhighlight lang="lua"><br />
function CMD_requestInfo(player, _, resourceName)<br />
local res = resourceName and getResourceFromName(resourceName) or not resourceName and nil<br />
<br />
if(res == false) then<br />
outputServerLog("There is no resource named '" .. resourceName .. "'")<br />
return<br />
elseif(res and getResourceState(res) ~= "running") then<br />
outputServerLog("The provided resource '" .. resourceName .. "' is not running")<br />
return<br />
end<br />
<br />
local requests = getRemoteRequests(res)<br />
<br />
for _, request in ipairs(requests) do<br />
local requestInfo = getRemoteRequestInfo(request)<br />
<br />
if(requestInfo) then<br />
iprint(requestInfo)<br />
end<br />
end<br />
end<br />
<br />
addCommandHandler("requestinfo", CMD_requestInfo)<br />
</syntaxhighlight><br />
</section><br />
<section name="Client" class="client" show="true"><br />
This example gets infos about all pending requests and prints them in debugscript<br />
<syntaxhighlight lang="lua"><br />
function CMD_requestInfo(player, _, resourceName)<br />
local res = resourceName and getResourceFromName(resourceName) or not resourceName and nil<br />
<br />
if(res == false) then<br />
outputChatBox("There is no resource named '" .. resourceName .. "'")<br />
return<br />
elseif(res and getResourceState(res) ~= "running") then<br />
outputChatBox("The provided resource '" .. resourceName .. "' is not running")<br />
return<br />
end<br />
<br />
local requests = getRemoteRequests(res)<br />
<br />
for _, request in ipairs(requests) do<br />
local requestInfo = getRemoteRequestInfo(request)<br />
<br />
if(requestInfo) then<br />
iprint(requestInfo)<br />
end<br />
end<br />
end<br />
<br />
addCommandHandler("requestinfo", CMD_requestInfo)<br />
</syntaxhighlight><br />
</section><br />
<br />
<br />
{{Requirements|1.5.7-9.20307|1.5.7-9.20307}}<br />
<br />
==See Also==<br />
{{Resource functions}}</div>Ccwhttps://wiki.multitheftauto.com/index.php?title=GetRemoteRequestInfo&diff=64509GetRemoteRequestInfo2019-10-11T14:21:54Z<p>Ccw: /* Required Arguments */</p>
<hr />
<div>{{Server client function}}<br />
__NOTOC__<br />
Gets informations of an [[FetchRemote|fetchRemote]] or [[CallRemote|callRemote]] request info.<br />
<br />
==Syntax==<br />
<syntaxhighlight lang="lua"><br />
table getRemoteRequestInfo ( request theRequest )<br />
</syntaxhighlight><br />
<br />
===Required Arguments===<br />
* '''theRequest''': returned from [[FetchRemote|fetchRemote]], [[CallRemote|callRemote]] or [[GetRemoteRequests|getRemoteRequests]]<br />
<br />
==Returns==<br />
Returns a table when valid, false otherwise<br />
The table contains:<br />
*'''bytesReceived:''' A number specifying the amount of data received so far. Zero means the download is queued<br />
*'''bytesTotal:''' A number specifying the final download size. Will be zero if the remote HTTP server has not set the 'Content-Length' header<br />
*'''currentAttempt:''' A number specifying the current connection attempt<br />
*'''type:''' A string specifying either "fetch" or "call"<br />
*'''url:''' A string specifying the URL<br />
*'''resource:''' The resource which started the request, or false if the resource has since been stopped/restarted<br />
*'''queue:''' A string specifying the queue name<br />
*'''method:''' A string specifying the HTTP method. e.g. "GET" or "POST"<br />
*'''connectionAttempts:''' A number specifying max number connection attempts as declared in the fetchRemote call<br />
*'''connectionTimeout:''' A number specifying connection attempt timeout as declared in the fetchRemote call<br />
*'''postData:''' A string containing the request post data<br />
*'''headers:''' A table containing the HTTP headers as declared in the fetchRemote call<br />
<br />
==Example==<br />
<section name="Server" class="server" show="true"><br />
This example gets infos about all pending requests and prints them in debugscript<br />
<syntaxhighlight lang="lua"><br />
function CMD_requestInfo(player, _, resourceName)<br />
local res = resourceName and getResourceFromName(resourceName) or not resourceName and nil<br />
<br />
if(res == false) then<br />
outputServerLog("There is no resource named '" .. resourceName .. "'")<br />
return<br />
elseif(res and getResourceState(res) ~= "running") then<br />
outputServerLog("The provided resource '" .. resourceName .. "' is not running")<br />
return<br />
end<br />
<br />
local requests = getRemoteRequests(res)<br />
<br />
for _, request in ipairs(requests) do<br />
local requestInfo = getRemoteRequestInfo(request)<br />
<br />
if(requestInfo) then<br />
iprint(requestInfo)<br />
end<br />
end<br />
end<br />
<br />
addCommandHandler("requestinfo", CMD_requestInfo)<br />
</syntaxhighlight><br />
</section><br />
<section name="Client" class="client" show="true"><br />
This example gets infos about all pending requests and prints them in debugscript<br />
<syntaxhighlight lang="lua"><br />
function CMD_requestInfo(player, _, resourceName)<br />
local res = resourceName and getResourceFromName(resourceName) or not resourceName and nil<br />
<br />
if(res == false) then<br />
outputChatBox("There is no resource named '" .. resourceName .. "'")<br />
return<br />
elseif(res and getResourceState(res) ~= "running") then<br />
outputChatBox("The provided resource '" .. resourceName .. "' is not running")<br />
return<br />
end<br />
<br />
local requests = getRemoteRequests(res)<br />
<br />
for _, request in ipairs(requests) do<br />
local requestInfo = getRemoteRequestInfo(request)<br />
<br />
if(requestInfo) then<br />
iprint(requestInfo)<br />
end<br />
end<br />
end<br />
<br />
addCommandHandler("requestinfo", CMD_requestInfo)<br />
</syntaxhighlight><br />
</section><br />
<br />
<br />
{{Requirements|1.5.7-9.20307|1.5.7-9.20307}}<br />
<br />
==See Also==<br />
{{Resource functions}}</div>Ccwhttps://wiki.multitheftauto.com/index.php?title=GetRemoteRequestInfo&diff=64508GetRemoteRequestInfo2019-10-11T14:20:49Z<p>Ccw: /* Returns */</p>
<hr />
<div>{{Server client function}}<br />
__NOTOC__<br />
Gets informations of an [[FetchRemote|fetchRemote]] or [[CallRemote|callRemote]] request info.<br />
<br />
==Syntax==<br />
<syntaxhighlight lang="lua"><br />
table getRemoteRequestInfo ( request theRequest )<br />
</syntaxhighlight><br />
<br />
===Required Arguments===<br />
* '''theRequest''': the element returned from [[FetchRemote|fetchRemote]] or [[CallRemote|callRemote]]<br />
<br />
==Returns==<br />
Returns a table when valid, false otherwise<br />
The table contains:<br />
*'''bytesReceived:''' A number specifying the amount of data received so far. Zero means the download is queued<br />
*'''bytesTotal:''' A number specifying the final download size. Will be zero if the remote HTTP server has not set the 'Content-Length' header<br />
*'''currentAttempt:''' A number specifying the current connection attempt<br />
*'''type:''' A string specifying either "fetch" or "call"<br />
*'''url:''' A string specifying the URL<br />
*'''resource:''' The resource which started the request, or false if the resource has since been stopped/restarted<br />
*'''queue:''' A string specifying the queue name<br />
*'''method:''' A string specifying the HTTP method. e.g. "GET" or "POST"<br />
*'''connectionAttempts:''' A number specifying max number connection attempts as declared in the fetchRemote call<br />
*'''connectionTimeout:''' A number specifying connection attempt timeout as declared in the fetchRemote call<br />
*'''postData:''' A string containing the request post data<br />
*'''headers:''' A table containing the HTTP headers as declared in the fetchRemote call<br />
<br />
==Example==<br />
<section name="Server" class="server" show="true"><br />
This example gets infos about all pending requests and prints them in debugscript<br />
<syntaxhighlight lang="lua"><br />
function CMD_requestInfo(player, _, resourceName)<br />
local res = resourceName and getResourceFromName(resourceName) or not resourceName and nil<br />
<br />
if(res == false) then<br />
outputServerLog("There is no resource named '" .. resourceName .. "'")<br />
return<br />
elseif(res and getResourceState(res) ~= "running") then<br />
outputServerLog("The provided resource '" .. resourceName .. "' is not running")<br />
return<br />
end<br />
<br />
local requests = getRemoteRequests(res)<br />
<br />
for _, request in ipairs(requests) do<br />
local requestInfo = getRemoteRequestInfo(request)<br />
<br />
if(requestInfo) then<br />
iprint(requestInfo)<br />
end<br />
end<br />
end<br />
<br />
addCommandHandler("requestinfo", CMD_requestInfo)<br />
</syntaxhighlight><br />
</section><br />
<section name="Client" class="client" show="true"><br />
This example gets infos about all pending requests and prints them in debugscript<br />
<syntaxhighlight lang="lua"><br />
function CMD_requestInfo(player, _, resourceName)<br />
local res = resourceName and getResourceFromName(resourceName) or not resourceName and nil<br />
<br />
if(res == false) then<br />
outputChatBox("There is no resource named '" .. resourceName .. "'")<br />
return<br />
elseif(res and getResourceState(res) ~= "running") then<br />
outputChatBox("The provided resource '" .. resourceName .. "' is not running")<br />
return<br />
end<br />
<br />
local requests = getRemoteRequests(res)<br />
<br />
for _, request in ipairs(requests) do<br />
local requestInfo = getRemoteRequestInfo(request)<br />
<br />
if(requestInfo) then<br />
iprint(requestInfo)<br />
end<br />
end<br />
end<br />
<br />
addCommandHandler("requestinfo", CMD_requestInfo)<br />
</syntaxhighlight><br />
</section><br />
<br />
<br />
{{Requirements|1.5.7-9.20307|1.5.7-9.20307}}<br />
<br />
==See Also==<br />
{{Resource functions}}</div>Ccwhttps://wiki.multitheftauto.com/index.php?title=FetchRemote&diff=64507FetchRemote2019-10-11T13:43:18Z<p>Ccw: </p>
<hr />
<div>__NOTOC__ <br />
{{Server client function}}<br />
This function allows you to post and receive data from HTTP servers. The calls are asynchronous so you do not get an immediate result from the call, instead a callback function you specify is called when the download completes.<br />
<br />
In the case when the call fails, a string containing "ERROR" followed by an integer containing the error reason will be passed to the callback function. The reason for failure will be similar to errors found with websites - file not found, server not found and timeouts.<br />
<br />
If you are using fetchRemote to connect to a PHP script, you can use ''file_get_contents("php://input")'' to read the '''postData''' sent from this function.<br />
{{Note|Client side function only works with the server the player is connected to unless the domain has been accepted with [[requestBrowserDomains]]}}<br />
{{ Warning| function won't trigger inside another fetchRemote function }}<br />
==Syntax== <br />
<syntaxhighlight lang="lua"><br />
bool fetchRemote ( string URL[, string queueName = "default" ][, int connectionAttempts = 10, int connectTimeout = 10000 ], function callbackFunction, [ string postData = "", bool postIsBinary = false, [ arguments... ] ] )<br />
</syntaxhighlight> <br />
<br />
===Required Arguments=== <br />
*'''URL:''' A full URL in the format ''<nowiki>http://hostname/path/file.ext</nowiki>''. A port can be specified with a colon followed by a port number appended to the hostname.<br />
*'''callbackFunction:''' This is the function that should receive the data returned from the remote server. The callback argument list should be:<br />
**'''''responseData''''' - A string containing the remote response or "ERROR" if there was a problem<br />
**'''''errno''''' - A number containing the error number or zero if there was no error. A list of possible error values are:<br />
{{Error_codes_for_callRemote_and_fetchRemote}}<br />
<div style="padding-left:19px;"><br />
*'''''arguments...''''' - The arguments that were passed into fetchRemote<br />
</div><br />
<br />
===Optional Arguments=== <br />
{{New items|4.0153|1.5.3-9.11270|<br />
*'''queueName:''' Name of the queue to use. Any name can be used. If not set, the queue name is "default". Requests in the same queue are processed in order, one at a time.<br />
}}<br />
*'''connectionAttempts:''' Number of times to retry if the remote host does not respond. ''In the case of a non-responding remote server, each connection attempt will timeout after 10 seconds. Therefore, the default setting of 10 connection attempts means it will be 100 seconds before your script gets a callback about the error. Reducing this value to 2 for example, will decrease that period to 20 seconds''<br />
*'''connectTimeout:''' Number of milliseconds each connection attempt will take before timing out<br />
*'''postData:''' A string specifying any data you want to send to the remote HTTP server.<br />
*'''postIsBinary :''' A boolean specifying if the data is text, or binary.<br />
*'''arguments:''' Any arguments you may want to pass to the callback.<br />
<br />
<br />
{{New items|5.0154|1.5.4-9.11342|<br />
==Syntax== <br />
<syntaxhighlight lang="lua"><br />
bool fetchRemote ( string URL[, table options ], callback callbackFunction[, table callbackArguments ] )<br />
</syntaxhighlight> <br />
<br />
===Required Arguments=== <br />
*'''URL:''' A full URL in the format ''<nowiki>http://hostname/path/file.ext</nowiki>''. A port can be specified with a colon followed by a port number appended to the hostname.<br />
*'''callbackFunction:''' This is the function that should receive the data returned from the remote server. The callback argument list should be:<br />
**'''''responseData''''' - A string containing the remote response<br />
**'''''responseInfo''''' - A table containing:<br />
***'''''success''''' - A boolean indicating if the request was successful.<br />
***'''''statusCode''''' - An integer status/error code<br />
***'''''headers''''' - A table containing the HTTP response headers<br />
**'''''arguments...''''' - The arguments that were passed into fetchRemote<br />
<br />
===Optional Arguments=== <br />
*'''options:''' A table containing any request options:<br />
**'''queueName:''' Name of the queue to use. Any name can be used. If not set, the queue name is "default". Requests in the same queue are processed in order, one at a time.<br />
**'''connectionAttempts:''' Number of times to retry if the remote host does not respond. ''(Defaults to 10)''<br />
**'''connectTimeout:''' Number of milliseconds each connection attempt will take before timing out. ''(Defaults to 10000)''<br />
**'''postData:''' A string specifying any data you want to send to the remote HTTP server.<br />
**'''postIsBinary :''' A boolean specifying if the data is text, or binary. ''(Defaults to false)''<br />
**'''method:''' A string specifying the request method. ''(Defaults to GET or POST)''<br />
**'''headers:''' A table containing HTTP request headers. ''e.g.{ Pragma&#61;"no-cache" }''<br />
**'''maxRedirects:''' An integer limiting the number of HTTP redirections to automatically follow. ''(Defaults to 8)''<br />
**'''username:''' A string specifying the username for protected pages.<br />
**'''password:''' A string specifying the password for protected pages.<br />
{{New items|5.0154|1.5.4-9.11413|<br />
**'''formFields:''' A table containing form items to submit. ''e.g.{ name&#61;"bob", email&#61;"bob@example.com" }''<br />
}}<br />
*'''arguments:''' A table containing arguments you may want to pass to the callback.<br />
}}<br />
<br />
===Returns===<br />
{{New items|5.0154|1.5.7-9.20307|<br />
Returns a '''''request''''' value which can be used with [[GetRemoteRequestInfo|getRemoteRequestInfo]] or [[AbortRemoteRequest|abortRemoteRequest]]<br />
}}<br />
<br />
==Example==<br />
This example shows you how you can fetch an image from a web page, and transfer it to a particular client:<br />
<section name="Server" class="server" show="true"><br />
<syntaxhighlight lang="lua"><br />
<br />
function startImageDownload( playerToReceive )<br />
fetchRemote ( "http://www.example.com/image.jpg", myCallback, "", false, playerToReceive )<br />
end<br />
<br />
function myCallback( responseData, errno, playerToReceive )<br />
if errno == 0 then<br />
triggerClientEvent( playerToReceive, "onClientGotImage", resourceRoot, responseData )<br />
end<br />
end<br />
</syntaxhighlight><br />
</section><br />
<section name="Client" class="client" show="true"><br />
<syntaxhighlight lang="lua"><br />
addEvent( "onClientGotImage", true )<br />
addEventHandler( "onClientGotImage", resourceRoot,<br />
function( pixels )<br />
if myTexture then<br />
destroyElement( myTexture )<br />
end<br />
myTexture = dxCreateTexture( pixels )<br />
end<br />
)<br />
<br />
addEventHandler("onClientRender", root,<br />
function()<br />
if myTexture then<br />
local w,h = dxGetMaterialSize( myTexture )<br />
dxDrawImage( 200, 100, w, h, myTexture )<br />
end<br />
end<br />
)<br />
</syntaxhighlight><br />
</section><br />
<br/><br />
{{New items|5.0154|1.5.4-9.11413|<br />
Example sending email via a web service (adopted from examples on https://documentation.mailgun.com/user_manual.html)<br />
<section name="Server" class="server" show="true"><br />
<syntaxhighlight lang="lua"><br />
sendOptions = {<br />
queueName = "My Mailgun queue",<br />
connectionAttempts = 3,<br />
connectTimeout = 5000,<br />
formFields = {<br />
from="Excited User <excited@samples.mailgun.org>",<br />
to="devs@mailgun.net",<br />
subject="Hello",<br />
text="Testing some Mailgun awesomness!",<br />
},<br />
username="api",<br />
password="key-3ax6xnjp29jd6fds4gc373sgvjxteol0",<br />
}<br />
fetchRemote( "https://api.mailgun.net/v3/samples.mailgun.org/messages", sendOptions, mailgunCompleteCallback )<br />
<br />
function mailgunCompleteCallback(data, info)<br />
outputDebugString( "mailgunComplete"<br />
.. " success:" .. tostring(info.success)<br />
.. " statusCode:" .. tostring(info.statusCode)<br />
.. " data:" .. tostring(data)<br />
)<br />
end<br />
</syntaxhighlight><br />
</section><br />
<br />
Changing post content on IPS forum.<br />
<section name="Server" class="server" show="true"><br />
<syntaxhighlight lang="lua"><br />
local apiKey = "12345678123456781234567812345678" -- key from ips admin panel<br />
local forumAddress = "https://yourForum.com"<br />
function setPostContent(postID,content)<br />
local sendOptions = {<br />
queueName = "updatePost",<br />
connectionAttempts = 1,<br />
connectTimeout = 50,<br />
formFields = {<br />
post = content,<br />
},<br />
}<br />
fetchRemote( forumAddress.."/api/forums/posts/"..postID.."?key="..apiKey, sendOptions, function()end)<br />
end<br />
<br />
setPostContent(1, "this is a first post on this forum")<br />
</syntaxhighlight><br />
</section><br />
}}<br />
<br />
==Requirements==<br />
{{Requirements|1.3.0-9.03739|1.3.2|}}<br />
<br />
==Changelog==<br />
{{ChangelogHeader}}<br />
{{ChangelogItem|1.3.1-9.04605|Added connectionAttempts argument}}<br />
{{ChangelogItem|1.3.2|Added client side}}<br />
{{ChangelogItem|1.5.3-9.11270|Added queueName argument}}<br />
{{ChangelogItem|1.5.4-9.11342|Added alternative syntax}}<br />
{{ChangelogItem|1.5.4-9.11413|Added formFields}}<br />
<br />
==See Also==<br />
{{Resource_functions}}</div>Ccwhttps://wiki.multitheftauto.com/index.php?title=AbortRemoteRequest&diff=64506AbortRemoteRequest2019-10-11T13:35:10Z<p>Ccw: /* Required Arguments */</p>
<hr />
<div>{{Server client function}}<br />
__NOTOC__<br />
Aborts a [[FetchRemote|fetchRemote]] or [[CallRemote|callRemote]] request.<br />
<br />
==Syntax==<br />
<syntaxhighlight lang="lua"><br />
bool abortRemoteRequest( request theRequest )<br />
</syntaxhighlight><br />
<br />
===Required Arguments===<br />
* '''theRequest''': returned from [[FetchRemote|fetchRemote]], [[CallRemote|callRemote]] or [[GetRemoteRequests|getRemoteRequests]]<br />
<br />
==Returns==<br />
Returns true on success, false when invalid request was provided<br />
<br />
==Example==<br />
this example aborts all pending requests of currently running resource.<br />
<syntaxhighlight lang="lua"><br />
function CMD_abortRequests()<br />
local requests = getRemoteRequests()<br />
<br />
for _, request in ipairs(requests) do<br />
abortRemoteRequest()<br />
end<br />
end<br />
<br />
addCommandHandler("abortrequests", CMD_abortRequests)<br />
</syntaxhighlight><br />
<br />
{{Requirements|1.5.7-9.20307|1.5.7-9.20307}}<br />
<br />
==See Also==<br />
{{Resource functions}}</div>Ccwhttps://wiki.multitheftauto.com/index.php?title=AbortRemoteRequest&diff=64505AbortRemoteRequest2019-10-11T13:33:32Z<p>Ccw: /* Syntax */</p>
<hr />
<div>{{Server client function}}<br />
__NOTOC__<br />
Aborts a [[FetchRemote|fetchRemote]] or [[CallRemote|callRemote]] request.<br />
<br />
==Syntax==<br />
<syntaxhighlight lang="lua"><br />
bool abortRemoteRequest( request theRequest )<br />
</syntaxhighlight><br />
<br />
===Required Arguments===<br />
* '''theRequest''': the element returned from [[FetchRemote|fetchRemote]] or [[CallRemote|callRemote]]<br />
<br />
==Returns==<br />
Returns true on success, false when invalid request was provided<br />
<br />
==Example==<br />
this example aborts all pending requests of currently running resource.<br />
<syntaxhighlight lang="lua"><br />
function CMD_abortRequests()<br />
local requests = getRemoteRequests()<br />
<br />
for _, request in ipairs(requests) do<br />
abortRemoteRequest()<br />
end<br />
end<br />
<br />
addCommandHandler("abortrequests", CMD_abortRequests)<br />
</syntaxhighlight><br />
<br />
{{Requirements|1.5.7-9.20307|1.5.7-9.20307}}<br />
<br />
==See Also==<br />
{{Resource functions}}</div>Ccwhttps://wiki.multitheftauto.com/index.php?title=GetRemoteRequests&diff=64504GetRemoteRequests2019-10-11T13:32:58Z<p>Ccw: /* Syntax */</p>
<hr />
<div>{{Server client function}}<br />
__NOTOC__<br />
Gets all [[FetchRemote|fetchRemote]] and [[CallRemote|callRemote]] requests currently running.<br />
<br />
==Syntax==<br />
<syntaxhighlight lang="lua"><br />
table getRemoteRequests ( [ resource theResource = nil ] )<br />
</syntaxhighlight><br />
<br />
===Optional Arguments===<br />
* '''theResource''': the resource to get all requests from<br />
<br />
==Returns==<br />
Returns a table with all requests, false if an invalid resource was provided<br />
<br />
==Example==<br />
<section name="Server" class="server" show="true"><br />
This example prints how many request are currently pending.<br />
<syntaxhighlight lang="lua"><br />
function CMD_requestInfo(player, _, resourceName)<br />
local res = resourceName and getResourceFromName(resourceName) or not resourceName and nil<br />
<br />
if(res == false) then<br />
outputChatBox("There is no resource named '" .. resourceName .. "'", player)<br />
return<br />
elseif(res and getResourceState(res) ~= "running") then<br />
outputChatBox("The provided resource '" .. resourceName .. "' is not running", player)<br />
return<br />
end<br />
<br />
local requests = getRemoteRequests(res)<br />
<br />
outputChatBox(("There are %d request%s running"):format(#requests, #requests == 1 and '' or 's'), player)<br />
end<br />
<br />
addCommandHandler("requestinfo", CMD_requestInfo)<br />
</syntaxhighlight><br />
</section><br />
<section name="Client" class="client" show="true"><br />
This example prints how many request are currently pending.<br />
<syntaxhighlight lang="lua"><br />
function CMD_requestInfo(_, resourceName)<br />
local res = resourceName and getResourceFromName(resourceName) or not resourceName and nil<br />
<br />
if(res == false) then<br />
outputChatBox("There is no resource named '" .. resourceName .. "'")<br />
return<br />
elseif(res and getResourceState(res) ~= "running") then<br />
outputChatBox("The provided resource '" .. resourceName .. "' is not running")<br />
return<br />
end<br />
<br />
local requests = getRemoteRequests(res)<br />
<br />
outputChatBox(("There are %d request%s running"):format(#requests, #requests == 1 and '' or 's'))<br />
end<br />
<br />
addCommandHandler("requestinfo", CMD_requestInfo)<br />
</syntaxhighlight><br />
</section><br />
<br />
<br />
{{Requirements|1.5.7-9.20307|1.5.7-9.20307}}<br />
<br />
==See Also==<br />
{{Resource functions}}</div>Ccwhttps://wiki.multitheftauto.com/index.php?title=OnResourceStop&diff=64503OnResourceStop2019-10-09T22:06:50Z<p>Ccw: /* Changelog */</p>
<hr />
<div>__NOTOC__<br />
{{Server event}}<br />
This event is triggered when the resource is stopped. This can occur for a number of reasons:<br />
* The ''stop'' console command was used<br />
* The ''restart'' console command was used<br />
* The resource was modified (the resource will automatically restart)<br />
* Another resource stopped it using [[stopResource]].<br />
<br />
'''Note:''' If you wish to just detect a single resource being stopped, you should attach handlers for this event to the resource's root element. You can access this using [[getResourceRootElement]]. <br />
<br />
==Parameters==<br />
<syntaxhighlight lang="lua"><br />
resource stoppedResource, boolean wasDeleted<br />
</syntaxhighlight> <br />
<br />
*'''stoppedResource''': the [[resource]] that is being stopped.<br />
*'''wasDeleted''': a [[boolean]] representing whether the resource folder was deleted, moved or renamed.<br />
<br />
==Source==<br />
The [[event system#Event source|source]] of this event is the root [[element]] of the resource that is being stopped.<br />
<br />
==Example==<br />
This example displays a message in the chatbox when a resource is stopped.<br />
<syntaxhighlight lang="lua"><br />
addEventHandler( "onResourceStop", root,<br />
function( resource )<br />
outputChatBox( "The resource " .. getResourceName( resource ) .. " was stopped!", root )<br />
end<br />
)<br />
</syntaxhighlight><br />
<br />
This example only outputs message if the stopped resource is the same resource where the eventHandler is. <br />
<syntaxhighlight lang="lua"><br />
addEventHandler( "onResourceStop", resourceRoot,<br />
function( resource )<br />
outputChatBox( "This resource has stopped!", root )<br />
end<br />
)<br />
</syntaxhighlight><br />
<br />
==Changelog==<br />
{{ChangelogHeader}}<br />
{{ChangelogItem|1.5.5-9.11854|Added wasDeleted parameter}}<br />
<br />
{{See also/Server event|Resource events}}</div>Ccwhttps://wiki.multitheftauto.com/index.php?title=Client_Commands&diff=63956Client Commands2019-08-28T00:49:17Z<p>Ccw: /* screenshot */</p>
<hr />
<div>This page lists all built in commands that the client can process. These commands can be entered directly to the client console or via the chatbox by putting a / (forward slash) in front of them. Some [[Server_Commands|server commands]] are also accessible from the client. Arguments inside [...] are optional.<br />
<br />
<br />
==Core commands==<br />
====help====<br />
:Displays these list of commands<br />
====exit====<br />
:Exits the application<br />
====quit====<br />
:Exits the application<br />
====ver====<br />
:Outputs the MTA version in the client console<br />
====time====<br />
:Outputs the local time in the chatbox<br />
====showhud====<br />
:Usage: showhud [''<''0-1''>'']<br />
:Shows the HUD<br />
====binds====<br />
:Outputs all the binds in the client console<br />
====serial====<br />
:Outputs your serial in the client console<br />
<br />
====connect====<br />
:Usage: connect ''<host>'' [''<port> <nick> <pass>'']<br />
:Connects to a server<br />
<br />
====reconnect====<br />
:Connects to a previous server<br />
====bind====<br />
:Usage: bind ''<defaults/key>'' [''<up/down>''] ''<command>'' [''<arguments>'']<br />
:Binds a key<br />
::Example to bind X to hiding the HUD: '''bind x down showhud 0'''<br />
::Example to reset all binds: '''bind defaults'''<br />
====unbind====<br />
:Usage: unbind ''<all/key>'' [''<up/down> <command>'']<br />
:Unbinds a key<br />
::Example to unbind X to from hiding the HUD: '''unbind x down showhud 0'''<br />
::Example to unbind all commands from X: '''unbind x'''<br />
====copygtacontrols====<br />
:Copies the default gta controls - This may require a restart to work properly<br />
====screenshot====<br />
:Saves a screenshot (rate limited to no more than one per second)<br />
<br />
====saveconfig====<br />
:Immediately saves the config<br />
<br />
<br />
==Commands when connected to a server==<br />
====fakelag====<br />
{{Main|Command fakelag}}<br />
:Usage: fakelag ''<packet loss>'' ''<extra ping>'' ''<ping variance>'' [''<KBPS limit>'']<br />
:'''Only available if enabled by the server.'''<br />
:Adds artificial packet loss, ping, jitter and bandwidth limits to the client-server connection.<br />
====sinfo====<br />
:Prints information and settings for the current server into the client console<br />
====disconnect====<br />
:Disconnect from the server and return to the main menu<br />
====shownametags====<br />
:Usage: shownametags [''<''0-1''>'']<br />
:Shows the nametags<br />
====showchat====<br />
:Usage: showchat [''<''0-1''>'']<br />
:Shows the chatbox<br />
====shownetstat====<br />
:Usage: shownetstat [''<''0-1''>'']<br />
:Shows the network statistics <br />
====showmemstat====<br />
:Usage: showmemstat [''<''0-1''>'']<br />
:Shows the memory statistics <br />
====showframegraph====<br />
:Usage: showframegraph [''<''0-1''>'']<br />
:Shows the frame rate history graph <br />
:The values are defined as the following:<br />
::FrameEnd<br />
::Limiter<br />
::PostPresent<br />
::Present<br />
====chatbox====<br />
:Usage: chatbox ''<''0-255''>'' ''<''0-255''>'' ''<''0-255''>''<br />
:Defines the chatbox color<br />
====textscale====<br />
:Usage: textscale ''<''0.8 to 3.0''>''<br />
:Defines the scale multiplier of all text-displays<br />
====showcol====<br />
:Usage: showcol [''<''0-1''>'']<br />
:Shows colshapes in wireframe for help when writing scripts<br />
:Only works in development mode.<br />
:More information: [[setDevelopmentMode]]<br />
====showsound====<br />
:Usage: showsound [''<''0-1''>'']<br />
:Prints world sound ids in the debug output windows to help when writing scripts with [[setWorldSoundEnabled]]<br />
:Only works in development mode.<br />
:More information: [[setDevelopmentMode]]<br />
<br />
==Commands for key binds==<br />
====cleardebug====<br />
:Clears the debug view<br />
====chatscrollup====<br />
:Usage: chatscrollup 1 <br />
:Scrolls the chatbox upwards<br />
====chatscrolldown====<br />
:Usage: chatscrolldown -1 <br />
:Scrolls the chatbox downwards<br />
====debugscrollup====<br />
:Usage: debugscrollup 1 <br />
:Scrolls the debug view upwards<br />
====debugscrolldown====<br />
:Usage: debugscrolldown -1 <br />
:Scrolls the debug view downwards<br />
====voiceptt====<br />
:Usage: voiceptt <0-1><br />
:Enable voice input.<br />
<br />
====enter_passenger====<br />
:Enters a car as passenger<br />
====radio_next====<br />
:Next radio channel<br />
====radio_previous====<br />
:Previous radio channel<br />
====radar====<br />
:Usage: radar [''<''0-1''>''] <br />
:Shows the radar view<br />
====radar_zoom_in====<br />
:Zooms the radar in<br />
====radar_zoom_out====<br />
:Zooms the radar out<br />
====radar_move_north====<br />
:Moves the radar north<br />
====radar_move_south====<br />
:Moves the radar south<br />
====radar_move_east====<br />
:Moves the radar east<br />
====radar_move_west====<br />
:Moves the radar west<br />
====radar_attach====<br />
:Attaches the radar <br />
====msg_target====<br />
:Usage: msg_target ''<text>'' <br />
:Sends a message to the targeted player<br />
====vehicle_next_weapon====<br />
:Changes to the next weapon whilst in a vehicle<br />
====vehicle_previous_weapon====<br />
:Changes to the previous weapon whilst in a vehicle<br />
====radio_next====<br />
:Selects the next radio station<br />
====radio_previous====<br />
:Selects the previous radio station<br />
<br />
[[Category: Support]]<br />
[[ru:Client Commands]]<br />
[[hu:Client Commands]]</div>Ccwhttps://wiki.multitheftauto.com/index.php?title=User_talk:Tut&diff=63854User talk:Tut2019-08-20T14:35:44Z<p>Ccw: </p>
<hr />
<div>RE: https://wiki.multitheftauto.com/wiki/EngineReplaceModel ''"Only models found in gta3.img can be replaced"''<br />
<br />
Specifically, what models cannot be replaced? [[User:Ccw|Ccw]] ([[User talk:Ccw|talk]]) 10:11, 20 August 2019 (UTC)<br />
<br />
<br />
MTA cannot replace models found in other .img archives such as player.img or cuts.img (not sure if named correctly). i have made an issue on this here: https://github.com/multitheftauto/mtasa-blue/issues/1017<br />
I am sorry if this wasn't the correct way to reply to your question, i'm still finding my way around Wiki. [[User:Tut|Tut]] ([[User talk:Tut|talk]]) 13:50, 20 August 2019 (UTC)<br />
<br />
<br />
Ok, I've updated [[EngineReplaceModel]] to reflect this. [[User:Ccw|Ccw]] ([[User talk:Ccw|talk]]) 14:34, 20 August 2019 (UTC)</div>Ccwhttps://wiki.multitheftauto.com/index.php?title=EngineReplaceModel&diff=63853EngineReplaceModel2019-08-20T14:32:20Z<p>Ccw: </p>
<hr />
<div>__NOTOC__ <br />
{{Client function}}<br />
<br />
{{Note box|Please note the loading order that is used in the examples as other orders can cause collisions, textures or the DFF not to load due to technical limitations}}<br />
<br />
This function replaces the given model ID with the model contained in a DFF file loaded by [[engineLoadDFF]]. This function supports [[vehicle|vehicles]], [[object|objects]], [[ped|peds]] and [[player|players]] but not CJ clothing and body parts.<br />
<br />
{{Deprecated feature|3.0111|1.1.1|This function does not support ped and weapon models.}}<br />
<br />
To replace weapon models you must use their object IDs, not weapon IDs. There is a weapon model list available at [[weapons]].<br />
{{Note|<br />
* Default GTA map objects behave inconsistently when using this function on them. If you want to replace models in the original GTA map, use one of the [[EngineReplaceModel notes|methods shown here]].}}<br />
<br />
==Syntax== <br />
<syntaxhighlight lang="lua"><br />
bool engineReplaceModel ( dff theModel, int modelID [, bool alphaTransparency = false ] )<br />
</syntaxhighlight> <br />
{{OOP||[[DFF|dff]]:replace}}<br />
===Required Arguments=== <br />
*'''theModel:''' The model to replace the given model ID with<br />
*'''modelID:''' The model it to replace the model of<br />
<br />
===Optional Arguments=== <br />
*'''alphaTransparency:''' Set to true if model uses semi-transparent textures, e.g. windows. This will ensure other objects behind the semi-transparent textures are rendered correctly. (Can slightly impact performance, so only set when required)<br />
<br />
===Returns===<br />
Returns ''true'' if the model was successfully replaced, ''false'' if it failed for some reason, ie. the DFF or the model ID is not valid.<br />
<br />
==Example== <br />
'''Example 1:'''<br />
<section name="Client" class="client" show="true"><br />
Client-side example for replacing vehicle model and texture with custom ones.<br />
<syntaxhighlight lang="lua"><br />
function ReplaceVehicle ( )<br />
outputChatBox ( "> replacing the euros vehicle" )<br />
<br />
txd = engineLoadTXD ( "data/euros.txd" )<br />
engineImportTXD ( txd, 587 )<br />
dff = engineLoadDFF ( "data/euros.dff" )<br />
engineReplaceModel ( dff, 587 )<br />
end<br />
<br />
addEvent ( "replaceVeh", true )<br />
addEventHandler ( "replaceVeh", root, ReplaceVehicle )<br />
</syntaxhighlight><br />
</section><br />
<section name="Server" class="server" show="true"><br />
Server-side example function for triggering the replace.<br />
<syntaxhighlight lang="lua"><br />
function ReplaceCommand ( )<br />
triggerClientEvent( "replaceVeh", root, replaceVeh )<br />
end<br />
addCommandHandler( "replace", ReplaceCommand )<br />
</syntaxhighlight><br />
</section><br />
<br />
'''Example 2:'''<br />
<section name="Client" class="client" show="true"><br />
Client-side example for replacing weapons with custom mods.<br />
<syntaxhighlight lang="lua"><br />
function replaceWeapon() <br />
txd = engineLoadTXD ( "m4.txd" )<br />
engineImportTXD ( txd, 356)<br />
dff = engineLoadDFF ( "m4.dff", 356) -- use weapon model ID, not weapon ID (model ID from https://wiki.multitheftauto.com/wiki/Weapons)<br />
engineReplaceModel ( dff, 356) -- Likewise, model ID, for M4 as example it's 356<br />
<br />
end<br />
addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), replaceWeapon)<br />
</syntaxhighlight><br />
</section><br />
<br />
'''Example 3:'''<br />
<section name="Client" class="client" show="true"><br />
Client-Side example for replacing object collision, texture and model with custom ones.<br />
<syntaxhighlight lang="lua"><br />
function ReplaceObject ( )<br />
<br />
col = engineLoadCOL( "MyModel.col" )<br />
txd = engineLoadTXD( "MyModel.txd" )<br />
dff = engineLoadDFF( "MyModel.dff", 0 )<br />
<br />
engineReplaceCOL( col, 1234 )<br />
engineImportTXD( txd, 1234 )<br />
engineReplaceModel( dff, 1234 )-- replace the model at least<br />
<br />
end<br />
<br />
addEvent ( "replaceObj", true )<br />
addEventHandler ( "replaceObj", root, ReplaceObject )<br />
</syntaxhighlight><br />
</section><br />
<section name="Server" class="server" show="true"><br />
Server-side example function for triggering the replace.<br />
<syntaxhighlight lang="lua"><br />
function ReplaceCommand ( )<br />
triggerClientEvent( "replaceObj", root, replaceObj )<br />
end<br />
addCommandHandler( "replace", ReplaceCommand )<br />
</syntaxhighlight><br />
</section><br />
<br />
==See Also==<br />
{{Engine_functions}}</div>Ccwhttps://wiki.multitheftauto.com/index.php?title=User_talk:Tut&diff=63849User talk:Tut2019-08-20T10:12:01Z<p>Ccw: </p>
<hr />
<div>RE: https://wiki.multitheftauto.com/wiki/EngineReplaceModel ''"Only models found in gta3.img can be replaced"''<br />
<br />
Specifically, what models cannot be replaced? [[User:Ccw|Ccw]] ([[User talk:Ccw|talk]]) 10:11, 20 August 2019 (UTC)</div>Ccwhttps://wiki.multitheftauto.com/index.php?title=User_talk:Tut&diff=63848User talk:Tut2019-08-20T10:10:59Z<p>Ccw: Created page with "RE: https://wiki.multitheftauto.com/wiki/EngineReplaceModel ''"Only models found in gta3.img can be replaced"'' Specifically, what models cannot be replaced? ~~~"</p>
<hr />
<div>RE: https://wiki.multitheftauto.com/wiki/EngineReplaceModel ''"Only models found in gta3.img can be replaced"''<br />
<br />
Specifically, what models cannot be replaced? [[User:Ccw|Ccw]] ([[User talk:Ccw|talk]])</div>Ccwhttps://wiki.multitheftauto.com/index.php?title=EngineReplaceModel&diff=63792EngineReplaceModel2019-08-17T10:18:08Z<p>Ccw: Reverted edits by Tut (talk) to last revision by Ccw</p>
<hr />
<div>__NOTOC__ <br />
{{Client function}}<br />
<br />
{{Note box|Please note the loading order that is used in the examples as other orders can cause collisions, textures or the DFF not to load due to technical limitations}}<br />
<br />
This function replaces the given model ID with the model contained in a DFF file loaded by [[engineLoadDFF]]. {{New items|3.0111|1.1.1|This function supports [[vehicle|vehicles]], [[object|objects]], [[ped|peds]] and [[player|players]].}}<br />
<br />
{{Deprecated feature|3.0111|1.1.1|This function does not support ped and weapon models.}}<br />
<br />
To replace weapon models you must use their object IDs, not weapon IDs. There is a weapon model list available at [[weapons]].<br />
{{Note|<br />
* Default GTA map objects behave inconsistently when using this function on them. If you want to replace models in the original GTA map, use one of the [[EngineReplaceModel notes|methods shown here]].}}<br />
<br />
==Syntax== <br />
<syntaxhighlight lang="lua"><br />
bool engineReplaceModel ( dff theModel, int modelID [, bool alphaTransparency = false ] )<br />
</syntaxhighlight> <br />
{{OOP||[[DFF|dff]]:replace}}<br />
===Required Arguments=== <br />
*'''theModel:''' The model to replace the given model ID with<br />
*'''modelID:''' The model it to replace the model of<br />
<br />
===Optional Arguments=== <br />
*'''alphaTransparency:''' Set to true if model uses semi-transparent textures, e.g. windows. This will ensure other objects behind the semi-transparent textures are rendered correctly. (Can slightly impact performance, so only set when required)<br />
<br />
===Returns===<br />
Returns ''true'' if the model was successfully replaced, ''false'' if it failed for some reason, ie. the DFF or the model ID is not valid.<br />
<br />
==Example== <br />
'''Example 1:'''<br />
<section name="Client" class="client" show="true"><br />
Client-side example for replacing vehicle model and texture with custom ones.<br />
<syntaxhighlight lang="lua"><br />
function ReplaceVehicle ( )<br />
outputChatBox ( "> replacing the euros vehicle" )<br />
<br />
txd = engineLoadTXD ( "data/euros.txd" )<br />
engineImportTXD ( txd, 587 )<br />
dff = engineLoadDFF ( "data/euros.dff" )<br />
engineReplaceModel ( dff, 587 )<br />
end<br />
<br />
addEvent ( "replaceVeh", true )<br />
addEventHandler ( "replaceVeh", root, ReplaceVehicle )<br />
</syntaxhighlight><br />
</section><br />
<section name="Server" class="server" show="true"><br />
Server-side example function for triggering the replace.<br />
<syntaxhighlight lang="lua"><br />
function ReplaceCommand ( )<br />
triggerClientEvent( "replaceVeh", root, replaceVeh )<br />
end<br />
addCommandHandler( "replace", ReplaceCommand )<br />
</syntaxhighlight><br />
</section><br />
<br />
'''Example 2:'''<br />
<section name="Client" class="client" show="true"><br />
Client-side example for replacing weapons with custom mods.<br />
<syntaxhighlight lang="lua"><br />
function replaceWeapon() <br />
txd = engineLoadTXD ( "m4.txd" )<br />
engineImportTXD ( txd, 356)<br />
dff = engineLoadDFF ( "m4.dff", 356) -- use weapon model ID, not weapon ID (model ID from https://wiki.multitheftauto.com/wiki/Weapons)<br />
engineReplaceModel ( dff, 356) -- Likewise, model ID, for M4 as example it's 356<br />
<br />
end<br />
addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), replaceWeapon)<br />
</syntaxhighlight><br />
</section><br />
<br />
'''Example 3:'''<br />
<section name="Client" class="client" show="true"><br />
Client-Side example for replacing object collision, texture and model with custom ones.<br />
<syntaxhighlight lang="lua"><br />
function ReplaceObject ( )<br />
<br />
col = engineLoadCOL( "MyModel.col" )<br />
txd = engineLoadTXD( "MyModel.txd" )<br />
dff = engineLoadDFF( "MyModel.dff", 0 )<br />
<br />
engineReplaceCOL( col, 1234 )<br />
engineImportTXD( txd, 1234 )<br />
engineReplaceModel( dff, 1234 )-- replace the model at least<br />
<br />
end<br />
<br />
addEvent ( "replaceObj", true )<br />
addEventHandler ( "replaceObj", root, ReplaceObject )<br />
</syntaxhighlight><br />
</section><br />
<section name="Server" class="server" show="true"><br />
Server-side example function for triggering the replace.<br />
<syntaxhighlight lang="lua"><br />
function ReplaceCommand ( )<br />
triggerClientEvent( "replaceObj", root, replaceObj )<br />
end<br />
addCommandHandler( "replace", ReplaceCommand )<br />
</syntaxhighlight><br />
</section><br />
<br />
==See Also==<br />
{{Engine_functions}}</div>Ccwhttps://wiki.multitheftauto.com/index.php?title=AddDebugHook&diff=63471AddDebugHook2019-07-26T15:36:48Z<p>Ccw: </p>
<hr />
<div>__NOTOC__<br />
{{Server client function}}<br />
{{New feature/item|3.0136|1.3|5939|<br />
This function allows tracing of MTA functions and events. It should only be used when debugging scripts as it may degrade script performance.<br />
<br />
Debug hooks are not recursive, so functions and events triggered inside the hook callback will not be traced.<br />
}}<br />
<br />
==Syntax==<br />
<syntaxhighlight lang="lua"><br />
bool addDebugHook ( string hookType, function callbackFunction [, table nameList ] )<br />
</syntaxhighlight><br />
<br />
===Required Arguments=== <br />
*'''hookType:''' The type of hook to add. This can be:<br />
** preEvent<br />
** postEvent<br />
** preFunction<br />
** postFunction<br />
{{New feature/item|3.0158|1.5.5|11856|<br />
* preEventFunction<br />
* postEventFunction<br />
}}<br />
*'''callbackFunction:''' The function to call<br />
** Returning the string "skip" from the callback function will cause the original function/event to be skipped<br />
<br />
===Optional Arguments=== <br />
*'''nameList:''' Table of strings for restricting which functions and events the hook will be triggered on<br />
** addDebugHook and removeDebugHook will only be hooked if they are specified in the name list<br />
<br />
===Returns===<br />
Returns ''true'' if the hook was successfully added, or ''false'' otherwise.<br />
<br />
==Callback parameters==<br />
<syntaxhighlight lang="lua"><br />
string preFunction( resource sourceResource, string functionName, bool isAllowedByACL, string luaFilename, int luaLineNumber, ...functionArguments )<br />
postFunction( resource sourceResource, string functionName, bool isAllowedByACL, string luaFilename, int luaLineNumber, ...functionArguments )<br />
string preEvent( resource sourceResource, string eventName, element eventSource, element eventClient, string luaFilename, int luaLineNumber, ...eventArguments )<br />
postEvent( resource sourceResource, string eventName, element eventSource, element eventClient, string luaFilename, int luaLineNumber, ...eventArguments )<br />
</syntaxhighlight><br />
{{New feature/item|3.0158|1.5.5|11856|<br />
<syntaxhighlight lang="lua"><br />
string preEventFunction ( resource eventResource, string eventName, element eventSource, element eventClient, string eventFilename, int eventLineNumber, resource functionResource, string functionFilename, int functionLineNumber, ...eventArgs )<br />
postEventFunction ( resource eventResource, string eventName, element eventSource, element eventClient, string eventFilename, int eventLineNumber, resource functionResource, string functionFilename, int functionLineNumber, ...eventArgs )<br />
</syntaxhighlight><br />
}}<br />
<br />
==Example==<br />
This example will dump info about all triggered events:<br />
<syntaxhighlight lang="lua"><br />
function onPreEvent( sourceResource, eventName, eventSource, eventClient, luaFilename, luaLineNumber, ... )<br />
local args = { ... }<br />
local srctype = eventSource and getElementType(eventSource)<br />
local resname = sourceResource and getResourceName(sourceResource)<br />
local plrname = eventClient and getPlayerName(eventClient)<br />
outputDebugString( "preEvent"<br />
.. " " .. tostring(resname)<br />
.. " " .. tostring(eventName)<br />
.. " source:" .. tostring(srctype)<br />
.. " player:" .. tostring(plrname)<br />
.. " file:" .. tostring(luaFilename)<br />
.. "(" .. tostring(luaLineNumber) .. ")"<br />
.. " numArgs:" .. tostring(#args)<br />
.. " arg1:" .. tostring(args[1])<br />
)<br />
end<br />
addDebugHook( "preEvent", onPreEvent )<br />
</syntaxhighlight><br />
This example will dump info about all called MTA functions:<br />
<syntaxhighlight lang="lua"><br />
function onPreFunction( sourceResource, functionName, isAllowedByACL, luaFilename, luaLineNumber, ... )<br />
local args = { ... }<br />
local resname = sourceResource and getResourceName(sourceResource)<br />
outputDebugString( "preFunction"<br />
.. " " .. tostring(resname)<br />
.. " " .. tostring(functionName)<br />
.. " allowed:" .. tostring(isAllowedByACL)<br />
.. " file:" .. tostring(luaFilename)<br />
.. "(" .. tostring(luaLineNumber) .. ")"<br />
.. " numArgs:" .. tostring(#args)<br />
.. " arg1:" .. tostring(args[1])<br />
)<br />
end<br />
addDebugHook( "preFunction", onPreFunction)<br />
</syntaxhighlight><br />
<br />
This example adds a hook which will only be triggered for the named functions<br />
<syntaxhighlight lang="lua"><br />
addDebugHook( "preFunction", onPreFunction, {"setElementPosition","loadstring"} )<br />
</syntaxhighlight><br />
<br />
{{New feature/item|3.0152|1.5.2|7967|<br />
This example shows how to disable addDebugHook<br />
<syntaxhighlight lang="lua"><br />
addDebugHook( "preFunction", onPreFunction, {"addDebugHook"} )<br />
function onPreFunction( sourceResource, functionName, isAllowedByACL, luaFilename, luaLineNumber, ... )<br />
return "skip"<br />
end<br />
</syntaxhighlight><br />
}}<br />
==Changelog==<br />
{{ChangelogHeader}}<br />
{{ChangelogItem|1.3.5-9.06054|Added clientside}}<br />
{{ChangelogItem|1.3.5-9.06142|Added option to restrict to specified functions and events }}<br />
{{ChangelogItem|1.5.2-9.07957|Added option to skip original function/event <br/>Added ability to hook addDebugHook and removeDebugHook }}<br />
{{ChangelogItem|1.5.5-9.11856|Added pre/postEventFunction hooks }}<br />
==Requirements==<br />
{{Requirements|1.3.4-9.05939|1.3.5-9.06054}}<br />
<br />
==See Also==<br />
{{Utility functions}}</div>Ccwhttps://wiki.multitheftauto.com/index.php?title=Anti-cheat_guide&diff=63266Anti-cheat guide2019-07-11T14:26:13Z<p>Ccw: /* Client */</p>
<hr />
<div>This guide explains how you can fine-tune MTA's anti-cheat on your server using [[Server_mtaserver.conf|'''mtaserver.conf''']]. It does not allow players to modify their own AC settings.<br />
<br />
An anti-cheat helper resource, '''acpanel''', is included as a default resource. This shows the current anti-cheat status of your server, along with an option to keep your clients up to date and a basic implementation of [[onPlayerModInfo]] to block modified img files.<br />
<br />
You may want to fine-tune AC to prevent certain players have from having an unfair advantage or to ensure competitive integrity. The settings you provide depends entirely on the kind of server you run. Here are some examples on what can be achieved:<br />
<br/><br />
<br/><br />
* '''Problem:''' Alice tries to ram the vehicle of Eve, and Alice can clearly see the collision, but Eve's vehicle is not really moving.<br />
: '''Explanation:''' Eve has changed their vehicle model to a much smaller vehicle, or a model with a tiny hitbox or (nearly absent) collisions.<br />
: '''Solution:''' Disallow non-standard gta3.img<br />
<br/><br />
* '''Problem:''' Eve seems to be using wallhacks! She even seems to even be shooting through them!<br />
: '''Explanation:''' Eve has replaced buildings so that they are either invisible (textures) or tiny (models).<br />
: '''Solution:''' Disallow non-standard gta3.img<br />
<br/><br />
* '''Problem:''' Mallory seems to be solving complex maths questions instantly! It should take at least a couple of seconds... for humans.<br />
: '''Explanation:''' Mallory is injecting keyboard input via something like AutoHotkey<br />
: '''Solution:''' Enable SD #31 to prevent users from injecting keyboard input. You can use SD #32 for injected mouse input (e.g. for scripts that require natural skill from mouse input)<br />
<br/><br />
* '''Problem:''' Mallory seems to be spamming my commands and GUI... and it lags my entire server!<br />
: '''Explanation:''' You are running expensive user-initiated code without rate limiting players.<br />
: '''Solution:''' You should write code that prevents players from spamming certain actions.<br />
: '''Lazy Solution:''' Enable SD #31/#32 to make it more difficult for players to spam certain actions.<br />
<br/><br />
==<disableac></disableac>==<br />
Comma separated list of disabled anti-cheats. This setting disables specific AC codes. If a detection is triggered and it's not disabled by the server, a player will get kicked and be shown the AC code corresponding to that detection.<br />
<br />
'''DISCLAIMER''':<br />
Please note that this will only void the AC # kick for using GTA singleplayer cheats and some very basic, outdated and patched MP cheats (such as s0beit). Hacks & cheats designed for MTA or other general hacking tools may trigger a Global ban.<br />
If you try to use a typical MTA cheat or hacktool under the belief using disableAC will save your day, and get banned for a while, it's your own fault, regardless of this setting being used to disable any of the AC classifications that it may fall under.<br />
<br />
There is also a good chance that disabling certain detections won't enable your players to (even) use the majority of 'basic' GTA:SA trainers, but result in a kick only.<br />
Due to the current state of MTA anti-cheat, and its advanced heuristics, it's simply not feasible to try and create a freehaven for cheaters. You can experiment, but we don't recommend using '''disableac''' for these reasons.<br />
<br />
<br />
'''Note''': With '''trainer''', cheats (for MTA or GTA) or forbidden cheat tools are meant. This is especially true for AC #4.<br />
Please note that getting kicked for anything listed here isn't neccesarily (intended) hacking, someone can open hacktools that they plan to use for another game, while both that game and MTA are opened, and be kicked.<br />
It's also possible that someone isn't aware of certain software containing hack/tamper features (making it prohibited) when they run it and get kicked.<br />
Basically, (the intent of) cheating on MTA or your server can never be proven by triggering these detections alone.<br />
<br />
Available codes are:<br />
<br />
{| border="0" cellpadding="1" cellspacing="2"<br />
|-<br />
! scope="col" style="background:#d0d0d0;"| Code for <disableac><br />
! scope="col" style="background:#d0d0d0;"| Displayed on detect<br />
! scope="col" style="background:#d0d0d0;"| Required server version<br />
! scope="col" style="background:#d0d0d0;"| Required <minclientversion> <br />
! scope="col" style="background:#d0d0d0;"| Notes<br />
|-<br />
| scope="row" style="background:#e0e0e0;" align="center"|'''1'''<br />
| style="background:#f0f0f0;" align="center"|AC #1<br />
| style="background:#f0f0f0;" align="center"|any<br />
| style="background:#f0f0f0;"|<br />
| style="background:#f0f0f0;"| Classic health/armour hack detector<br />
|-<br />
| scope="row" style="background:#e0e0e0;" align="center"|'''2'''<br />
| style="background:#f0f0f0;" align="center"|AC #2<br />
| style="background:#f0f0f0;" align="center"|any<br />
| style="background:#f0f0f0;"|<br />
| style="background:#f0f0f0;"| Corrupted dll files<br />
|-<br />
| scope="row" style="background:#e0e0e0;" align="center"|'''4'''<br />
| style="background:#f0f0f0;" align="center"|AC #4<br />
| style="background:#f0f0f0;" align="center"|any<br />
| style="background:#f0f0f0;"|<br />
| style="background:#f0f0f0;"| Detects presence of trainer. This is the most common AC code for attempted cheating, mostly with cheats designed for MTA.<br />
Note: disabling this code is unlikely to produce expected results, in accordance with what is mentioned in the "DISCLAIMER" part. <br />
|-<br />
| scope="row" style="background:#e0e0e0;" align="center"|'''5'''<br />
| style="background:#f0f0f0;" align="center"|AC #5<br />
| style="background:#f0f0f0;" align="center"|any<br />
| style="background:#f0f0f0;"|<br />
| style="background:#f0f0f0;"| Detects use of trainer. <br />
|-<br />
| scope="row" style="background:#e0e0e0;" align="center"|'''6'''<br />
| style="background:#f0f0f0;" align="center"|VF #6<br />
| style="background:#f0f0f0;" align="center"|any<br />
| style="background:#f0f0f0;"|<br />
| style="background:#f0f0f0;"| Detects use of trainer incl.: player movement, health/damage, weapons, money, gamespeed, game cheats, aimbot <br />
|-<br />
| scope="row" style="background:#e0e0e0;" align="center"|'''7'''<br />
| style="background:#f0f0f0;" align="center"|VF #7<br />
| style="background:#f0f0f0;" align="center"|any<br />
| style="background:#f0f0f0;"|<br />
| style="background:#f0f0f0;"| Detects use of trainer. <br />
|-<br />
| scope="row" style="background:#e0e0e0;" align="center"|'''8'''<br />
| style="background:#f0f0f0;" align="center"|VF #8<br />
| style="background:#f0f0f0;" align="center"|any<br />
| style="background:#f0f0f0;"|<br />
| style="background:#f0f0f0;"| Detects unauthorized mods<br />
|-<br />
| scope="row" style="background:#e0e0e0;" align="center" rowspan="2"|'''11'''<br />
| style="background:#f0f0f0;" align="center"|AC #11<br />
| style="background:#f0f0f0;" align="center"|any<br />
| style="background:#f0f0f0;"|<br />
| style="background:#f0f0f0;"| More trainers<br />
|-<br />
| style="background:#f0f0f0;" align="center"|VF #11<br />
| style="background:#f0f0f0;" align="center"|any<br />
| style="background:#f0f0f0;"|<br />
| style="background:#f0f0f0;"| Dll injector / Trainer<br />
|-<br />
| scope="row" style="background:#e0e0e0;" align="center"|'''13'''<br />
| style="background:#f0f0f0;" align="center"|SD #13<br />
| style="background:#f0f0f0;" align="center"|any<br />
| style="background:#f0f0f0;"|<br />
| style="background:#f0f0f0;"| Data files issue<br />
|-<br />
| scope="row" style="background:#e0e0e0;" align="center"|'''17'''<br />
| style="background:#f0f0f0;" align="center"|VF #17<br />
| style="background:#f0f0f0;" align="center"|any<br />
| style="background:#f0f0f0;"|<br />
| style="background:#f0f0f0;"| Speed / wall hacks<br />
|-<br />
| scope="row" style="background:#e0e0e0;" align="center" rowspan="2"|'''21'''<br />
| style="background:#f0f0f0;" align="center"|AC #21<br />
| style="background:#f0f0f0;" align="center"|any<br />
| style="background:#f0f0f0;" align="center"|1.3.1-9.05097 <br />
| style="background:#f0f0f0;"| More trainers<br />
|-<br />
| style="background:#f0f0f0;" align="center"|VF #21<br />
| style="background:#f0f0f0;" align="center"|any<br />
| style="background:#f0f0f0;" align="center"|1.3.1-9.05097 <br />
| style="background:#f0f0f0;"| Custom gta_sa.exe<br />
|-<br />
| scope="row" style="background:#e0e0e0;" align="center"|'''26'''<br />
| style="background:#f0f0f0;" align="center"|SD #26<br />
| style="background:#f0f0f0;" align="center"|any<br />
| style="background:#f0f0f0;" align="center"|1.3.4-9.05858 <br />
| style="background:#f0f0f0;"| Anti-cheat component blocked<br />
|}<br />
<br/><br />
<br />
==<enablesd></enablesd>==<br />
Comma separated list of enabled Special Detections (SD #). A special detection is a type of anti-cheat for (usually) harmless game modifications. Competitive servers or servers dealing with a certain problem structurally may wish to enable special detections, but most servers should leave this setting blank. Available codes are:<br />
{| border="0" cellpadding="1" cellspacing="2"<br />
|-<br />
! scope="col" style="background:#d0d0d0;"|Code for <enablesd><br />
! scope="col" style="background:#d0d0d0;"|Displayed on detect<br />
! scope="col" style="background:#d0d0d0;"|Required server version<br />
! scope="col" style="background:#d0d0d0;"|Required <minclientversion><br />
! scope="col" style="background:#d0d0d0;"|Notes<br />
|-<br />
| scope="row" style="background:#e0e0e0;" align="center"|'''12'''<br />
| style="background:#f0f0f0;" align="center"|SD #12<br />
| style="background:#f0f0f0;" align="center"|any<br />
| style="background:#f0f0f0;"|<br />
| style="background:#f0f0f0;"| Disallow custom D3D9.DLL<br />
|-<br />
| scope="row" style="background:#e0e0e0;" align="center"|'''14'''<br />
| style="background:#f0f0f0;" align="center"|SD #14<br />
| style="background:#f0f0f0;" align="center"|1.3.1-9.04605<br />
| style="background:#f0f0f0;" align="center"|1.3.1-9.04605<br />
| style="background:#f0f0f0;"| Disallow virtual machines such as VMWare<br />
|-<br />
| scope="row" style="background:#e0e0e0;" align="center"|'''15'''<br />
| style="background:#f0f0f0;" align="center"|SD #15<br />
| style="background:#f0f0f0;" align="center"|1.3.1-9.04791<br />
| style="background:#f0f0f0;" align="center"|1.3.1-9.04791<br />
| style="background:#f0f0f0;"| Disallow disabled driver signing <br />
|-<br />
| scope="row" style="background:#e0e0e0;" align="center"|'''16'''<br />
| style="background:#f0f0f0;" align="center"|SD #16<br />
| style="background:#f0f0f0;" align="center"|1.3.1-9.05097<br />
| style="background:#f0f0f0;" align="center"|1.3.1-9.05097<br />
| style="background:#f0f0f0;"| Disallow disabled anti-cheat components. This is triggered when an anti-cheat component can not start. It is usually due to some problem with the PC and might be fixed by a reboot. Can also be triggered by a virus.<br />
|-<br />
| scope="row" style="background:#e0e0e0;" align="center"|'''20'''<br />
| style="background:#f0f0f0;" align="center"|SD #20<br />
| style="background:#f0f0f0;" align="center"|1.3.1-9.05097<br />
| style="background:#f0f0f0;" align="center"|1.3.1-9.05097<br />
| style="background:#f0f0f0;"| Disallow non-standard gta3.img or gta_int.img (For servers not using [[onPlayerModInfo]])<br />
|-<br />
| scope="row" style="background:#e0e0e0;" align="center"|'''22'''<br />
| style="background:#f0f0f0;" align="center"|SD #22<br />
| style="background:#f0f0f0;" align="center"|1.3.4-9.05884<br />
| style="background:#f0f0f0;" align="center"|1.3.4-9.05884<br />
| style="background:#f0f0f0;"| Disallow resource download errors/corruption (Lua script files)<br />
|-<br />
| scope="row" style="background:#e0e0e0;" align="center"|'''23'''<br />
| style="background:#f0f0f0;" align="center"|SD #23<br />
| style="background:#f0f0f0;" align="center"|1.3.4-9.05884<br />
| style="background:#f0f0f0;" align="center"|1.5.2-9.07911<br />
| style="background:#f0f0f0;"| Disallow resource download errors/corruption (Non-Lua files e.g. png,dff)<br />
|-<br />
| scope="row" style="background:#e0e0e0;" align="center"|'''28'''<br />
| style="background:#f0f0f0;" align="center"|SD #28<br />
| style="background:#f0f0f0;" align="center"|1.3.4-9.05884<br />
| style="background:#f0f0f0;" align="center"|1.3.4-9.05884<br />
| style="background:#f0f0f0;"| Disallow Linux Wine<br />
|-<br />
| scope="row" style="background:#e0e0e0;" align="center"|'''31'''<br />
| style="background:#f0f0f0;" align="center"|SD #31<br />
| style="background:#f0f0f0;" align="center"|1.5.3<br />
| style="background:#f0f0f0;" align="center"|1.5.3-9.11204<br />
| style="background:#f0f0f0;"| Ignore injected keyboard inputs (e.g. from AutoHotkey, macro's and on screen keyboard)<br />
|-<br />
| scope="row" style="background:#e0e0e0;" align="center"|'''32'''<br />
| style="background:#f0f0f0;" align="center"|SD #32<br />
| style="background:#f0f0f0;" align="center"|1.5.3<br />
| style="background:#f0f0f0;" align="center"|1.5.4-9.11528<br />
| style="background:#f0f0f0;"| Ignore injected mouse button inputs and movement (this detection can prevent an ambigious type of aim hacks (bullet spread/recoil manipulation)<br />
|<br />
|-<br />
| scope="row" style="background:#e0e0e0;" align="center"|'''33'''<br />
| style="background:#f0f0f0;" align="center"|SD #33<br />
| style="background:#f0f0f0;" align="center"|1.5.6<br />
| style="background:#f0f0f0;" align="center"|1.5.6<br />
| style="background:#f0f0f0;"| Disallow software of the category 'Net limiter' (ideal for lagswitching or causing structural lag, but may also be used for benign purposes)<br />
|-<br />
| scope="row" style="background:#e0e0e0;" align="center"|'''34'''<br />
| style="background:#f0f0f0;" align="center"|SD #34<br />
| style="background:#f0f0f0;" align="center"|1.5.6<br />
| style="background:#f0f0f0;" align="center"|1.5.6<br />
| style="background:#f0f0f0;"| Disallow internet café users ('''only''' use as last resort to combat mass ban evasion using café PC's)<br />
|-<br />
| scope="row" style="background:#e0e0e0;" align="center"|'''35'''<br />
| style="background:#f0f0f0;" align="center"|SD #35<br />
| style="background:#f0f0f0;" align="center"|1.5.6<br />
| style="background:#f0f0f0;" align="center"|1.5.6<br />
| style="background:#f0f0f0;"| <br/>Disallow certain software with "FPS locking" capabilities, for example Fraps recorder.<br/><br />
Particularly racing gamemodes are impacted by players that use FPS lock hotkey at times they need an unfair advantage (like, to drive through a loop faster) or a small speed boost. <br/><br />
<br/> '''Note''': it would be better if you use this SD in a custom implementation only (using [[onPlayerACInfo]]) instead of kick in mtaserver.conf. For example so that it would only kick when they approach a loop, or are playing a map sensitive to this abuse. Because you'll have to tread carefully, since Fraps is also a popular recording tool. <br/><br />
|}<br />
<br/><br />
<br />
We are constantly working on keeping the definitions for above SD (special detections) up-to-date, so as to ensure all violating software or circumstances that you opt-in to disable gets detected once used. While we are pro-actively checking if new or unknown software/tools are still being detected under the same signature, it's possible that something slips through the cracks. Therefore, you can help us if you come across anything that should be detectable using SD # but is not currently; send a forum PM to Dutchman101 or ccw with your report.<br />
<br />
==<client_file name="data/carmods.dat" verify="0"/>==<br />
By default, clients may not join a server if they have customized GTA:SA data files. Adding one or more of the above lines excludes files from validation. The file names that can be used are:<br />
<br />
* "anim/ped.ifp"<br />
* "data/animgrp.dat"<br />
* "data/ar_stats.dat"<br />
* "data/carmods.dat"<br />
* "data/clothes.dat"<br />
* "data/default.dat"<br />
* "data/default.ide"<br />
* "data/furnitur.dat"<br />
* "data/gta.dat"<br />
* <strike>"data/handling.cfg"</strike> - this is unavailable because MTA always ignores this file so that [[setVehicleHandling]] works correctly. [[Handling.cfg|Click here]]'' if you want to load custom handling.cfg files.<br />
* "data/maps" - this applies to all files within this folder<br />
* "data/melee.dat"<br />
* "data/object.dat"<br />
* "data/peds.ide"<br />
* "data/pedstats.dat"<br />
* "data/plants.dat"<br />
* "data/procobj.dat"<br />
* "data/surface.dat"<br />
* "data/surfinfo.dat"<br />
* "data/timecyc.dat" - minimum server version 1.5.6-9.18322<br />
* "data/txdcut.ide"<br />
* "data/vehicles.ide"<br />
* "data/water1.dat"<br />
* "data/water.dat"<br />
* "data/weapon.dat"<br />
* "models/coll/weapons.col"<br />
<br />
==<hideac></hideac>==<br />
<br />
You can use this setting in mtaserver.conf to hide the AC info from the client, showing the following line upon join:<br />
Server AC info: [Undisclosed]<br />
<br />
Values: 0 - disabled, 1 - enabled; default value: 0.<br />
<br />
=Client=<br />
When joining a server, the server AC info is displayed in the client console (F8)<br/><br />
Example:<br/><br />
Server AC Info: [Allowed client files: None] [Disabled AC: None] [Enabled SD: None]<br />
<br />
Disabled AC contains the contents of the server setting from <disableac></disableac><br/><br />
Enabled SD contains the contents of the server setting from <enablesd></enablesd><br/><br />
Allowed client files contains numbers to indicate which client files the server allows to be modified. The numbers represent these files:<br />
*1 - "data/carmods.dat"<br />
*2 - "data/animgrp.dat"<br />
*4 - "data/ar_stats.dat"<br />
*5 - "data/melee.dat"<br />
*6 - "data/clothes.dat"<br />
*7 - "data/object.dat"<br />
*8 - "data/default.dat"<br />
*9 - "data/surface.dat"<br />
*10 - "data/default.ide"<br />
*12 - "data/gta.dat"<br />
*13 - "data/surfinfo.dat"<br />
*14 - "data/peds.ide"<br />
*15 - "data/vehicles.ide"<br />
*16 - "data/pedstats.dat"<br />
*17 - "data/water.dat"<br />
*18 - "data/txdcut.ide"<br />
*19 - "data/water1.dat"<br />
*20 - "models/coll/weapons.col"<br />
*21 - "data/weapon.dat"<br />
*22 - "data/plants.dat"<br />
*23 - "anim/ped.ifp"<br />
*24 - "data/furnitur.dat"<br />
*25 - "data/procobj.dat"<br />
*26 - "data/maps"<br />
*27 - "data/timecyc.dat"<br />
<br />
'''''Note:''''' ''If the info is marked "Undisclosed", it means that the server has decided not to disclose the AC info to the client.''<br />
<br />
===Using modified files===<br />
If you want to use modified data files from your GTA:SA install directory, check this check box:<br/><br />
Settings -> Multiplayer -> Use customized GTA:SA files<br />
(checkbox only appears if your GTA:SA data files are customized)<br/><br />
<br />
'''''Note:''''' ''This will restrict your access to some public servers as most do not allow customized data files.''<br />
<br />
<br />
[[Category: Support]]<br />
[[ru:Anti-cheat guide]]</div>Ccwhttps://wiki.multitheftauto.com/index.php?title=Anti-cheat_guide&diff=63102Anti-cheat guide2019-06-27T14:20:38Z<p>Ccw: </p>
<hr />
<div>This guide explains how you can fine-tune MTA's anti-cheat on your server using [[Server_mtaserver.conf|'''mtaserver.conf''']]. It does not allow players to modify their own AC settings.<br />
<br />
An anti-cheat helper resource, '''acpanel''', is included as a default resource. This shows the current anti-cheat status of your server, along with an option to keep your clients up to date and a basic implementation of [[onPlayerModInfo]] to block modified img files.<br />
<br />
You may want to fine-tune AC to prevent certain players have from having an unfair advantage or to ensure competitive integrity. The settings you provide depends entirely on the kind of server you run. Here are some examples on what can be achieved:<br />
<br/><br />
<br/><br />
* '''Problem:''' Alice tries to ram the vehicle of Eve, and Alice can clearly see the collision, but Eve's vehicle is not really moving.<br />
: '''Explanation:''' Eve has changed their vehicle model to a much smaller vehicle, or a model with a tiny hitbox or (nearly absent) collisions.<br />
: '''Solution:''' Disallow non-standard gta3.img<br />
<br/><br />
* '''Problem:''' Eve seems to be using wallhacks! She even seems to even be shooting through them!<br />
: '''Explanation:''' Eve has replaced buildings so that they are either invisible (textures) or tiny (models).<br />
: '''Solution:''' Disallow non-standard gta3.img<br />
<br/><br />
* '''Problem:''' Mallory seems to be solving complex maths questions instantly! It should take at least a couple of seconds... for humans.<br />
: '''Explanation:''' Mallory is injecting keyboard input via something like AutoHotkey<br />
: '''Solution:''' Enable SD #31 to prevent users from injecting keyboard input. You can use SD #32 for injected mouse input (e.g. for scripts that require natural skill from mouse input)<br />
<br/><br />
* '''Problem:''' Mallory seems to be spamming my commands and GUI... and it lags my entire server!<br />
: '''Explanation:''' You are running expensive user-initiated code without rate limiting players.<br />
: '''Solution:''' You should write code that prevents players from spamming certain actions.<br />
: '''Lazy Solution:''' Enable SD #31/#32 to make it more difficult for players to spam certain actions.<br />
<br/><br />
==<disableac></disableac>==<br />
Comma separated list of disabled anti-cheats. This setting disables specific AC codes. If a detection is triggered and it's not disabled by the server, a player will get kicked and be shown the AC code corresponding to that detection.<br />
<br />
'''DISCLAIMER''':<br />
Please note that this will only void the AC # kick for using GTA singleplayer cheats and some very basic, outdated and patched MP cheats (such as s0beit). Hacks & cheats designed for MTA or other general hacking tools may trigger a Global ban.<br />
If you try to use a typical MTA cheat or hacktool under the belief using disableAC will save your day, and get banned for a while, it's your own fault, regardless of this setting being used to disable any of the AC classifications that it may fall under.<br />
<br />
There is also a good chance that disabling certain detections won't enable your players to (even) use the majority of 'basic' GTA:SA trainers, but result in a kick only.<br />
Due to the current state of MTA anti-cheat, and its advanced heuristics, it's simply not feasible to try and create a freehaven for cheaters. You can experiment, but we don't recommend using '''disableac''' for these reasons.<br />
<br />
<br />
'''Note''': With '''trainer''', cheats (for MTA or GTA) or forbidden cheat tools are meant. This is especially true for AC #4.<br />
Please note that getting kicked for anything listed here isn't neccesarily (intended) hacking, someone can open hacktools that they plan to use for another game, while both that game and MTA are opened, and be kicked.<br />
It's also possible that someone isn't aware of certain software containing hack/tamper features (making it prohibited) when they run it and get kicked.<br />
Basically, (the intent of) cheating on MTA or your server can never be proven by triggering these detections alone.<br />
<br />
Available codes are:<br />
<br />
{| border="0" cellpadding="1" cellspacing="2"<br />
|-<br />
! scope="col" style="background:#d0d0d0;"| Code for <disableac><br />
! scope="col" style="background:#d0d0d0;"| Displayed on detect<br />
! scope="col" style="background:#d0d0d0;"| Required server version<br />
! scope="col" style="background:#d0d0d0;"| Required <minclientversion> <br />
! scope="col" style="background:#d0d0d0;"| Notes<br />
|-<br />
| scope="row" style="background:#e0e0e0;" align="center"|'''1'''<br />
| style="background:#f0f0f0;" align="center"|AC #1<br />
| style="background:#f0f0f0;" align="center"|any<br />
| style="background:#f0f0f0;"|<br />
| style="background:#f0f0f0;"| Classic health/armour hack detector<br />
|-<br />
| scope="row" style="background:#e0e0e0;" align="center"|'''2'''<br />
| style="background:#f0f0f0;" align="center"|AC #2<br />
| style="background:#f0f0f0;" align="center"|any<br />
| style="background:#f0f0f0;"|<br />
| style="background:#f0f0f0;"| Corrupted dll files<br />
|-<br />
| scope="row" style="background:#e0e0e0;" align="center"|'''4'''<br />
| style="background:#f0f0f0;" align="center"|AC #4<br />
| style="background:#f0f0f0;" align="center"|any<br />
| style="background:#f0f0f0;"|<br />
| style="background:#f0f0f0;"| Detects presence of trainer. This is the most common AC code for attempted cheating, mostly with cheats designed for MTA.<br />
|-<br />
| scope="row" style="background:#e0e0e0;" align="center"|'''5'''<br />
| style="background:#f0f0f0;" align="center"|AC #5<br />
| style="background:#f0f0f0;" align="center"|any<br />
| style="background:#f0f0f0;"|<br />
| style="background:#f0f0f0;"| Detects use of trainer. <br />
|-<br />
| scope="row" style="background:#e0e0e0;" align="center"|'''6'''<br />
| style="background:#f0f0f0;" align="center"|VF #6<br />
| style="background:#f0f0f0;" align="center"|any<br />
| style="background:#f0f0f0;"|<br />
| style="background:#f0f0f0;"| Detects use of trainer incl.: player movement, health/damage, weapons, money, gamespeed, game cheats, aimbot <br />
|-<br />
| scope="row" style="background:#e0e0e0;" align="center"|'''7'''<br />
| style="background:#f0f0f0;" align="center"|VF #7<br />
| style="background:#f0f0f0;" align="center"|any<br />
| style="background:#f0f0f0;"|<br />
| style="background:#f0f0f0;"| Detects use of trainer. <br />
|-<br />
| scope="row" style="background:#e0e0e0;" align="center"|'''8'''<br />
| style="background:#f0f0f0;" align="center"|VF #8<br />
| style="background:#f0f0f0;" align="center"|any<br />
| style="background:#f0f0f0;"|<br />
| style="background:#f0f0f0;"| Detects unauthorized mods<br />
|-<br />
| scope="row" style="background:#e0e0e0;" align="center" rowspan="2"|'''11'''<br />
| style="background:#f0f0f0;" align="center"|AC #11<br />
| style="background:#f0f0f0;" align="center"|any<br />
| style="background:#f0f0f0;"|<br />
| style="background:#f0f0f0;"| More trainers<br />
|-<br />
| style="background:#f0f0f0;" align="center"|VF #11<br />
| style="background:#f0f0f0;" align="center"|any<br />
| style="background:#f0f0f0;"|<br />
| style="background:#f0f0f0;"| Dll injector / Trainer<br />
|-<br />
| scope="row" style="background:#e0e0e0;" align="center"|'''13'''<br />
| style="background:#f0f0f0;" align="center"|SD #13<br />
| style="background:#f0f0f0;" align="center"|any<br />
| style="background:#f0f0f0;"|<br />
| style="background:#f0f0f0;"| Data files issue<br />
|-<br />
| scope="row" style="background:#e0e0e0;" align="center"|'''17'''<br />
| style="background:#f0f0f0;" align="center"|VF #17<br />
| style="background:#f0f0f0;" align="center"|any<br />
| style="background:#f0f0f0;"|<br />
| style="background:#f0f0f0;"| Speed / wall hacks<br />
|-<br />
| scope="row" style="background:#e0e0e0;" align="center" rowspan="2"|'''21'''<br />
| style="background:#f0f0f0;" align="center"|AC #21<br />
| style="background:#f0f0f0;" align="center"|any<br />
| style="background:#f0f0f0;" align="center"|1.3.1-9.05097 <br />
| style="background:#f0f0f0;"| More trainers<br />
|-<br />
| style="background:#f0f0f0;" align="center"|VF #21<br />
| style="background:#f0f0f0;" align="center"|any<br />
| style="background:#f0f0f0;" align="center"|1.3.1-9.05097 <br />
| style="background:#f0f0f0;"| Custom gta_sa.exe<br />
|-<br />
| scope="row" style="background:#e0e0e0;" align="center"|'''26'''<br />
| style="background:#f0f0f0;" align="center"|SD #26<br />
| style="background:#f0f0f0;" align="center"|any<br />
| style="background:#f0f0f0;" align="center"|1.3.4-9.05858 <br />
| style="background:#f0f0f0;"| Anti-cheat component blocked<br />
|}<br />
<br/><br />
<br />
==<enablesd></enablesd>==<br />
Comma separated list of enabled Special Detections (SD #). A special detection is a type of anti-cheat for (usually) harmless game modifications. Competitive servers or servers dealing with a certain problem structurally may wish to enable special detections, but most servers should leave this setting blank. Available codes are:<br />
{| border="0" cellpadding="1" cellspacing="2"<br />
|-<br />
! scope="col" style="background:#d0d0d0;"|Code for <enablesd><br />
! scope="col" style="background:#d0d0d0;"|Displayed on detect<br />
! scope="col" style="background:#d0d0d0;"|Required server version<br />
! scope="col" style="background:#d0d0d0;"|Required <minclientversion><br />
! scope="col" style="background:#d0d0d0;"|Notes<br />
|-<br />
| scope="row" style="background:#e0e0e0;" align="center"|'''12'''<br />
| style="background:#f0f0f0;" align="center"|SD #12<br />
| style="background:#f0f0f0;" align="center"|any<br />
| style="background:#f0f0f0;"|<br />
| style="background:#f0f0f0;"| Disallow custom D3D9.DLL<br />
|-<br />
| scope="row" style="background:#e0e0e0;" align="center"|'''14'''<br />
| style="background:#f0f0f0;" align="center"|SD #14<br />
| style="background:#f0f0f0;" align="center"|1.3.1-9.04605<br />
| style="background:#f0f0f0;" align="center"|1.3.1-9.04605<br />
| style="background:#f0f0f0;"| Disallow virtual machines such as VMWare<br />
|-<br />
| scope="row" style="background:#e0e0e0;" align="center"|'''15'''<br />
| style="background:#f0f0f0;" align="center"|SD #15<br />
| style="background:#f0f0f0;" align="center"|1.3.1-9.04791<br />
| style="background:#f0f0f0;" align="center"|1.3.1-9.04791<br />
| style="background:#f0f0f0;"| Disallow disabled driver signing <br />
|-<br />
| scope="row" style="background:#e0e0e0;" align="center"|'''16'''<br />
| style="background:#f0f0f0;" align="center"|SD #16<br />
| style="background:#f0f0f0;" align="center"|1.3.1-9.05097<br />
| style="background:#f0f0f0;" align="center"|1.3.1-9.05097<br />
| style="background:#f0f0f0;"| Disallow disabled anti-cheat components. This is triggered when an anti-cheat component can not start. It is usually due to some problem with the PC and might be fixed by a reboot. Can also be triggered by a virus.<br />
|-<br />
| scope="row" style="background:#e0e0e0;" align="center"|'''20'''<br />
| style="background:#f0f0f0;" align="center"|SD #20<br />
| style="background:#f0f0f0;" align="center"|1.3.1-9.05097<br />
| style="background:#f0f0f0;" align="center"|1.3.1-9.05097<br />
| style="background:#f0f0f0;"| Disallow non-standard gta3.img or gta_int.img (For servers not using [[onPlayerModInfo]])<br />
|-<br />
| scope="row" style="background:#e0e0e0;" align="center"|'''22'''<br />
| style="background:#f0f0f0;" align="center"|SD #22<br />
| style="background:#f0f0f0;" align="center"|1.3.4-9.05884<br />
| style="background:#f0f0f0;" align="center"|1.3.4-9.05884<br />
| style="background:#f0f0f0;"| Disallow resource download errors/corruption (Lua script files)<br />
|-<br />
| scope="row" style="background:#e0e0e0;" align="center"|'''23'''<br />
| style="background:#f0f0f0;" align="center"|SD #23<br />
| style="background:#f0f0f0;" align="center"|1.3.4-9.05884<br />
| style="background:#f0f0f0;" align="center"|1.5.2-9.07911<br />
| style="background:#f0f0f0;"| Disallow resource download errors/corruption (Non-Lua files e.g. png,dff)<br />
|-<br />
| scope="row" style="background:#e0e0e0;" align="center"|'''28'''<br />
| style="background:#f0f0f0;" align="center"|SD #28<br />
| style="background:#f0f0f0;" align="center"|1.3.4-9.05884<br />
| style="background:#f0f0f0;" align="center"|1.3.4-9.05884<br />
| style="background:#f0f0f0;"| Disallow Linux Wine<br />
|-<br />
| scope="row" style="background:#e0e0e0;" align="center"|'''31'''<br />
| style="background:#f0f0f0;" align="center"|SD #31<br />
| style="background:#f0f0f0;" align="center"|1.5.3<br />
| style="background:#f0f0f0;" align="center"|1.5.3-9.11204<br />
| style="background:#f0f0f0;"| Ignore injected keyboard inputs (e.g. from AutoHotkey, macro's and on screen keyboard)<br />
|-<br />
| scope="row" style="background:#e0e0e0;" align="center"|'''32'''<br />
| style="background:#f0f0f0;" align="center"|SD #32<br />
| style="background:#f0f0f0;" align="center"|1.5.3<br />
| style="background:#f0f0f0;" align="center"|1.5.4-9.11528<br />
| style="background:#f0f0f0;"| Ignore injected mouse button inputs and movement (this detection can prevent an ambigious type of aim hacks (bullet spread/recoil manipulation)<br />
|<br />
|-<br />
| scope="row" style="background:#e0e0e0;" align="center"|'''33'''<br />
| style="background:#f0f0f0;" align="center"|SD #33<br />
| style="background:#f0f0f0;" align="center"|1.5.6<br />
| style="background:#f0f0f0;" align="center"|1.5.6<br />
| style="background:#f0f0f0;"| Disallow software of the category 'Net limiter' (ideal for lagswitching or causing structural lag, but may also be used for benign purposes)<br />
|-<br />
| scope="row" style="background:#e0e0e0;" align="center"|'''34'''<br />
| style="background:#f0f0f0;" align="center"|SD #34<br />
| style="background:#f0f0f0;" align="center"|1.5.6<br />
| style="background:#f0f0f0;" align="center"|1.5.6<br />
| style="background:#f0f0f0;"| Disallow internet café users ('''only''' use as last resort to combat mass ban evasion using café PC's)<br />
|-<br />
| scope="row" style="background:#e0e0e0;" align="center"|'''35'''<br />
| style="background:#f0f0f0;" align="center"|SD #35<br />
| style="background:#f0f0f0;" align="center"|1.5.6<br />
| style="background:#f0f0f0;" align="center"|1.5.6<br />
| style="background:#f0f0f0;"| <br/>Disallow certain software with "FPS locking" capabilities, for example Fraps recorder.<br/><br />
Particularly racing gamemodes are impacted by players that use FPS lock hotkey at times they need an unfair advantage (like, to drive through a loop faster) or a small speed boost. <br/><br />
<br/> '''Note''': it would be better if you use this SD in a custom implementation only (using [[onPlayerACInfo]]) instead of kick in mtaserver.conf. For example so that it would only kick when they approach a loop, or are playing a map sensitive to this abuse. Because you'll have to tread carefully, since Fraps is also a popular recording tool. <br/><br />
|}<br />
<br/><br />
<br />
We are constantly working on keeping the definitions for above SD (special detections) up-to-date, so as to ensure all violating software or circumstances that you opt-in to disable gets detected once used. While we are pro-actively checking if new or unknown software/tools are still being detected under the same signature, it's possible that something slips through the cracks. Therefore, you can help us if you come across anything that should be detectable using SD # but is not currently; send a forum PM to Dutchman101 or ccw with your report.<br />
<br />
==<client_file name="data/carmods.dat" verify="0"/>==<br />
By default, clients may not join a server if they have customized GTA:SA data files. Adding one or more of the above lines excludes files from validation. The file names that can be used are:<br />
<br />
* "anim/ped.ifp"<br />
* "data/animgrp.dat"<br />
* "data/ar_stats.dat"<br />
* "data/carmods.dat"<br />
* "data/clothes.dat"<br />
* "data/default.dat"<br />
* "data/default.ide"<br />
* "data/furnitur.dat"<br />
* "data/gta.dat"<br />
* <strike>"data/handling.cfg"</strike> - this is unavailable because MTA always ignores this file so that [[setVehicleHandling]] works correctly. [[Handling.cfg|Click here]]'' if you want to load custom handling.cfg files.<br />
* "data/maps" - this applies to all files within this folder<br />
* "data/melee.dat"<br />
* "data/object.dat"<br />
* "data/peds.ide"<br />
* "data/pedstats.dat"<br />
* "data/plants.dat"<br />
* "data/procobj.dat"<br />
* "data/surface.dat"<br />
* "data/surfinfo.dat"<br />
* "data/timecyc.dat" - minimum server version 1.5.6-9.18322<br />
* "data/txdcut.ide"<br />
* "data/vehicles.ide"<br />
* "data/water1.dat"<br />
* "data/water.dat"<br />
* "data/weapon.dat"<br />
* "models/coll/weapons.col"<br />
<br />
==<hideac></hideac>==<br />
<br />
You can use this setting in mtaserver.conf to hide the AC info from the client, showing the following line upon join:<br />
Server AC info: [Undisclosed]<br />
<br />
Values: 0 - disabled, 1 - enabled; default value: 0.<br />
<br />
=Client=<br />
When joining a server, the server AC info is displayed in the client console (F8)<br/><br />
Example:<br/><br />
Server AC Info: [Allowed client files: None] [Disabled AC: None] [Enabled SD: None]<br />
<br />
Disabled AC contains the contents of the server setting from <disableac></disableac><br/><br />
Enabled SD contains the contents of the server setting from <enablesd></enablesd><br/><br />
Allowed client files contains numbers to indicate which client files the server allows to be modified. The numbers represent these files:<br />
*1 - "data/carmods.dat"<br />
*2 - "data/animgrp.dat"<br />
*4 - "data/ar_stats.dat"<br />
*5 - "data/melee.dat"<br />
*6 - "data/clothes.dat"<br />
*7 - "data/object.dat"<br />
*8 - "data/default.dat"<br />
*9 - "data/surface.dat"<br />
*10 - "data/default.ide"<br />
*12 - "data/gta.dat"<br />
*13 - "data/surfinfo.dat"<br />
*14 - "data/peds.ide"<br />
*15 - "data/vehicles.ide"<br />
*16 - "data/pedstats.dat"<br />
*17 - "data/water.dat"<br />
*18 - "data/txdcut.ide"<br />
*19 - "data/water1.dat"<br />
*20 - "models/coll/weapons.col"<br />
*21 - "data/weapon.dat"<br />
*22 - "data/plants.dat"<br />
*23 - "anim/ped.ifp"<br />
*24 - "data/furnitur.dat"<br />
*25 - "data/procobj.dat"<br />
*26 - "data/maps"<br />
* 27 - ''data/timecyc.dat''<br />
<br />
'''''Note:''''' ''If the info is marked "Undisclosed", it means that the server has decided not to disclose the AC info to the client.''<br />
<br />
===Using modified files===<br />
If you want to use modified data files from your GTA:SA install directory, check this check box:<br/><br />
Settings -> Multiplayer -> Use customized GTA:SA files<br />
(checkbox only appears if your GTA:SA data files are customized)<br/><br />
<br />
'''''Note:''''' ''This will restrict your access to some public servers as most do not allow customized data files.''<br />
<br />
<br />
[[Category: Support]]<br />
[[ru:Anti-cheat guide]]</div>Ccwhttps://wiki.multitheftauto.com/index.php?title=Server_mtaserver.conf&diff=62912Server mtaserver.conf2019-05-31T11:57:43Z<p>Ccw: Reverted edits by Lucho123 (talk) to last revision by Ccw</p>
<hr />
<div>This page lists the settings that can be set in the settings file. ''Setting from the default '''mtaserver.conf''' settings file is in italics''.<br />
<br />
<br />
====servername====<br />
:''<servername>Default MTA Server</servername>''<br />
:This parameter specifies the name the server will be visible as in the ingame server browser and on Game-Monitor. It is a required parameter. <br />
<br />
====owner_email_address====<br />
:''<owner_email_address></owner_email_address>''<br />
:This parameter specifies the contact email addresses for the owner(s) of this server.<br />
:The email addresses will not be publicly available, and only used by MTA administrators to contact the server owner.<br />
:Note: Missing or incorrect owner_email_address can affect visibility in the master server list.<br />
:Values: Comma separated list of email addresses<br />
<br />
====serverip====<br />
:''<serverip>auto</serverip><br />
:'''ONLY USE THIS PARAMETER IF YOU ARE SURE OF WHAT YOU ARE DOING''' - it is generally only needed for professional servers and should be left at the default value otherwise.<br />
: This parameter specifies the IP to use for servers that have multiple IP addresses. If set to auto, it will automatically detect and use the server's standard local IP address.<br />
:Values: auto or x.x.x.x ; default value: auto<br />
:SERVERIP SHOULD BE LEFT SET TO auto UNLESS YOU ARE SURE OF WHAT YOU ARE DOING<br />
:WARNING: SETTING serverip AND THEN ASKING FOR SUPPORT CAN CAUSE DEATH OR INJURY<br />
<br />
====serverport====<br />
:''<serverport>22003</serverport> <br />
:This parameter specifies the UDP port on which the server will be accepting incoming player connections;<br />
:default value: 22003. It is a required parameter.<br />
<br />
====maxplayers====<br />
:''<maxplayers>32</maxplayers><br />
:This parameter specifies the number of maximum player slots available on the server;<br />
:default value: 32. It is a required parameter.<br />
<br />
====httpserver====<br />
<!-- no longer present in mtaserver.conf --><br />
:''<httpserver>1</httpserver><br />
:This parameter specifies whether the built-in http server will be used.<br />
:Values: 0 - disabled , 1 - enabled ; default value: 1. Optional parameter.<br />
:More information: [[Server_Manual#Using_the_web_interface|Using the web interface]]<br />
<br />
====httpport====<br />
:''<httpport>22005</httpport><br />
:This parameter specifies the TCP port on which the server will be accepting incoming http connections. It can be set to the same value as <serverport>. It is a required parameter if <httpserver> is set to 1.<br />
:More information: [[Server_Manual#Using_the_web_interface|Using the web interface]]<br />
<br />
====httpdownloadurl====<br />
:''<httpdownloadurl></httpdownloadurl><br />
:If set, this parameter specifies the external URL from which clients will be able to download needed resources ingame. Otherwise they will download them directly from the server.<br />
:More information: [[Server_Manual#Configuring_an_external_web_server|Configuring an external web server]]<br />
<br />
====httpmaxconnectionsperclient====<br />
:''<httpmaxconnectionsperclient>5</httpmaxconnectionsperclient><br />
:This parameter limits the number of http connections each client can make. Depending on the type of http server that is used, a lower figure may reduce download timeouts. Only relevant when using an external http server.<br />
:Available range: 1 to 8.<br />
<br />
====httpdosthreshold====<br />
:''<httpdosthreshold>20</httpdosthreshold><br />
:This parameter limits the number http connections that an IP can initiate over a short period of time.<br />
:Available range: 1 to 100. default value: 20<br />
<br />
====http_dos_exclude====<br />
:''<http_dos_exclude></http_dos_exclude><br />
:This parameter lists the IP addresses that are to be excluded from http dos threshold limits.<br />
:e.g. 88.11.22.33,101.2.3.4<br />
<br />
====allow_gta3_img_mods====<br />
:''<allow_gta3_img_mods>none</allow_gta3_img_mods><br />
:By default, the server will block the use of locally customized gta3.img player skins<br />
:This setting can be used to allow such mods. Not recommended for competitive servers.<br />
:Values: none, peds ; default value: none<br />
<br />
====client_file====<br />
:''<nowiki><!-- <client_file name="data/carmods.dat" verify="0" /> --></nowiki><br />
:By default, the server will block the use of customized GTA:SA data files.<br />
:To allow specific client files, add one or more of the above lines.<br />
:More information: [[Anti-cheat_guide|Anti-cheat guide]]<br />
<br />
====disableac====<br />
:''<disableac></disableac><br />
:Comma separated list of disabled anti-cheats.<br />
:e.g. To disable anti-cheat #2 and #3, use: 2,3<br />
:More information: [[Anti-cheat_guide|Anti-cheat guide]]<br />
<br />
====enablesd====<br />
:''<enablesd></enablesd><br />
:Comma seperated list of enabled special detections. A special detection is a type of anti-cheat for (usually) harmless game modifications. Competitive servers may wish to enable special detections, but most servers should leave this setting blank.<br />
:e.g. To enable special detection #12 (disallow custom D3D9.DLL) use: 12<br />
:More information: [[Anti-cheat_guide|Anti-cheat guide]]<br />
<br />
====minclientversion====<br />
:''<minclientversion></minclientversion><br />
:Minimum client version. Clients with a lower version will not be allowed to connect. After disconnection, clients will be given an opportunity to download an update. If left blank, this setting is disabled and there are no restrictions on who can connect. Version numbers are described in [[getPlayerVersion]] and look like this: 1.1.0-9.03100.0<br />
:This parameter can changed and saved while the server is running with [[setServerConfigSetting]]<br />
:'''Note that this setting only determines if the client should be prompted to update. The actual build number they receive will be the [[http://nightly.mtasa.com/ver highest available]].'''<br />
<br />
====minclientversion_auto_update====<br />
:''<minclientversion_auto_update>1</minclientversion_auto_update><br />
:This parameter specifies if/when the <minclientversion> setting is automatically updated.<br />
:Keeping <minclientversion> updated can help reduce cheating.<br />
:Note: The instant setting (2) is only recommended for competitive servers.<br />
:Values: 0 - disabled, 1 - enabled (delayed by a few days), 2 - enabled (instant) ; default value: 1.<br />
<br />
====recommendedclientversion====<br />
:''<recommendedclientversion></recommendedclientversion><br />
:Recommended client version. When connecting, if clients have a lower version, they will be given the option to download an update. If left blank, this setting is disabled.<br />
:This parameter can changed and saved while the server is running with [[setServerConfigSetting]]<br />
:'''Note that this setting only determines if the client should be prompted to update. The actual build number they receive will be the [[http://nightly.mtasa.com/ver highest available]].'''<br />
<br />
====ase====<br />
:''<ase>1</ase><br />
:This parameter can be used to make the server report to Game-Monitor master servers, allowing it to be visible in the in-game server browser. An additional UDP port needs to be available for this to work (value from <serverport> + 123 , so on a default <serverport> value 22003 the right port will be 22126 ).<br />
:Available values: 0 - disabled , 1 - enabled. Optional parameter, defaults to 0.<br />
<br />
====donotbroadcastlan====<br />
:''<donotbroadcastlan>0</donotbroadcastlan><br />
:This parameter allows you to disable LAN broadcasting. <br />
<br />
====password====<br />
:''<password></password> <br />
:If set, players will have to provide a password specified below, before they can connect to the server. If left blank, server doesn't require a password from them.<br />
:This parameter can changed and saved while the server is running with [[setServerPassword]] or [[setServerConfigSetting]]<br />
<br />
====bandwidth_reduction====<br />
:''<bandwidth_reduction>medium</bandwidth_reduction> <br />
:This parameter reduces the server's bandwidth usage by using various optimizations.<br />
:Values: none, medium or maximum ; default value: medium<br />
:This parameter can be changed and saved while the server is running with [[setServerConfigSetting]]<br />
<br />
====unoccupied_vehicle_syncer_distance====<br />
<!-- no longer present in mtaserver.conf --><br />
:''<unoccupied_vehicle_syncer_distance>130</unoccupied_vehicle_syncer_distance><br />
:This parameter determines the distance limit for remote synced unoccupied vehicles<br />
:Available range: 50 - 400; default value: 130<br />
:This parameter can be changed and saved while the server is running with [[setServerConfigSetting]]<br />
<br />
====ped_syncer_distance====<br />
<!-- no longer present in mtaserver.conf --><br />
:''<ped_syncer_distance>100</ped_syncer_distance><br />
:This parameter determines the distance limit for remote synced peds<br />
:Available range: 50 - 400; default value: 100<br />
:This parameter can be changed and saved while the server is running with [[setServerConfigSetting]]<br />
<br />
====player_sync_interval====<br />
:''<player_sync_interval>100</player_sync_interval> <br />
:This parameter determines the time in milliseconds between player sync packets.<br />
:Available range: 50 - 500; default value: 100<br />
:This parameter can be changed and saved while the server is running with [[setServerConfigSetting]]<br />
:Suggested values for this and the other sync_interval settings can be found here: [[Sync_interval_settings|Sync interval settings]]<br />
<br />
====lightweight_sync_interval====<br />
:''<lightweight_sync_interval>1500</lightweight_sync_interval> <br />
:This parameter determines the time in milliseconds between lightweight (player) sync packets.<br />
:Available range: 200 - 4000; default value: 1500<br />
:This parameter can be changed and saved while the server is running with [[setServerConfigSetting]]<br />
:Suggested values for this and the other sync_interval settings can be found here: [[Sync_interval_settings|Sync interval settings]]<br />
<br />
====camera_sync_interval====<br />
:''<camera_sync_interval>500</camera_sync_interval> <br />
:This parameter determines the time in milliseconds between camera sync packets.<br />
:Available range: 200 - 400; default value: 500<br />
:This parameter can be changed and saved while the server is running with [[setServerConfigSetting]]<br />
:Suggested values for this and the other sync_interval settings can be found here: [[Sync_interval_settings|Sync interval settings]]<br />
<br />
====ped_sync_interval====<br />
:''<ped_sync_interval>400</ped_sync_interval> <br />
:This parameter determines the time in milliseconds between ped sync packets.<br />
:Available range: 200 - 4000; default value: 400<br />
:This parameter can be changed and saved while the server is running with [[setServerConfigSetting]]<br />
:Suggested values for this and the other sync_interval settings can be found here: [[Sync_interval_settings|Sync interval settings]]<br />
<br />
====unoccupied_vehicle_sync_interval====<br />
:''<unoccupied_vehicle_sync_interval>1000</unoccupied_vehicle_sync_interval> <br />
:This parameter determines the time in milliseconds between unoccupied vehicle sync packets.<br />
:Available range: 200 - 4000; default value: 1000<br />
:This parameter can be changed and saved while the server is running with [[setServerConfigSetting]]<br />
:Suggested values for this and the other sync_interval settings can be found here: [[Sync_interval_settings|Sync interval settings]]<br />
<br />
====keysync_mouse_sync_interval====<br />
:''<keysync_mouse_sync_interval>100</keysync_mouse_sync_interval> <br />
:This parameter determines the minimum time in milliseconds between key sync packets due to mouse movement.<br />
:Available range: 50 - 500; default value: 100<br />
:This parameter can be changed and saved while the server is running with [[setServerConfigSetting]]<br />
:Suggested values for this and the other sync_interval settings can be found here: [[Sync_interval_settings|Sync interval settings]]<br />
<br />
====keysync_analog_sync_interval====<br />
:''<keysync_analog_sync_interval>100</keysync_analog_sync_interval> <br />
:This parameter determines the minimum time in milliseconds between key sync packets due to joystick movement.<br />
:Available range: 50 - 500; default value: 100<br />
:This parameter can be changed and saved while the server is running with [[setServerConfigSetting]]<br />
:Suggested values for this and the other sync_interval settings can be found here: [[Sync_interval_settings|Sync interval settings]]<br />
<br />
====bullet_sync====<br />
:''<bullet_sync>1</bullet_sync> <br />
:This parameter can improve the reliability of shots when using certain weapons. However, it uses more bandwidth.<br />
:Note that bullet sync will be active regardless of this setting when certain [[setGlitchEnabled|glitches]] are enabled.<br />
:Values: 0 - disabled , 1 - enabled ; default value: 1.<br />
:This parameter can be changed and saved while the server is running with [[setServerConfigSetting]]<br />
<br />
====vehext_percent====<br />
:''<vehext_percent>0</vehext_percent><br />
:This parameter sets the amount of extrapolation that clients will apply to remote vehicles. <br />
:This can reduce some of the latency induced location disparency by predicting where the remote vehicles will probably be.<br />
:Depending on the gamemode, an incorrect prediction may have a negative effect. <br />
:Therefore this setting should be considered experimental.<br />
:Available range: 0 to 100. Default - 0<br />
<br />
====vehext_ping_limit====<br />
:''<vehext_ping_limit>150</vehext_ping_limit><br />
:This parameter places a limit on how much time (in milliseconds) the vehicle extrapolation will attempt to compensate for.<br />
:Only relevant if <vehext_percent> is greater than zero.<br />
:Available range: 50 to 500. Default - 150<br />
<br />
====latency_reduction====<br />
:''<latency_reduction>0</latency_reduction><br />
:This parameter can reduce the delay of player actions appearing on remote clients by 2 frames (approx 50ms).<br />
:Due to the impact this may have on shot lag compensation, it should be considered experimental.<br />
:Values: 0 - disabled , 1 - enabled ; default value: 0.<br />
:Bugs caused by enabling latency_reduction: http://bugs.mtasa.com/view.php?id=8191 + http://bugs.mtasa.com/view.php?id=8226<br />
<br />
====threadnet====<br />
<!-- no longer present in mtaserver.conf --><br />
:''<threadnet>1</threadnet><br />
:This parameter specifies whether or not to run the network synchronization on another thread.<br />
:Enabling will make the sync smoother, but may increase CPU usage slightly.<br />
:Values: 0 - disabled , 1 - enabled ; default value: 1.<br />
:This parameter can be changed and saved while the server is running with [[setServerConfigSetting]]<br />
<br />
====idfile====<br />
:''<idfile>server-id.keys</idfile> <br />
:Specifies the location and file name of this servers unique private key. This is used to prevent private files saved on the client from being read by other servers. <br />
:Keep a backup of this file in a safe place. Default value: server-id.keys<br />
:More information about client private files: [[Filepath]]<br />
<br />
====logfile====<br />
:''<logfile>logs/server.log</logfile><br />
:Specifies the location and name of the main server log file. If left blank, server won't be saving this file.<br />
<br />
====authfile====<br />
:''<authfile>logs/server_auth.log</authfile><br />
:As well as the main log file, login successes and failures are logged here for easy reviewing of security issues. If left blank, this file is not used<br />
<br />
====dbfile====<br />
:''<dbfile>logs/db.log</dbfile><br />
:Specifies the location and name of the file used to log database queries. The server command [[Server_Commands#debugdb|debugdb]] sets the amount of logging.<br />
<br />
====loadstringfile====<br />
:''<nowiki><!-- <loadstringfile>logs/loadstring.log</loadstringfile> --></nowiki><br />
:Specifies the location and name of the file used to log loadstring function calls. If left blank or not set, no logging is done.<br />
<br />
====acl====<br />
:''<acl>acl.xml</acl> <br />
:This parameter specifies the location and name of the Access Control List settings file. If left<br />
:blank, server will use acl.xml file, located in the same folder as this configuration file.<br />
<br />
====scriptdebuglogfile====<br />
:''<scriptdebuglogfile>logs/scripts.log</scriptdebuglogfile> <br />
:Specifies the location and name of the debugscript log file. If left blank, server won't be saving this file.<br />
<br />
====scriptdebugloglevel====<br />
:''<scriptdebugloglevel>0</scriptdebugloglevel><br />
:Specifies the level of the debugscript log file. Available values: 0, 1, 2, 3. When not set, defaults to 0.<br />
<br />
====htmldebuglevel====<br />
:''<htmldebuglevel>0</htmldebuglevel><br />
:Specifies the level of the html debug. Available values: 0, 1, 2, 3. When not set, defaults to 0.<br />
<br />
====filter_duplicate_log_lines====<br />
:''<filter_duplicate_log_lines>1</filter_duplicate_log_lines><br />
:Specifies whether or not duplicate log lines should be filtered. Available values: 0 or 1, defaults to 1.<br />
<br />
====fpslimit====<br />
:''<fpslimit>36</fpslimit><br />
:Specifies the frame rate limit that will be applied to connecting clients.<br />
:Available range: 25 to 100. Default: 36.<br />
:When running the map editor locally (i.e. from the client), the default FPS limit is 50.<br />
:This parameter can be changed and saved while the server is running with [[setServerConfigSetting]]<br />
<br />
====voice====<br />
:''<voice>0</voice><br />
:This parameter specifies whether or not to enable player voice chat in-game<br />
:Values: 0 - disabled , 1 - enabled<br />
<br />
====voice_samplerate====<br />
:''<voice_samplerate>1</voice_samplerate><br />
:This parameter specifies the sample rate for voice chat. 'voice' parameter must be set to 1 for this to be effective. Higher settings use more bandwidth and increase the sampling quality of voice chat<br />
:Values: 0 - Narrowband (8kHz), 1 - Wideband (16kHz), 2 - Ultrawideband (32kHz). Default - 1<br />
<br />
====voice_quality====<br />
:''<voice_quality>4</voice_quality><br />
:This parameter specifies the voice quality for voice chat. 'voice' parameter must be set to 1 for this to be effective. Higher settings use more bandwidth and increase the the overall quality of voice chat<br />
:Available range: 0 to 10. Default - 4<br />
<br />
====voice_bitrate====<br />
:''<nowiki><!-- <voice_bitrate>24600</voice_bitrate> --></nowiki><br />
:Specifies the voice bitrate, in bps. This optional parameter overrides the previous two settings. If not set, MTA handles this automatically. Use with care.<br />
<br />
====backup_path====<br />
:''<backup_path>backups</backup_path><br />
:This parameter specifies the path to use for a basic backup of some server files. Note that basic backups are only made during server startup. Default value: backups<br />
<br />
====backup_interval====<br />
:''<backup_interval>3</backup_interval><br />
:This parameter specifies the number of days between each basic backup. Backups are only made during server startup, so the actual interval maybe much longer. Setting backup_interval to 0 will disable backups<br />
:Available range: 0 to 30. Default - 3<br />
<br />
====backup_copies====<br />
:''<backup_copies>10</backup_copies><br />
:This parameter specifies the maximum number of backup copies to keep. Setting backup_copies to 0 will disable backups<br />
:Available range: 0 to 100. Default - 10<br />
<br />
====compact_internal_databases====<br />
:''<compact_internal_databases>1</compact_internal_databases><br />
:This parameter specifies when the internal sqlite databases should be defragmented.<br />
:For more info see: http://www.sqlite.org/lang_vacuum.html<br />
:Values: 0 - Never, 1 - On server start only after basic backup, 2 - On server start always. Default - 1<br />
<br />
====crash_dump_upload====<br />
:''<crash_dump_upload>1</crash_dump_upload><br />
:This parameter specifies whether server crash dump files should be sent to MTA HQ.<br />
:Values: 0 - Off, 1 - On. Default - 1<br />
<br />
====fakelag====<br />
<!-- no longer present in mtaserver.conf --><br />
:''<fakelag>0</fakelag><br />
:This parameter specifies whether the [[Command fakelag|fakelag and sfakelag]] commands are enabled<br />
:Values: 0 - Off, 1 - On. Default - 0<br />
<br />
====auth_serial_groups====<br />
:''<auth_serial_groups>Admin</auth_serial_groups><br />
:This parameter lists the ACL groups that are protected by serial authorization.<br />
:Login attempts to a protected account from a second serial are blocked until the serial is manually authorized via the authserial command.<br />
:For more info see: https://mtasa.com/authserial<br />
:Note: This is security critical feature and disabling auth_serial_groups can affect visibility in the master server list.<br />
:Values: Comma separated list of ACL groups. Default - Admin<br />
<br />
====auth_serial_http====<br />
:''<auth_serial_http>1</auth_serial_http><br />
:This parameter specifies if the authorized serial login checks should also apply to the http interface.<br />
:Protected account login attempts to the http interface will only succeed if the IP address matches one recently used by the account holder in-game.<br />
:For more info see: https://mtasa.com/authserialhttp<br />
:Note: This is security critical feature and disabling auth_serial_http can affect visibility in the master server list.<br />
:Values: 0 - Off, 1 - Enabled. Default - 1<br />
<br />
====auth_serial_http_ip_exceptions====<br />
:''<auth_serial_http_ip_exceptions>127.0.0.1</auth_serial_http_ip_exceptions><br />
:This parameter specifies which IP addresses should always pass auth_serial_http checks.<br />
:Values: Comma separated list of IP addresses<br />
<br />
====database_credentials_protection====<br />
:''<database_credentials_protection>1</database_credentials_protection><br />
:This parameter specifies if extra security measures are applied to resources which use [[dbConnect]] with MySQL.<br />
:The extra measures are:<br />
: - script files cannot be accessed with [[fileOpen]]<br />
: - [[meta.xml]] is read-only<br />
:'''NOTE:''' This only protects resources which use [[dbConnect]] with MySQL.<br />
:Values: 0 - Off, 1 - Enabled. Default - 1<br />
<br />
====module====<br />
:''<nowiki><!-- <module src="sample_win32.dll" /> --></nowiki><br />
:''<nowiki><!-- <module src="sample_linux.so" /> --></nowiki><br />
:Specifies the module(s) which are loaded with the server. To load several modules, add more <module> parameter(s). Optional parameter.<br />
<br />
====resource====<br />
:''<resource src="admin" startup="1" protected="0" /><br />
:''<resource src="defaultstats" startup="1" protected="0" /><br />
:''<resource src="helpmanager" startup="1" protected="0" /><br />
:''<resource src="joinquit" startup="1" protected="0" /><br />
:''<resource src="mapcycler" startup="1" protected="0" /><br />
:''<resource src="mapmanager" startup="1" protected="0" /><br />
:''<resource src="parachute" startup="1" protected="0" /><br />
:''<resource src="resourcebrowser" startup="1" protected="1" default="true" /><br />
:''<resource src="resourcemanager" startup="1" protected="1" /><br />
:''<resource src="scoreboard" startup="1" protected="0" /><br />
:''<resource src="spawnmanager" startup="1" protected="0" /><br />
:''<resource src="voice" startup="1" protected="0" /><br />
:''<resource src="votemanager" startup="1" protected="0" /><br />
:''<resource src="webadmin" startup="1" protected="0" /><br />
:''<resource src="play" startup="1" protected="0" /><br />
<br />
:Specifies persistent resources which are loaded when the server starts. Persistent resources are not stopped even if all the other resources that depend on them stop; that is, the only way to stop them is by explicitly using the ''stop'' server command or [[stopResource]] scripting function. To load several resources, add more <resource> parameters.<br />
<br />
:In addition, there are several flags which control how the server deals with each resource:<br />
<br />
:* '''src''': the resource name. This is the only mandatory flag.<br />
:* '''startup''': controls whether the resource will be started with the server or not. If "1", "true" or "yes", the resource will be started. If not specified, defaults to not starting the resource.<br />
:* '''protected''': if "1", "true" or "yes", the resource will not be able to be stopped when started. Otherwise, even if not specified, it will default to the normal behaviour.<br />
:* '''default''': if given a "1", "true" or "yes" value, this resource will be the one who populates the built-in HTTP server main page, which is seen when no resource is given in the web address. It is not possible to have more than one default resource.<br />
<br />
==Deprecated settings==<br />
<br />
The following settings have been deprecated in the production version of MTA:SA and no longer work.<br />
<br />
====networkencryption====<br />
<!-- no longer present in mtaserver.conf - also seems to be deprecated in code --><br />
:''<networkencryption>1</networkencryption><br />
:This parameter specifies whether communications between the server and client is encrypted. Encryption can help prevent network data being viewed and modified.<br />
:Values: 0 - disabled , 1 - enabled ; default value: 1. Optional parameter.<br />
:This parameter can changed and saved while the server is running with [[setServerConfigSetting]]<br />
<br />
====autologin====<br />
<!-- removed from MTA:SA at https://github.com/multitheftauto/mtasa-blue/commit/e392c417da03b295c7f8342a7f6c1467d094db12#diff-b828bcbfff7135920f9a1179be3e3617 --><br />
:''<autologin>0</autologin><br />
:Specifies whether or not players should automatically be logged in based on their IP adresses.<br />
:Values: 0 - disabled , 1 - enabled ; default value: 0.<br />
<br />
[[Category: Support]]<br />
[[ru:Server mtaserver.conf]]</div>Ccwhttps://wiki.multitheftauto.com/index.php?title=Support_-_MTA_Client_and_Process_Monitor&diff=62581Support - MTA Client and Process Monitor2019-05-05T22:12:54Z<p>Ccw: </p>
<hr />
<div>__NOTOC__<br />
==Instructions for generating a process log for MTA:SA Client==<br />
<br />
<br />
===1. Download Process Monitor from here: http://technet.microsoft.com/en-us/sysinternals/bb896645 ===<br />
[[File:Client_pm_1.jpg|frame|center]]<br />
<hr/><br />
===2. Unzip ProcessMonitor.zip ===<br />
<hr/><br />
===3. Download http://nightly.mtasa.com/files/ProcmonMTAConfiguration.pmc and put it into the Process Monitor directory ===<br />
[[File:Client_pm_2.jpg|frame|center]]<br />
<hr/><br />
===4. Start Procmon.exe (if it starts with a window called 'Process Monitor Filter', press OK to close it).===<br />
===Then select the menu item ''''File'''->'''Import Configuration'''' ===<br />
(If you can't select 'Import Configuration', try running Procmon.exe as administrator)<br />
[[File:Client_pm_3.jpg|frame|center]]<br />
<hr/><br />
===5. Select the ''''ProcmonMTAConfiguration.pmc'''' file and press ''''Open'''' ===<br />
<hr/><br />
===6. Now start MTA and get to the problem ===<br />
<hr/><br />
===7. After problem has occurred, go back to the Process Monitor window and select the menu item ''''File'''->'''Save...'''' ===<br />
[[File:Client_pm_4.jpg|frame|center]]<br />
<hr/><br />
===8. Press the ''''Ok'''' button in the next window ===<br />
<hr/><br />
===9. Find the file ''''Logfile.PML'''' and upload at https://upload.mtasa.com/ ===<br />
Give the resulting file link to an MTA developer, or post it on the relevant forum topic<br><br />
(If Logfile.PML is large, you can optionally .zip or .rar it before uploading)<br />
[[File:Client_pm_5.jpg|frame|center]]</div>Ccwhttps://wiki.multitheftauto.com/index.php?title=EngineReplaceModel_notes&diff=60909EngineReplaceModel notes2018-11-25T01:56:00Z<p>Ccw: </p>
<hr />
<div>=Replacing models in the original GTA map=<br />
There are two ways to replace models in the original GTA map:<br />
<br />
==Method 1: Move camera away during replace process==<br />
<syntaxhighlight lang="lua"><br />
local modelId = 12853<br />
<br />
setCameraMatrix( 10000, 0, 0 ) -- Move camera far away<br />
<br />
col = engineLoadCOL( "garage.col" )<br />
txd = engineLoadTXD( "garage.txd" )<br />
dff = engineLoadDFF( "garage.dff", 0 )<br />
<br />
engineReplaceCOL( col, modelId )<br />
engineImportTXD( txd, modelId )<br />
engineReplaceModel( dff, modelId )<br />
<br />
setTimer( function()<br />
setCameraTarget( localPlayer ) -- Move camera back after a delay<br />
end<br />
,50,1 )<br />
</syntaxhighlight><br />
<br />
<br />
==Method 2: Create custom object and hide original==<br />
<syntaxhighlight lang="lua"><br />
local modelId = 12853<br />
local x,y,z = 661, -561, 17<br />
<br />
obj = createObject( modelId, x,y,z )<br />
removeWorldModel( modelId, 100, x,y,z ) -- Hide original<br />
<br />
col = engineLoadCOL( "garage.col" )<br />
txd = engineLoadTXD( "garage.txd" )<br />
dff = engineLoadDFF( "garage.dff", 0 )<br />
<br />
engineReplaceCOL( col, modelId )<br />
engineImportTXD( txd, modelId )<br />
engineReplaceModel( dff, modelId )<br />
</syntaxhighlight><br />
<br />
====Additonal code if model has LOD:====<br />
''(To determine the LOD model ID, use the editor resource, or refer to this [https://github.com/multitheftauto/mtasa-resources/blob/master/%5Beditor%5D/editor_main/server/mapEditorScriptingExtension_s.lua#L50 this table])''<br/><br />
If the model has a LOD version, that will need to be hidden:<br />
<syntaxhighlight lang="lua"><br />
local modelIdLOD = 13245<br />
removeWorldModel ( modelIdLOD, 100, x,y,z ) -- Hide LOD<br />
</syntaxhighlight><br />
<br />
Optionally create a MTA LOD replacement so there is no hole in the map from a distance:<br />
<syntaxhighlight lang="lua"><br />
-- This step is optional<br />
objLOD = createObject( modelIdLOD, x,y,z, 0, 0, 0, true )<br />
setLowLODElement(obj, objLOD)<br />
</syntaxhighlight><br />
<br />
And for extra points, add a custom dff for the MTA LOD replacement:<br />
<syntaxhighlight lang="lua"><br />
-- This step is optional<br />
txdLOD = engineLoadTXD( "garageLOD.txd" )<br />
dffLOD = engineLoadDFF( "garageLOD.dff", 0 )<br />
engineImportTXD( txdLOD, modelIdLOD )<br />
engineReplaceModel( dffLOD, modelIdLOD )<br />
</syntaxhighlight></div>Ccwhttps://wiki.multitheftauto.com/index.php?title=Server_mtaserver.conf&diff=59923Server mtaserver.conf2018-10-18T18:55:10Z<p>Ccw: /* lightweight_sync_interval */</p>
<hr />
<div>This page lists the settings that can be set in the settings file. ''Setting from the default '''mtaserver.conf''' settings file is in italics''.<br />
<br />
<br />
====servername====<br />
:''<servername>Default MTA Server</servername>''<br />
:This parameter specifies the name the server will be visible as in the ingame server browser and on Game-Monitor. It is a required parameter. <br />
<br />
====owner_email_address====<br />
:''<owner_email_address></owner_email_address>''<br />
:This parameter specifies the contact email addresses for the owner(s) of this server.<br />
:The email addresses will not be publicly available, and only used by MTA administrators to contact the server owner.<br />
:Note: Missing or incorrect owner_email_address can affect visibility in the master server list.<br />
:Values: Comma separated list of email addresses<br />
<br />
====serverip====<br />
:''<serverip>auto</serverip><br />
:'''ONLY USE THIS PARAMETER IF YOU ARE SURE OF WHAT YOU ARE DOING''' - it is generally only needed for professional servers and should be left at the default value otherwise.<br />
: This parameter specifies the IP to use for servers that have multiple IP addresses. If set to auto, it will automatically detect and use the server's standard local IP address.<br />
:Values: auto or x.x.x.x ; default value: auto<br />
:SERVERIP SHOULD BE LEFT SET TO auto UNLESS YOU ARE SURE OF WHAT YOU ARE DOING<br />
:WARNING: SETTING serverip AND THEN ASKING FOR SUPPORT CAN CAUSE DEATH OR INJURY<br />
<br />
====serverport====<br />
:''<serverport>22003</serverport> <br />
:This parameter specifies the UDP port on which the server will be accepting incoming player connections;<br />
:default value: 22003. It is a required parameter.<br />
<br />
====maxplayers====<br />
:''<maxplayers>32</maxplayers><br />
:This parameter specifies the number of maximum player slots available on the server;<br />
:default value: 32. It is a required parameter.<br />
<br />
====httpserver====<br />
<!-- no longer present in mtaserver.conf --><br />
:''<httpserver>1</httpserver><br />
:This parameter specifies whether the built-in http server will be used.<br />
:Values: 0 - disabled , 1 - enabled ; default value: 1. Optional parameter.<br />
:More information: [[Server_Manual#Using_the_web_interface|Using the web interface]]<br />
<br />
====httpport====<br />
:''<httpport>22005</httpport><br />
:This parameter specifies the TCP port on which the server will be accepting incoming http connections. It can be set to the same value as <serverport>. It is a required parameter if <httpserver> is set to 1.<br />
:More information: [[Server_Manual#Using_the_web_interface|Using the web interface]]<br />
<br />
====httpdownloadurl====<br />
:''<httpdownloadurl></httpdownloadurl><br />
:If set, this parameter specifies the external URL from which clients will be able to download needed resources ingame. Otherwise they will download them directly from the server.<br />
:More information: [[Server_Manual#Configuring_an_external_web_server|Configuring an external web server]]<br />
<br />
====httpmaxconnectionsperclient====<br />
:''<httpmaxconnectionsperclient>5</httpmaxconnectionsperclient><br />
:This parameter limits the number of http connections each client can make. Depending on the type of http server that is used, a lower figure may reduce download timeouts. Only relevant when using an external http server.<br />
:Available range: 1 to 8.<br />
<br />
====httpdosthreshold====<br />
:''<httpdosthreshold>20</httpdosthreshold><br />
:This parameter limits the number http connections that an IP can initiate over a short period of time.<br />
:Available range: 1 to 100. default value: 20<br />
<br />
====http_dos_exclude====<br />
:''<http_dos_exclude></http_dos_exclude><br />
:This parameter lists the IP addresses that are to be excluded from http dos threshold limits.<br />
:e.g. 88.11.22.33,101.2.3.4<br />
<br />
====allow_gta3_img_mods====<br />
:''<allow_gta3_img_mods>none</allow_gta3_img_mods><br />
:By default, the server will block the use of locally customized gta3.img player skins<br />
:This setting can be used to allow such mods. Not recommended for competitive servers.<br />
:Values: none, peds ; default value: none<br />
<br />
====client_file====<br />
:''<nowiki><!-- <client_file name="data/carmods.dat" verify="0" /> --></nowiki><br />
:By default, the server will block the use of customized GTA:SA data files.<br />
:To allow specific client files, add one or more of the above lines.<br />
:More information: [[Anti-cheat_guide|Anti-cheat guide]]<br />
<br />
====disableac====<br />
:''<disableac></disableac><br />
:Comma separated list of disabled anti-cheats.<br />
:e.g. To disable anti-cheat #2 and #3, use: 2,3<br />
:More information: [[Anti-cheat_guide|Anti-cheat guide]]<br />
<br />
====enablesd====<br />
:''<enablesd></enablesd><br />
:Comma seperated list of enabled special detections. A special detection is a type of anti-cheat for (usually) harmless game modifications. Competitive servers may wish to enable special detections, but most servers should leave this setting blank.<br />
:e.g. To enable special detection #12 (disallow custom D3D9.DLL) use: 12<br />
:More information: [[Anti-cheat_guide|Anti-cheat guide]]<br />
<br />
====minclientversion====<br />
:''<minclientversion></minclientversion><br />
:Minimum client version. Clients with a lower version will not be allowed to connect. After disconnection, clients will be given an opportunity to download an update. If left blank, this setting is disabled and there are no restrictions on who can connect. Version numbers are described in [[getPlayerVersion]] and look like this: 1.1.0-9.03100.0<br />
:This parameter can changed and saved while the server is running with [[setServerConfigSetting]]<br />
:'''Note that this setting only determines if the client should be prompted to update. The actual build number they receive will be the [[http://nightly.mtasa.com/ver highest available]].'''<br />
<br />
====minclientversion_auto_update====<br />
:''<minclientversion_auto_update>1</minclientversion_auto_update><br />
:This parameter specifies if/when the <minclientversion> setting is automatically updated.<br />
:Keeping <minclientversion> updated can help reduce cheating.<br />
:Note: The instant setting (2) is only recommended for competitive servers.<br />
:Values: 0 - disabled, 1 - enabled (delayed by a few days), 2 - enabled (instant) ; default value: 1.<br />
<br />
====recommendedclientversion====<br />
:''<recommendedclientversion></recommendedclientversion><br />
:Recommended client version. When connecting, if clients have a lower version, they will be given the option to download an update. If left blank, this setting is disabled.<br />
:This parameter can changed and saved while the server is running with [[setServerConfigSetting]]<br />
:'''Note that this setting only determines if the client should be prompted to update. The actual build number they receive will be the [[http://nightly.mtasa.com/ver highest available]].'''<br />
<br />
====ase====<br />
:''<ase>1</ase><br />
:This parameter can be used to make the server report to Game-Monitor master servers, allowing it to be visible in the in-game server browser. An additional UDP port needs to be available for this to work (value from <serverport> + 123 , so on a default <serverport> value 22003 the right port will be 22126 ).<br />
:Available values: 0 - disabled , 1 - enabled. Optional parameter, defaults to 0.<br />
<br />
====donotbroadcastlan====<br />
:''<donotbroadcastlan>0</donotbroadcastlan><br />
:This parameter allows you to disable LAN broadcasting. <br />
<br />
====password====<br />
:''<password></password> <br />
:If set, players will have to provide a password specified below, before they can connect to the server. If left blank, server doesn't require a password from them.<br />
:This parameter can changed and saved while the server is running with [[setServerPassword]] or [[setServerConfigSetting]]<br />
<br />
====bandwidth_reduction====<br />
:''<bandwidth_reduction>medium</bandwidth_reduction> <br />
:This parameter reduces the server's bandwidth usage by using various optimizations.<br />
:Values: none, medium or maximum ; default value: medium<br />
:This parameter can be changed and saved while the server is running with [[setServerConfigSetting]]<br />
<br />
====unoccupied_vehicle_syncer_distance====<br />
<!-- no longer present in mtaserver.conf --><br />
:''<unoccupied_vehicle_syncer_distance>130</unoccupied_vehicle_syncer_distance><br />
:This parameter determines the distance limit for remote synced unoccupied vehicles<br />
:Available range: 50 - 400; default value: 130<br />
:This parameter can be changed and saved while the server is running with [[setServerConfigSetting]]<br />
<br />
====ped_syncer_distance====<br />
<!-- no longer present in mtaserver.conf --><br />
:''<ped_syncer_distance>100</ped_syncer_distance><br />
:This parameter determines the distance limit for remote synced peds<br />
:Available range: 50 - 400; default value: 100<br />
:This parameter can be changed and saved while the server is running with [[setServerConfigSetting]]<br />
<br />
====player_sync_interval====<br />
:''<player_sync_interval>100</player_sync_interval> <br />
:This parameter determines the time in milliseconds between player sync packets.<br />
:Available range: 50 - 500; default value: 100<br />
:This parameter can be changed and saved while the server is running with [[setServerConfigSetting]]<br />
:Suggested values for this and the other sync_interval settings can be found here: [[Sync_interval_settings|Sync interval settings]]<br />
<br />
====lightweight_sync_interval====<br />
:''<lightweight_sync_interval>1500</lightweight_sync_interval> <br />
:This parameter determines the time in milliseconds between lightweight (player) sync packets.<br />
:Available range: 200 - 4000; default value: 1500<br />
:This parameter can be changed and saved while the server is running with [[setServerConfigSetting]]<br />
:Suggested values for this and the other sync_interval settings can be found here: [[Sync_interval_settings|Sync interval settings]]<br />
<br />
====camera_sync_interval====<br />
:''<camera_sync_interval>500</camera_sync_interval> <br />
:This parameter determines the time in milliseconds between camera sync packets.<br />
:Available range: 200 - 400; default value: 500<br />
:This parameter can be changed and saved while the server is running with [[setServerConfigSetting]]<br />
:Suggested values for this and the other sync_interval settings can be found here: [[Sync_interval_settings|Sync interval settings]]<br />
<br />
====ped_sync_interval====<br />
:''<ped_sync_interval>400</ped_sync_interval> <br />
:This parameter determines the time in milliseconds between ped sync packets.<br />
:Available range: 200 - 4000; default value: 400<br />
:This parameter can be changed and saved while the server is running with [[setServerConfigSetting]]<br />
:Suggested values for this and the other sync_interval settings can be found here: [[Sync_interval_settings|Sync interval settings]]<br />
<br />
====unoccupied_vehicle_sync_interval====<br />
:''<unoccupied_vehicle_sync_interval>1000</unoccupied_vehicle_sync_interval> <br />
:This parameter determines the time in milliseconds between unoccupied vehicle sync packets.<br />
:Available range: 200 - 4000; default value: 1000<br />
:This parameter can be changed and saved while the server is running with [[setServerConfigSetting]]<br />
:Suggested values for this and the other sync_interval settings can be found here: [[Sync_interval_settings|Sync interval settings]]<br />
<br />
====keysync_mouse_sync_interval====<br />
:''<keysync_mouse_sync_interval>100</keysync_mouse_sync_interval> <br />
:This parameter determines the minimum time in milliseconds between key sync packets due to mouse movement.<br />
:Available range: 50 - 500; default value: 100<br />
:This parameter can be changed and saved while the server is running with [[setServerConfigSetting]]<br />
:Suggested values for this and the other sync_interval settings can be found here: [[Sync_interval_settings|Sync interval settings]]<br />
<br />
====keysync_analog_sync_interval====<br />
:''<keysync_analog_sync_interval>100</keysync_analog_sync_interval> <br />
:This parameter determines the minimum time in milliseconds between key sync packets due to joystick movement.<br />
:Available range: 50 - 500; default value: 100<br />
:This parameter can be changed and saved while the server is running with [[setServerConfigSetting]]<br />
:Suggested values for this and the other sync_interval settings can be found here: [[Sync_interval_settings|Sync interval settings]]<br />
<br />
====bullet_sync====<br />
:''<bullet_sync>1</bullet_sync> <br />
:This parameter can improve the reliability of shots when using certain weapons. However, it uses more bandwidth.<br />
:Note that bullet sync will be active regardless of this setting when certain [[setGlitchEnabled|glitches]] are enabled.<br />
:Values: 0 - disabled , 1 - enabled ; default value: 1.<br />
:This parameter can be changed and saved while the server is running with [[setServerConfigSetting]]<br />
<br />
====vehext_percent====<br />
:''<vehext_percent>0</vehext_percent><br />
:This parameter sets the amount of extrapolation that clients will apply to remote vehicles. <br />
:This can reduce some of the latency induced location disparency by predicting where the remote vehicles will probably be.<br />
:Depending on the gamemode, an incorrect prediction may have a negative effect. <br />
:Therefore this setting should be considered experimental.<br />
:Available range: 0 to 100. Default - 0<br />
<br />
====vehext_ping_limit====<br />
:''<vehext_ping_limit>150</vehext_ping_limit><br />
:This parameter places a limit on how much time (in milliseconds) the vehicle extrapolation will attempt to compensate for.<br />
:Only relevant if <vehext_percent> is greater than zero.<br />
:Available range: 50 to 500. Default - 150<br />
<br />
====latency_reduction====<br />
:''<latency_reduction>0</latency_reduction><br />
:This parameter can reduce the delay of player actions appearing on remote clients by 2 frames (approx 50ms).<br />
:Due to the impact this may have on shot lag compensation, it should be considered experimental.<br />
:Values: 0 - disabled , 1 - enabled ; default value: 0.<br />
:Bugs caused by enabling latency_reduction: http://bugs.mtasa.com/view.php?id=8191 + http://bugs.mtasa.com/view.php?id=8226<br />
<br />
====threadnet====<br />
<!-- no longer present in mtaserver.conf --><br />
:''<threadnet>1</threadnet><br />
:This parameter specifies whether or not to run the network synchronization on another thread.<br />
:Enabling will make the sync smoother, but may increase CPU usage slightly.<br />
:Values: 0 - disabled , 1 - enabled ; default value: 1.<br />
:This parameter can be changed and saved while the server is running with [[setServerConfigSetting]]<br />
<br />
====idfile====<br />
:''<idfile>server-id.keys</idfile> <br />
:Specifies the location and file name of this servers unique private key. This is used to prevent private files saved on the client from being read by other servers. <br />
:Keep a backup of this file in a safe place. Default value: server-id.keys<br />
:More information about client private files: [[Filepath]]<br />
<br />
====logfile====<br />
:''<logfile>logs/server.log</logfile><br />
:Specifies the location and name of the main server log file. If left blank, server won't be saving this file.<br />
<br />
====authfile====<br />
:''<authfile>logs/server_auth.log</authfile><br />
:As well as the main log file, login successes and failures are logged here for easy reviewing of security issues. If left blank, this file is not used<br />
<br />
====dbfile====<br />
:''<dbfile>logs/db.log</dbfile><br />
:Specifies the location and name of the file used to log database queries. The server command [[Server_Commands#debugdb|debugdb]] sets the amount of logging.<br />
<br />
====loadstringfile====<br />
:''<nowiki><!-- <loadstringfile>logs/loadstring.log</loadstringfile> --></nowiki><br />
:Specifies the location and name of the file used to log loadstring function calls. If left blank or not set, no logging is done.<br />
<br />
====acl====<br />
:''<acl>acl.xml</acl> <br />
:This parameter specifies the location and name of the Access Control List settings file. If left<br />
:blank, server will use acl.xml file, located in the same folder as this configuration file.<br />
<br />
====scriptdebuglogfile====<br />
:''<scriptdebuglogfile>logs/scripts.log</scriptdebuglogfile> <br />
:Specifies the location and name of the debugscript log file. If left blank, server won't be saving this file.<br />
<br />
====scriptdebugloglevel====<br />
:''<scriptdebugloglevel>0</scriptdebugloglevel><br />
:Specifies the level of the debugscript log file. Available values: 0, 1, 2, 3. When not set, defaults to 0.<br />
<br />
====htmldebuglevel====<br />
:''<htmldebuglevel>0</htmldebuglevel><br />
:Specifies the level of the html debug. Available values: 0, 1, 2, 3. When not set, defaults to 0.<br />
<br />
====filter_duplicate_log_lines====<br />
:''<filter_duplicate_log_lines>1</filter_duplicate_log_lines><br />
:Specifies whether or not duplicate log lines should be filtered. Available values: 0 or 1, defaults to 1.<br />
<br />
====fpslimit====<br />
:''<fpslimit>36</fpslimit><br />
:Specifies the frame rate limit that will be applied to connecting clients.<br />
:Available range: 25 to 100. Default: 36.<br />
:When running the map editor locally (i.e. from the client), the default FPS limit is 50.<br />
:This parameter can be changed and saved while the server is running with [[setServerConfigSetting]]<br />
<br />
====voice====<br />
:''<voice>0</voice><br />
:This parameter specifies whether or not to enable player voice chat in-game<br />
:Values: 0 - disabled , 1 - enabled<br />
<br />
====voice_samplerate====<br />
:''<voice_samplerate>1</voice_samplerate><br />
:This parameter specifies the sample rate for voice chat. 'voice' parameter must be set to 1 for this to be effective. Higher settings use more bandwidth and increase the sampling quality of voice chat<br />
:Values: 0 - Narrowband (8kHz), 1 - Wideband (16kHz), 2 - Ultrawideband (32kHz). Default - 1<br />
<br />
====voice_quality====<br />
:''<voice_quality>4</voice_quality><br />
:This parameter specifies the voice quality for voice chat. 'voice' parameter must be set to 1 for this to be effective. Higher settings use more bandwidth and increase the the overall quality of voice chat<br />
:Available range: 0 to 10. Default - 4<br />
<br />
====voice_bitrate====<br />
:''<nowiki><!-- <voice_bitrate>24600</voice_bitrate> --></nowiki><br />
:Specifies the voice bitrate, in bps. This optional parameter overrides the previous two settings. If not set, MTA handles this automatically. Use with care.<br />
<br />
====backup_path====<br />
:''<backup_path>backups</backup_path><br />
:This parameter specifies the path to use for a basic backup of some server files. Note that basic backups are only made during server startup. Default value: backups<br />
<br />
====backup_interval====<br />
:''<backup_interval>3</backup_interval><br />
:This parameter specifies the number of days between each basic backup. Backups are only made during server startup, so the actual interval maybe much longer. Setting backup_interval to 0 will disable backups<br />
:Available range: 0 to 30. Default - 3<br />
<br />
====backup_copies====<br />
:''<backup_copies>10</backup_copies><br />
:This parameter specifies the maximum number of backup copies to keep. Setting backup_copies to 0 will disable backups<br />
:Available range: 0 to 100. Default - 10<br />
<br />
====compact_internal_databases====<br />
:''<compact_internal_databases>1</compact_internal_databases><br />
:This parameter specifies when the internal sqlite databases should be defragmented.<br />
:For more info see: http://www.sqlite.org/lang_vacuum.html<br />
:Values: 0 - Never, 1 - On server start only after basic backup, 2 - On server start always. Default - 1<br />
<br />
====crash_dump_upload====<br />
:''<crash_dump_upload>1</crash_dump_upload><br />
:This parameter specifies whether server crash dump files should be sent to MTA HQ.<br />
:Values: 0 - Off, 1 - On. Default - 1<br />
<br />
====fakelag====<br />
<!-- no longer present in mtaserver.conf --><br />
:''<fakelag>0</fakelag><br />
:This parameter specifies whether the [[Command fakelag|fakelag and sfakelag]] commands are enabled<br />
:Values: 0 - Off, 1 - On. Default - 0<br />
<br />
====auth_serial_groups====<br />
:''<auth_serial_groups>Admin</auth_serial_groups><br />
:This parameter lists the ACL groups that are protected by serial authorization.<br />
:Login attempts to a protected account from a second serial are blocked until the serial is manually authorized via the authserial command.<br />
:For more info see: https://mtasa.com/authserial<br />
:Note: This is security critical feature and disabling auth_serial_groups can affect visibility in the master server list.<br />
:Values: Comma separated list of ACL groups. Default - Admin<br />
<br />
====auth_serial_http====<br />
:''<auth_serial_http>1</auth_serial_http><br />
:This parameter specifies if the authorized serial login checks should also apply to the http interface.<br />
:Protected account login attempts to the http interface will only succeed if the IP address matches one recently used by the account holder in-game.<br />
:For more info see: https://mtasa.com/authserialhttp<br />
:Note: This is security critical feature and disabling auth_serial_http can affect visibility in the master server list.<br />
:Values: 0 - Off, 1 - Enabled. Default - 1<br />
<br />
====auth_serial_http_ip_exceptions====<br />
:''<auth_serial_http_ip_exceptions>127.0.0.1</auth_serial_http_ip_exceptions><br />
:This parameter specifies which IP addresses should always pass auth_serial_http checks.<br />
:Values: Comma separated list of IP addresses<br />
<br />
====database_credentials_protection====<br />
:''<database_credentials_protection>1</database_credentials_protection><br />
:This parameter specifies if extra security measures are applied to resources which use [[dbConnect]] with MySQL.<br />
:The extra measures are:<br />
: - script files cannot be accessed with [[fileOpen]]<br />
: - [[meta.xml]] is read-only<br />
:'''NOTE:''' This only protects resources which use [[dbConnect]] with MySQL.<br />
:Values: 0 - Off, 1 - Enabled. Default - 1<br />
<br />
====module====<br />
:''<nowiki><!-- <module src="sample_win32.dll" /> --></nowiki><br />
:''<nowiki><!-- <module src="sample_linux.so" /> --></nowiki><br />
:Specifies the module(s) which are loaded with the server. To load several modules, add more <module> parameter(s). Optional parameter.<br />
<br />
====resource====<br />
:''<resource src="admin" startup="1" protected="0" /><br />
:''<resource src="defaultstats" startup="1" protected="0" /><br />
:''<resource src="helpmanager" startup="1" protected="0" /><br />
:''<resource src="joinquit" startup="1" protected="0" /><br />
:''<resource src="mapcycler" startup="1" protected="0" /><br />
:''<resource src="mapmanager" startup="1" protected="0" /><br />
:''<resource src="parachute" startup="1" protected="0" /><br />
:''<resource src="resourcebrowser" startup="1" protected="1" default="true" /><br />
:''<resource src="resourcemanager" startup="1" protected="1" /><br />
:''<resource src="scoreboard" startup="1" protected="0" /><br />
:''<resource src="spawnmanager" startup="1" protected="0" /><br />
:''<resource src="voice" startup="1" protected="0" /><br />
:''<resource src="votemanager" startup="1" protected="0" /><br />
:''<resource src="webadmin" startup="1" protected="0" /><br />
:''<resource src="play" startup="1" protected="0" /><br />
<br />
:Specifies persistent resources which are loaded when the server starts. Persistent resources are not stopped even if all the other resources that depend on them stop; that is, the only way to stop them is by explicitly using the ''stop'' server command or [[stopResource]] scripting function. To load several resources, add more <resource> parameters.<br />
<br />
:In addition, there are several flags which control how the server deals with each resource:<br />
<br />
:* '''src''': the resource name. This is the only mandatory flag.<br />
:* '''startup''': controls whether the resource will be started with the server or not. If "1", "true" or "yes", the resource will be started. If not specified, defaults to not starting the resource.<br />
:* '''protected''': if "1", "true" or "yes", the resource will not be able to be stopped when started. Otherwise, even if not specified, it will default to the normal behaviour.<br />
:* '''default''': if given a "1", "true" or "yes" value, this resource will be the one who populates the built-in HTTP server main page, which is seen when no resource is given in the web address. It is not possible to have more than one default resource.<br />
<br />
==Deprecated settings==<br />
<br />
The following settings have been deprecated in the production version of MTA:SA and no longer work.<br />
<br />
====networkencryption====<br />
<!-- no longer present in mtaserver.conf - also seems to be deprecated in code --><br />
:''<networkencryption>1</networkencryption><br />
:This parameter specifies whether communications between the server and client is encrypted. Encryption can help prevent network data being viewed and modified.<br />
:Values: 0 - disabled , 1 - enabled ; default value: 1. Optional parameter.<br />
:This parameter can changed and saved while the server is running with [[setServerConfigSetting]]<br />
<br />
====autologin====<br />
<!-- removed from MTA:SA at https://github.com/multitheftauto/mtasa-blue/commit/e392c417da03b295c7f8342a7f6c1467d094db12#diff-b828bcbfff7135920f9a1179be3e3617 --><br />
:''<autologin>0</autologin><br />
:Specifies whether or not players should automatically be logged in based on their IP adresses.<br />
:Values: 0 - disabled , 1 - enabled ; default value: 0.<br />
<br />
[[Category: Support]]<br />
[[ru:Server mtaserver.conf]]</div>Ccwhttps://wiki.multitheftauto.com/index.php?title=EngineReplaceModel&diff=58516EngineReplaceModel2018-08-22T23:16:48Z<p>Ccw: </p>
<hr />
<div>__NOTOC__ <br />
{{Client function}}<br />
<br />
{{Note box|Please note the loading order that is used in the examples as other orders can cause collisions, textures or the DFF not to load due to technical limitations}}<br />
<br />
This function replaces the given model ID with the model contained in a DFF file loaded by [[engineLoadDFF]]. {{New items|3.0111|1.1.1|This function supports [[vehicle|vehicles]], [[object|objects]], [[ped|peds]] and [[player|players]].}}<br />
<br />
{{Deprecated feature|3.0111|1.1.1|This function does not support ped and weapon models.}}<br />
<br />
To replace weapon models you must use their object IDs, not weapon IDs. There is a weapon model list available at [[weapons]].<br />
{{Note|<br />
* Default GTA map objects behave inconsistently when using this function on them. If you want to replace models in the original GTA map, use one of the [[EngineReplaceModel notes|methods shown here]].}}<br />
<br />
==Syntax== <br />
<syntaxhighlight lang="lua"><br />
bool engineReplaceModel ( dff theModel, int modelID [, bool alphaTransparency = false ] )<br />
</syntaxhighlight> <br />
{{OOP||[[DFF|dff]]:replace}}<br />
===Required Arguments=== <br />
*'''theModel:''' The model to replace the given model ID with<br />
*'''modelID:''' The model it to replace the model of<br />
<br />
===Optional Arguments=== <br />
*'''alphaTransparency:''' Set to true if model uses semi-transparent textures, e.g. windows. This will ensure other objects behind the semi-transparent textures are rendered correctly. (Can slightly impact performance, so only set when required)<br />
<br />
===Returns===<br />
Returns ''true'' if the model was successfully replaced, ''false'' if it failed for some reason, ie. the DFF or the model ID is not valid.<br />
<br />
==Example== <br />
'''Example 1:'''<br />
<section name="Client" class="client" show="true"><br />
Client-side example for replacing vehicle model and texture with custom ones.<br />
<syntaxhighlight lang="lua"><br />
function ReplaceVehicle ( )<br />
outputChatBox ( "> replacing the euros vehicle" )<br />
<br />
txd = engineLoadTXD ( "data/euros.txd" )<br />
engineImportTXD ( txd, 587 )<br />
dff = engineLoadDFF ( "data/euros.dff" )<br />
engineReplaceModel ( dff, 587 )<br />
end<br />
<br />
addEvent ( "replaceVeh", true )<br />
addEventHandler ( "replaceVeh", root, ReplaceVehicle )<br />
</syntaxhighlight><br />
</section><br />
<section name="Server" class="server" show="true"><br />
Server-side example function for triggering the replace.<br />
<syntaxhighlight lang="lua"><br />
function ReplaceCommand ( )<br />
triggerClientEvent( "replaceVeh", root, replaceVeh )<br />
end<br />
addCommandHandler( "replace", ReplaceCommand )<br />
</syntaxhighlight><br />
</section><br />
<br />
'''Example 2:'''<br />
<section name="Client" class="client" show="true"><br />
Client-side example for replacing weapons with custom mods.<br />
<syntaxhighlight lang="lua"><br />
function replaceWeapon() <br />
txd = engineLoadTXD ( "m4.txd" )<br />
engineImportTXD ( txd, 356)<br />
dff = engineLoadDFF ( "m4.dff", 356) -- use weapon model ID, not weapon ID (model ID from https://wiki.multitheftauto.com/wiki/Weapons)<br />
engineReplaceModel ( dff, 356) -- Likewise, model ID, for M4 as example it's 356<br />
<br />
end<br />
addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), replaceWeapon)<br />
</syntaxhighlight><br />
</section><br />
<br />
'''Example 3:'''<br />
<section name="Client" class="client" show="true"><br />
Client-Side example for replacing object collision, texture and model with custom ones.<br />
<syntaxhighlight lang="lua"><br />
function ReplaceObject ( )<br />
<br />
col = engineLoadCOL( "MyModel.col" )<br />
txd = engineLoadTXD( "MyModel.txd" )<br />
dff = engineLoadDFF( "MyModel.dff", 0 )<br />
<br />
engineReplaceCOL( col, 1234 )<br />
engineImportTXD( txd, 1234 )<br />
engineReplaceModel( dff, 1234 )-- replace the model at least<br />
<br />
end<br />
<br />
addEvent ( "replaceObj", true )<br />
addEventHandler ( "replaceObj", root, ReplaceObject )<br />
</syntaxhighlight><br />
</section><br />
<section name="Server" class="server" show="true"><br />
Server-side example function for triggering the replace.<br />
<syntaxhighlight lang="lua"><br />
function ReplaceCommand ( )<br />
triggerClientEvent( "replaceObj", root, replaceObj )<br />
end<br />
addCommandHandler( "replace", ReplaceCommand )<br />
</syntaxhighlight><br />
</section><br />
<br />
==See Also==<br />
{{Engine_functions}}</div>Ccwhttps://wiki.multitheftauto.com/index.php?title=EngineReplaceModel&diff=58495EngineReplaceModel2018-08-21T18:54:40Z<p>Ccw: </p>
<hr />
<div>__NOTOC__ <br />
{{Client function}}<br />
<br />
{{Note box|Please note the loading order that is used in the examples as other orders can cause collisions, textures or the DFF not to load due to technical limitations}}<br />
<br />
This function replaces the given model ID with the model contained in a DFF file loaded by [[engineLoadDFF]]. {{New items|3.0111|1.1.1|This function supports [[vehicle|vehicles]], [[object|objects]], [[ped|peds]] and [[player|players]].}}<br />
<br />
{{Deprecated feature|3.0111|1.1.1|This function does not support ped and weapon models.}}<br />
<br />
To replace weapon models you must use their object IDs, not weapon IDs. There is a weapon model list available at [[weapons]].<br />
{{Note|<br />
* Default GTA map objects behave inconsistently when using this function on them. If you want to replace models in the original GTA map, use one of the [[EngineReplaceModel notes|methods shown here]].}}<br />
<br />
==Syntax== <br />
<syntaxhighlight lang="lua"><br />
bool engineReplaceModel ( dff theModel, int modelID [, bool alphaTransparency = false ] )<br />
</syntaxhighlight> <br />
{{OOP||[[DFF|dff]]:replace}}<br />
===Required Arguments=== <br />
*'''theModel:''' The model to replace the given model ID with<br />
*'''modelID:''' The model it to replace the model of<br />
<br />
===Optional Arguments=== <br />
*'''alphaTransparency:''' Set to true if model uses semi-transparent textures. e.g. Windows<br />
<br />
===Returns===<br />
Returns ''true'' if the model was successfully replaced, ''false'' if it failed for some reason, ie. the DFF or the model ID is not valid.<br />
<br />
==Example== <br />
'''Example 1:'''<br />
<section name="Client" class="client" show="true"><br />
Client-side example for replacing vehicle model and texture with custom ones.<br />
<syntaxhighlight lang="lua"><br />
function ReplaceVehicle ( )<br />
outputChatBox ( "> replacing the euros vehicle" )<br />
<br />
txd = engineLoadTXD ( "data/euros.txd" )<br />
engineImportTXD ( txd, 587 )<br />
dff = engineLoadDFF ( "data/euros.dff" )<br />
engineReplaceModel ( dff, 587 )<br />
end<br />
<br />
addEvent ( "replaceVeh", true )<br />
addEventHandler ( "replaceVeh", root, ReplaceVehicle )<br />
</syntaxhighlight><br />
</section><br />
<section name="Server" class="server" show="true"><br />
Server-side example function for triggering the replace.<br />
<syntaxhighlight lang="lua"><br />
function ReplaceCommand ( )<br />
triggerClientEvent( "replaceVeh", root, replaceVeh )<br />
end<br />
addCommandHandler( "replace", ReplaceCommand )<br />
</syntaxhighlight><br />
</section><br />
<br />
'''Example 2:'''<br />
<section name="Client" class="client" show="true"><br />
Client-side example for replacing weapons with custom mods.<br />
<syntaxhighlight lang="lua"><br />
function replaceWeapon() <br />
txd = engineLoadTXD ( "m4.txd" )<br />
engineImportTXD ( txd, 356)<br />
dff = engineLoadDFF ( "m4.dff", 356) -- use weapon model ID, not weapon ID (model ID from https://wiki.multitheftauto.com/wiki/Weapons)<br />
engineReplaceModel ( dff, 356) -- Likewise, model ID, for M4 as example it's 356<br />
<br />
end<br />
addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), replaceWeapon)<br />
</syntaxhighlight><br />
</section><br />
<br />
'''Example 3:'''<br />
<section name="Client" class="client" show="true"><br />
Client-Side example for replacing object collision, texture and model with custom ones.<br />
<syntaxhighlight lang="lua"><br />
function ReplaceObject ( )<br />
<br />
col = engineLoadCOL( "MyModel.col" )<br />
txd = engineLoadTXD( "MyModel.txd" )<br />
dff = engineLoadDFF( "MyModel.dff", 0 )<br />
<br />
engineReplaceCOL( col, 1234 )<br />
engineImportTXD( txd, 1234 )<br />
engineReplaceModel( dff, 1234 )-- replace the model at least<br />
<br />
end<br />
<br />
addEvent ( "replaceObj", true )<br />
addEventHandler ( "replaceObj", root, ReplaceObject )<br />
</syntaxhighlight><br />
</section><br />
<section name="Server" class="server" show="true"><br />
Server-side example function for triggering the replace.<br />
<syntaxhighlight lang="lua"><br />
function ReplaceCommand ( )<br />
triggerClientEvent( "replaceObj", root, replaceObj )<br />
end<br />
addCommandHandler( "replace", ReplaceCommand )<br />
</syntaxhighlight><br />
</section><br />
<br />
==See Also==<br />
{{Engine_functions}}</div>Ccwhttps://wiki.multitheftauto.com/index.php?title=GetElementsWithinColShape&diff=57122GetElementsWithinColShape2018-07-29T05:42:30Z<p>Ccw: </p>
<hr />
<div>{{Server client function}}<br />
__NOTOC__<br />
This function is used to retrieve a list of all elements in a colshape, of the specified type.<br />
{{Note|<br />
* For legacy reasons, a colshape created on the client does not collide with elements already existing at that location until they first move<br />
* This function doesn't verify whether elements are in the same dimension and interior, additional checks could be implemented manually if they are needed<br />
}}<br />
==Syntax== <br />
<syntaxhighlight lang="lua"><br />
table getElementsWithinColShape ( colshape theShape [, string elemType = nil ] ) <br />
</syntaxhighlight> <br />
{{OOP| |[[colshape]]:getElementsWithin|elementsWithin|}}<br />
===Required Arguments=== <br />
*'''theShape:''' The colshape you want to get the elements from.<br />
<br />
===Optional Arguments=== <br />
*'''elemType:''' The type of element you want a list of. This can be any element type, the common ones being:<br />
**'''"player":''' A player connected to the server<br />
**'''"ped":''' A ped<br />
**'''"vehicle":''' A vehicle<br />
**'''"object":''' An object<br />
**'''"pickup":''' A pickup<br />
**'''"marker":''' A marker<br />
<!--**'''"spawnpoint":''' A spawnpoint<br />
**'''"remoteclient":''' A remote client connected to the server<br />
**'''"console":''' The server Console--><br />
<br />
===Returns===<br />
Returns a [[table]] containing all the elements inside the colshape, of the specified type. Returns an empty [[table]] if there are no elements inside. Returns ''false'' if the colshape is invalid.<br />
<br />
==Example== <br />
This example retrieves a [[table]] of players inside a colshape and prints their name to the chat.<br />
<syntaxhighlight lang="lua"><br />
local newColShape = createColSphere( 1, 2, 3, 4 ) -- create our new colshape<br />
local players = getElementsWithinColShape( newColShape, "player" ) -- get all the players inside the sphere<br />
for _, thePlayer in ipairs( players ) do -- use a generic for loop to step through each player<br />
outputChatBox( getPlayerName( thePlayer ) .. " is in our new sphere" ) -- print their name to the chat<br />
end<br />
</syntaxhighlight><br />
<br />
==Changelog==<br />
{{ChangelogHeader}}<br />
{{ChangelogItem|1.5.5-3.12286|Added elementsWithin OOP variable}}<br />
<br />
==See Also==<br />
{{Element_functions}}</div>Ccwhttps://wiki.multitheftauto.com/index.php?title=GetElementsWithinColShape&diff=57121GetElementsWithinColShape2018-07-29T05:40:07Z<p>Ccw: </p>
<hr />
<div>{{Server client function}}<br />
__NOTOC__<br />
This function is used to retrieve a list of all elements in a colshape, of the specified type. Please note that for legacy reasons, a colshape created on the client does not collide with elements already existing at that location until they first move.<br />
<br />
Please note that this function doesn't verify whether elements are in the same dimension and interior, additional checks could be implemented manually if they are needed. <br />
<br />
==Syntax== <br />
<syntaxhighlight lang="lua"><br />
table getElementsWithinColShape ( colshape theShape [, string elemType = nil ] ) <br />
</syntaxhighlight> <br />
{{OOP| |[[colshape]]:getElementsWithin|elementsWithin|}}<br />
===Required Arguments=== <br />
*'''theShape:''' The colshape you want to get the elements from.<br />
<br />
===Optional Arguments=== <br />
*'''elemType:''' The type of element you want a list of. This can be any element type, the common ones being:<br />
**'''"player":''' A player connected to the server<br />
**'''"ped":''' A ped<br />
**'''"vehicle":''' A vehicle<br />
**'''"object":''' An object<br />
**'''"pickup":''' A pickup<br />
**'''"marker":''' A marker<br />
<!--**'''"spawnpoint":''' A spawnpoint<br />
**'''"remoteclient":''' A remote client connected to the server<br />
**'''"console":''' The server Console--><br />
<br />
===Returns===<br />
Returns a [[table]] containing all the elements inside the colshape, of the specified type. Returns an empty [[table]] if there are no elements inside. Returns ''false'' if the colshape is invalid.<br />
<br />
==Example== <br />
This example retrieves a [[table]] of players inside a colshape and prints their name to the chat.<br />
<syntaxhighlight lang="lua"><br />
local newColShape = createColSphere( 1, 2, 3, 4 ) -- create our new colshape<br />
local players = getElementsWithinColShape( newColShape, "player" ) -- get all the players inside the sphere<br />
for _, thePlayer in ipairs( players ) do -- use a generic for loop to step through each player<br />
outputChatBox( getPlayerName( thePlayer ) .. " is in our new sphere" ) -- print their name to the chat<br />
end<br />
</syntaxhighlight><br />
<br />
==Changelog==<br />
{{ChangelogHeader}}<br />
{{ChangelogItem|1.5.5-3.12286|Added elementsWithin OOP variable}}<br />
<br />
==See Also==<br />
{{Element_functions}}</div>Ccwhttps://wiki.multitheftauto.com/index.php?title=Anti-cheat_guide&diff=55320Anti-cheat guide2018-06-15T06:40:57Z<p>Ccw: </p>
<hr />
<div>=Server setup=<br />
<br />
Several settings in [[Server_mtaserver.conf|'''mtaserver.conf''']] control AC behaviour for a server:<br />
<br />
==<disableac></disableac>==<br />
Comma separated list of disabled anti-cheats. This setting disables specific AC codes. If a detection is triggered and it's not disabled by the server, a player will get kicked and be shown the AC code corresponding to that detection.<br />
<br />
Please note that this will only void the AC # kick for using GTA singleplayer cheats and some very basic, outdated and patched MP cheats (such as s0beit). Hacks & cheats designed for MTA may trigger a Global ban.<br />
If you try to use a typical MTA cheat under the belief using disableAC will save your day, and get banned for a while, it's your own fault, regardless of this setting being used to disable any of the AC classifications that it may fall under.<br />
<br />
Available codes are:<br />
<br />
{| border="0" cellpadding="1" cellspacing="2"<br />
|-<br />
! scope="col" style="background:#d0d0d0;"| Code for <disableac><br />
! scope="col" style="background:#d0d0d0;"| Displayed on detect<br />
! scope="col" style="background:#d0d0d0;"| Required server version<br />
! scope="col" style="background:#d0d0d0;"| Required <minclientversion> <br />
! scope="col" style="background:#d0d0d0;"| Notes<br />
|-<br />
| scope="row" style="background:#e0e0e0;" align="center"|'''1'''<br />
| style="background:#f0f0f0;" align="center"|AC #1<br />
| style="background:#f0f0f0;" align="center"|any<br />
| style="background:#f0f0f0;"|<br />
| style="background:#f0f0f0;"| Classic health/armour hack detector<br />
|-<br />
| scope="row" style="background:#e0e0e0;" align="center"|'''2'''<br />
| style="background:#f0f0f0;" align="center"|AC #2<br />
| style="background:#f0f0f0;" align="center"|any<br />
| style="background:#f0f0f0;"|<br />
| style="background:#f0f0f0;"| Corrupted dll files<br />
|-<br />
| scope="row" style="background:#e0e0e0;" align="center"|'''4'''<br />
| style="background:#f0f0f0;" align="center"|AC #4<br />
| style="background:#f0f0f0;" align="center"|any<br />
| style="background:#f0f0f0;"|<br />
| style="background:#f0f0f0;"| Detects presence of trainer. Capital letters in the message are for tagging particular trainers<br />
|-<br />
| scope="row" style="background:#e0e0e0;" align="center"|'''5'''<br />
| style="background:#f0f0f0;" align="center"|AC #5<br />
| style="background:#f0f0f0;" align="center"|any<br />
| style="background:#f0f0f0;"|<br />
| style="background:#f0f0f0;"| Detects use of trainer. <br />
|-<br />
| scope="row" style="background:#e0e0e0;" align="center"|'''6'''<br />
| style="background:#f0f0f0;" align="center"|VF #6<br />
| style="background:#f0f0f0;" align="center"|any<br />
| style="background:#f0f0f0;"|<br />
| style="background:#f0f0f0;"| Detects use of trainer incl.: player movement, health/damage, weapons, money, gamespeed, game cheats, aimbot <br />
|-<br />
| scope="row" style="background:#e0e0e0;" align="center"|'''7'''<br />
| style="background:#f0f0f0;" align="center"|VF #7<br />
| style="background:#f0f0f0;" align="center"|any<br />
| style="background:#f0f0f0;"|<br />
| style="background:#f0f0f0;"| Detects use of trainer. <br />
|-<br />
| scope="row" style="background:#e0e0e0;" align="center"|'''8'''<br />
| style="background:#f0f0f0;" align="center"|VF #8<br />
| style="background:#f0f0f0;" align="center"|any<br />
| style="background:#f0f0f0;"|<br />
| style="background:#f0f0f0;"| Detects unauthorized mods<br />
|-<br />
| scope="row" style="background:#e0e0e0;" align="center" rowspan="2"|'''11'''<br />
| style="background:#f0f0f0;" align="center"|AC #11<br />
| style="background:#f0f0f0;" align="center"|any<br />
| style="background:#f0f0f0;"|<br />
| style="background:#f0f0f0;"| More trainers<br />
|-<br />
| style="background:#f0f0f0;" align="center"|VF #11<br />
| style="background:#f0f0f0;" align="center"|any<br />
| style="background:#f0f0f0;"|<br />
| style="background:#f0f0f0;"| Dll injector / Trainer<br />
|-<br />
| scope="row" style="background:#e0e0e0;" align="center"|'''13'''<br />
| style="background:#f0f0f0;" align="center"|SD #13<br />
| style="background:#f0f0f0;" align="center"|any<br />
| style="background:#f0f0f0;"|<br />
| style="background:#f0f0f0;"| Data files issue<br />
|-<br />
| scope="row" style="background:#e0e0e0;" align="center"|'''17'''<br />
| style="background:#f0f0f0;" align="center"|VF #17<br />
| style="background:#f0f0f0;" align="center"|any<br />
| style="background:#f0f0f0;"|<br />
| style="background:#f0f0f0;"| Speed / wall hacks<br />
|-<br />
| scope="row" style="background:#e0e0e0;" align="center" rowspan="2"|'''21'''<br />
| style="background:#f0f0f0;" align="center"|AC #21<br />
| style="background:#f0f0f0;" align="center"|any<br />
| style="background:#f0f0f0;" align="center"|1.3.1-9.05097 <br />
| style="background:#f0f0f0;"| More trainers<br />
|-<br />
| style="background:#f0f0f0;" align="center"|VF #21<br />
| style="background:#f0f0f0;" align="center"|any<br />
| style="background:#f0f0f0;" align="center"|1.3.1-9.05097 <br />
| style="background:#f0f0f0;"| Custom gta_sa.exe<br />
|-<br />
| scope="row" style="background:#e0e0e0;" align="center"|'''26'''<br />
| style="background:#f0f0f0;" align="center"|SD #26<br />
| style="background:#f0f0f0;" align="center"|any<br />
| style="background:#f0f0f0;" align="center"|1.3.4-9.05858 <br />
| style="background:#f0f0f0;"| Anti-cheat component blocked<br />
|}<br />
<br/><br />
<br />
==<enablesd></enablesd>==<br />
Comma separated list of enabled special detections. A special detection is a type of anti-cheat for (usually) harmless game modifications. Competitive servers may wish to enable special detections, but most servers should leave this setting blank. Available codes are:<br />
{| border="0" cellpadding="1" cellspacing="2"<br />
|-<br />
! scope="col" style="background:#d0d0d0;"|Code for <enablesd><br />
! scope="col" style="background:#d0d0d0;"|Displayed on detect<br />
! scope="col" style="background:#d0d0d0;"|Required server version<br />
! scope="col" style="background:#d0d0d0;"|Required <minclientversion><br />
! scope="col" style="background:#d0d0d0;"|Notes<br />
|-<br />
| scope="row" style="background:#e0e0e0;" align="center"|'''12'''<br />
| style="background:#f0f0f0;" align="center"|SD #12<br />
| style="background:#f0f0f0;" align="center"|any<br />
| style="background:#f0f0f0;"|<br />
| style="background:#f0f0f0;"| Disallow custom D3D9.DLL<br />
|-<br />
| scope="row" style="background:#e0e0e0;" align="center"|'''14'''<br />
| style="background:#f0f0f0;" align="center"|SD #14<br />
| style="background:#f0f0f0;" align="center"|1.3.1-9.04605<br />
| style="background:#f0f0f0;" align="center"|1.3.1-9.04605<br />
| style="background:#f0f0f0;"| Disallow virtual machines such as VMWare<br />
|-<br />
| scope="row" style="background:#e0e0e0;" align="center"|'''15'''<br />
| style="background:#f0f0f0;" align="center"|SD #15<br />
| style="background:#f0f0f0;" align="center"|1.3.1-9.04791<br />
| style="background:#f0f0f0;" align="center"|1.3.1-9.04791<br />
| style="background:#f0f0f0;"| Disallow disabled driver signing<br />
|-<br />
| scope="row" style="background:#e0e0e0;" align="center"|'''16'''<br />
| style="background:#f0f0f0;" align="center"|SD #16<br />
| style="background:#f0f0f0;" align="center"|1.3.1-9.05097<br />
| style="background:#f0f0f0;" align="center"|1.3.1-9.05097<br />
| style="background:#f0f0f0;"| Disallow disabled anti-cheat components. This is triggered when an anti-cheat component can not start. It is usually due to some problem with the PC and might be fixed by a reboot. Can also be triggered by a virus.<br />
|-<br />
| scope="row" style="background:#e0e0e0;" align="center"|'''20'''<br />
| style="background:#f0f0f0;" align="center"|SD #20<br />
| style="background:#f0f0f0;" align="center"|1.3.1-9.05097<br />
| style="background:#f0f0f0;" align="center"|1.3.1-9.05097<br />
| style="background:#f0f0f0;"| Disallow non-standard gta3.img or gta_int.img (For servers not using [[onPlayerModInfo]])<br />
|-<br />
| scope="row" style="background:#e0e0e0;" align="center"|'''22'''<br />
| style="background:#f0f0f0;" align="center"|SD #22<br />
| style="background:#f0f0f0;" align="center"|1.3.4-9.05884<br />
| style="background:#f0f0f0;" align="center"|1.3.4-9.05884<br />
| style="background:#f0f0f0;"| Disallow resource download errors/corruption (Lua script files)<br />
|-<br />
| scope="row" style="background:#e0e0e0;" align="center"|'''23'''<br />
| style="background:#f0f0f0;" align="center"|SD #23<br />
| style="background:#f0f0f0;" align="center"|1.3.4-9.05884<br />
| style="background:#f0f0f0;" align="center"|1.5.2-9.07911<br />
| style="background:#f0f0f0;"| Disallow resource download errors/corruption (Non-Lua files e.g. png,dff)<br />
|-<br />
| scope="row" style="background:#e0e0e0;" align="center"|'''28'''<br />
| style="background:#f0f0f0;" align="center"|SD #28<br />
| style="background:#f0f0f0;" align="center"|1.3.4-9.05884<br />
| style="background:#f0f0f0;" align="center"|1.3.4-9.05884<br />
| style="background:#f0f0f0;"| Disallow Linux Wine<br />
|-<br />
| scope="row" style="background:#e0e0e0;" align="center"|'''31'''<br />
| style="background:#f0f0f0;" align="center"|SD #31<br />
| style="background:#f0f0f0;" align="center"|1.5.3<br />
| style="background:#f0f0f0;" align="center"|1.5.3-9.11204<br />
| style="background:#f0f0f0;"| Ignore injected keyboard inputs (e.g. from AutoHotKey and on screen keyboard)<br />
|-<br />
| scope="row" style="background:#e0e0e0;" align="center"|'''32'''<br />
| style="background:#f0f0f0;" align="center"|SD #32<br />
| style="background:#f0f0f0;" align="center"|1.5.3<br />
| style="background:#f0f0f0;" align="center"|1.5.4-9.11528<br />
| style="background:#f0f0f0;"| Ignore injected mouse button inputs<br />
|}<br />
<br/><br />
<br />
==<client_file name="data/carmods.dat" verify="0"/>==<br />
By default, clients may not join a server if they have customized GTA:SA data files. Adding one or more of the above lines excludes files from validation. The file names that can be used are:<br/><br />
*"data/carmods.dat"<br />
*"data/animgrp.dat"<br />
*"data/ar_stats.dat"<br />
*"data/melee.dat"<br />
*"data/clothes.dat"<br />
*"data/object.dat"<br />
*"data/default.dat"<br />
*"data/surface.dat"<br />
*"data/default.ide"<br />
*"data/gta.dat"<br />
*"data/surfinfo.dat"<br />
*"data/peds.ide"<br />
*"data/vehicles.ide"<br />
*"data/pedstats.dat"<br />
*"data/water.dat"<br />
*"data/txdcut.ide"<br />
*"data/water1.dat"<br />
*"models/coll/weapons.col"<br />
*"data/weapon.dat"<br />
*"data/plants.dat"<br />
*"anim/ped.ifp"<br />
*"data/furnitur.dat"<br />
*"data/procobj.dat"<br />
*"data/maps"<br />
<br/><br />
'''''Note 1:''''' ''"data/maps" represents all the files and directories within "data/maps"''<br/><br />
<br />
'''''Note 2:''''' ''"data/handling.cfg" is not included as it is always ignored by MTA because of the internal vehicle handling functions. [[Handling.cfg|See here if you want to load custom handling.cfg files]]''<br/><br />
<br />
==<hideac></hideac>==<br />
<br />
You can use this setting in mtaserver.conf to hide the AC info from the client, showing the following line upon join:<br />
Server AC info: [Allowed client files: Undisclosed] [Disabled AC: Undisclosed] [Enabled SD: Undisclosed]<br />
<br />
Values: 0 - disabled, 1 - enabled; default value: 0.<br />
<br />
<br />
=Client=<br />
When joining a server, the server AC info is displayed in the client console (F8)<br/><br />
Example:<br/><br />
Server AC Info: [Allowed client files: None] [Disabled AC: None] [Enabled SD: None]<br />
<br />
Disabled AC contains the contents of the server setting from <disableac></disableac><br/><br />
Enabled SD contains the contents of the server setting from <enablesd></enablesd><br/><br />
Allowed client files contains numbers to indicate which client files the server allows to be modified. The numbers represent these files:<br />
*1 - "data/carmods.dat"<br />
*2 - "data/animgrp.dat"<br />
*4 - "data/ar_stats.dat"<br />
*5 - "data/melee.dat"<br />
*6 - "data/clothes.dat"<br />
*7 - "data/object.dat"<br />
*8 - "data/default.dat"<br />
*9 - "data/surface.dat"<br />
*10 - "data/default.ide"<br />
*12 - "data/gta.dat"<br />
*13 - "data/surfinfo.dat"<br />
*14 - "data/peds.ide"<br />
*15 - "data/vehicles.ide"<br />
*16 - "data/pedstats.dat"<br />
*17 - "data/water.dat"<br />
*18 - "data/txdcut.ide"<br />
*19 - "data/water1.dat"<br />
*20 - "models/coll/weapons.col"<br />
*21 - "data/weapon.dat"<br />
*22 - "data/plants.dat"<br />
*23 - "anim/ped.ifp"<br />
*24 - "data/furnitur.dat"<br />
*25 - "data/procobj.dat"<br />
*26 - "data/maps"<br />
<br />
'''''Note:''''' ''If the info is marked "Undisclosed", it means that the server has decided not to disclose the AC info to the client.''<br />
<br />
===Using modified files===<br />
If you want to use modified data files from your GTA:SA install directory, check this check box:<br/><br />
Settings -> Multiplayer -> Use customized GTA:SA files<br />
(checkbox only appears if your GTA:SA data files are customized)<br/><br />
<br />
'''''Note:''''' ''This will restrict your access to some public servers as most do not allow customized data files.''<br />
<br />
<br />
=AC Panel resource=<br />
An anti-cheat helper resource called '''acpanel''' is included with the default resources.<br />
<br />
It shows the current anti-cheat status of your server, along with an option to keep your clients up to date and a basic implementation of [[onPlayerModInfo]] to block modified img files.<br />
<br />
<br />
=AC Guide purpose=<br />
The toolset available to server owners, as described in the AC guide, is intended to provide methods to reduce several types of unfair advantage that a player may get over others.<br />
It is '''not related to core MTA anti-cheat''' (the way we continuously fend off hackers using cheats designed for MTA), which you cannot exercise any control over (more on that is listed in the <disableac> header at the beginning of this page).<br />
<br />
The definition of ''''preventing unfair advantage'''' truly depends on the type of server (gamemode) and '''competitiveness'''. You always got to think out a custom approach depending on your server's needs.<br />
Good examples of what is possible for you to achieve and to what sort of gamemode they belong;<br />
<br />
- Disabling '''client GTA mods''' (custom gta3.img) to prevent any sort of "small skin" abuse (a form where the player's skin has a small hitbox, while the attacker's screen shows it as if bullets collided anywhere).<br />
Removed world objects to gain unfair advantage in maps or areas where combat takes place, in order to easily see (or shoot) through them, or vehicle mods which have been stripped of its collisions, are also combatted by these means.<br />
<br />
- Disabling mouse and keyboard button '''macro's''' using '''SD #31 & 32''' if you have a server revolving around melee combat (mostly for "binds" enabling easy stealthkills using macro combinations rather than natural skill).<br />
<br />
Also, with SD #31 and #32 you can prevent mass-firing of performance-intensive serverside function calls. Without using this, and if your gamemode doesn't gave proper timer management, it is possible for malicious players to create macro binds (e.g commands bound to call serverside functions) and induce server lag by massively triggering them, for example 1000 times a second using a macro capable of doing so. This is not related to gaining unfair advantages, but your gamemode's existing code measures make or break the feasability of blocking macro key or mouse button inputs.<br />
<br />
<br />
[[Category: Support]]<br />
[[ru:Anti-cheat guide]]</div>Ccwhttps://wiki.multitheftauto.com/index.php?title=DxDrawMaterialSectionLine3D&diff=55170DxDrawMaterialSectionLine3D2018-06-01T18:08:48Z<p>Ccw: </p>
<hr />
<div>__NOTOC__ <br />
{{Client function}} <br />
This function draws a textured 3D line between two points in the 3D world - rendered for one frame. This should be used in conjunction with [[onClientPreRender]] in order to display continuously.<br />
<br />
The 3D line with a large width value effectively becomes a rectangle, so it it possible to construct basic shapes such as boxes with several large width lines and the appropriate values for 'faceToward'.<br />
<br />
==Syntax==<br />
<syntaxhighlight lang="lua"><br />
bool dxDrawMaterialSectionLine3D ( float startX, float startY, float startZ, float endX, float endY, float endZ,<br />
float u, float v, float usize, float vsize, element material, int width,<br />
[ int color = white, [ bool postGUI = false, ] float faceTowardX, float faceTowardY, float faceTowardZ ] )<br />
</syntaxhighlight><br />
<br />
===Required Arguments=== <br />
* '''startX/Y/Z:''' The start position of the 3D line, representing a coordinate in the GTA world.<br />
* '''endX/Y/Z:''' The end position of the 3D line, representing a coordinate in the GTA world.<br />
*'''u:''' the absolute X coordinate of the top left corner of the section <br />
*'''v:''' the absolute Y coordinate of the top left corner of the section <br />
*'''usize:''' the absolute width of the section<br />
*'''vsize:''' the absolute height of the section<br />
* '''material:''' A [[material]] to draw the line with.<br />
* '''width:''' The width/thickness of the line in GTA world units. (This is 1/75th of the width used in dxDrawLine3D)<br />
<br />
==Optional Arguments==<br />
* '''color:''' An integer of the hex color, produced using [[tocolor]] or 0xAARRGGBB (AA = alpha, RR = red, GG = green, BB = blue).<br />
{{New items|5.0155|1.5.5-9.11998|<br />
* '''postGUI''': A bool representing whether the line should be drawn on top of or behind any ingame GUI.<br />
}}<br />
* '''faceTowardX/Y/Z:''' The direction the front of the line should face towards. If this is not set, the front of the line always faces toward the camera.<br />
<br />
===Returns===<br />
Returns a ''true'' if the operation was successful, ''false'' otherwise.<br />
<br />
==Example== <br />
This example draws corona like effects near the player<br />
<syntaxhighlight lang="lua"><br />
coronaTexture = dxCreateTexture("corona.png")<br />
red = tocolor(255,0,0)<br />
green = tocolor(0,255,0)<br />
blue = tocolor(0,0,255)<br />
<br />
addEventHandler("onClientPreRender",root,<br />
function()<br />
local x,y,z = getElementPosition(localPlayer)<br />
<br />
dxSetBlendMode("add") -- Add blend mode looks best for corona effects<br />
drawCorona( x+2, y+2, z+1, 1, red )<br />
drawCorona( x+1, y+3, z+2, 1, green )<br />
drawCorona( x-1, y+2, z+3, 1, blue )<br />
dxSetBlendMode("blend") -- Restore default<br />
end<br />
)<br />
<br />
-- Draw the corona texture<br />
function drawCorona( x, y, z, size, color )<br />
dxDrawMaterialSectionLine3D ( x, y, z+size,<br />
x, y, z-size,<br />
0,0,1,1, coronaTexture, size, color)<br />
end<br />
<br />
</syntaxhighlight><br />
<br />
<br />
==Requirements==<br />
{{Requirements|n/a|1.3.0-9.03931|}}<br />
<br />
==Changelog==<br />
{{ChangelogHeader}}<br />
{{ChangelogItem|1.5.5-9.11998|Added postGUI argument}}<br />
<br />
==See Also==<br />
{{Drawing_functions}}</div>Ccwhttps://wiki.multitheftauto.com/index.php?title=DxDrawMaterialLine3D&diff=55169DxDrawMaterialLine3D2018-06-01T18:07:39Z<p>Ccw: </p>
<hr />
<div>__NOTOC__ <br />
{{Client function}}<br />
This function draws a textured 3D line between two points in the 3D world - rendered for one frame. This should be used in conjunction with [[onClientPreRender]] in order to display continuously.<br />
<br />
The 3D line with a large width value effectively becomes a rectangle, so it it possible to construct basic shapes such as boxes with several large width lines and the appropriate values for 'faceToward'.<br />
<br />
3D lines are drawn at a particular place in the [[Game_Processing_Order|game processing order]], so use [[onClientPreRender]] for drawing if you are attaching them to world elements.<br />
<br />
==Syntax==<br />
<syntaxhighlight lang="lua"><br />
bool dxDrawMaterialLine3D ( float startX, float startY, float startZ, float endX, float endY, float endZ, element material, float width,<br />
[ int color = white, [ bool postGUI = false, ] float faceTowardX, float faceTowardY, float faceTowardZ ] )<br />
</syntaxhighlight><br />
<br />
===Required Arguments=== <br />
* '''startX/Y/Z:''' The start position of the 3D line, representing a coordinate in the GTA world.<br />
* '''endX/Y/Z:''' The end position of the 3D line, representing a coordinate in the GTA world.<br />
* '''material:''' A [[material]] to draw the line with.<br />
* '''width:''' The width/thickness of the line in GTA world units. (This is 1/75th of the width used in dxDrawLine3D)<br />
<br />
==Optional Arguments==<br />
{{OptionalArg}}<br />
* '''color:''' An [[int|integer]] of the hex color, produced using [[tocolor]] or 0xAARRGGBB (AA = alpha, RR = red, GG = green, BB = blue).<br />
{{New items|5.0155|1.5.5-9.11998|<br />
* '''postGUI''': A bool representing whether the line should be drawn on top of or behind any ingame GUI.<br />
}}<br />
* '''faceTowardX/Y/Z:''' The position the front of the line should face towards. If this is not set, the camera position is used, so the front of the line faces toward the camera.<br />
<br />
===Returns===<br />
Returns a ''true'' if the operation was successful, ''false'' otherwise.<br />
<br />
==Example== <br />
<section name="Client" class="client" show="true"><br />
Draws an Image ( "test.png" Download : [http://i.epvpimg.com/dwsTe.png test.png] ) from the Position 0,0,3 to 0,0,15<br />
<syntaxhighlight lang="lua">local img = dxCreateTexture("test.png")<br />
addEventHandler("onClientRender", root,<br />
function() -- x,y,z, targetx,targety,targetz,texture,width,color<br />
dxDrawMaterialLine3D (0,0,3,0,0,15,img, 7, tocolor(255,255,255,255))<br />
end)<br />
</syntaxhighlight><br />
</section><br />
<br />
==Requirements==<br />
{{Requirements|n/a|1.3.0-9.03931|}}<br />
<br />
==Changelog==<br />
{{ChangelogHeader}}<br />
{{ChangelogItem|1.5.5-9.11998|Added postGUI argument}}<br />
<br />
==See Also==<br />
{{Drawing_functions}}</div>Ccwhttps://wiki.multitheftauto.com/index.php?title=DbConnect&diff=54813DbConnect2018-04-27T16:20:58Z<p>Ccw: </p>
<hr />
<div>__NOTOC__<br />
{{Server function}}<br />
This function opens a connection to a database and returns an element that can be used with [[dbQuery]]. To disconnect use [[destroyElement]].<br />
{{Note|Connecting and disconnecting many times can have a performance impact on the server. For optimal performance it is recommended that you use dbConnect only once when the resource starts, and share the connection element with the whole script.}}<br />
==Syntax== <br />
<syntaxhighlight lang="lua"><br />
element dbConnect ( string databaseType, string host [, string username = "", string password = "", string options = "" ] )<br />
</syntaxhighlight><br />
{{OOP||[[Connection]]}}<br />
===Required Arguments===<br />
*'''databaseType:''' The type of database. This can be either ''sqlite'' or ''mysql''<br />
*'''host:''' The target to connect to. The format of this depends on the database type.<br />
** For SQLite it is a [[filepath]] to a SQLite database file. If the filepath starts with ":/" then the server's global databases directory is used. The file will be created if it does not exist.<br />
** For MySQL it is a list of key=value pairs separated by semicolons. Supported keys are:<br />
*** '''dbname''': Name of the database to use e.g. ''dbname=test''<br />
*** '''host''': Host address e.g. ''host=127.0.0.1''<br />
*** '''port''': Host port e.g. ''port=1234'' (optional, defaults to standard MySQL port if not used)<br />
*** '''unix_socket''': Unix socket or named pipe to use (optional)<br />
***'''charset''': Communicate with the server using a character which is different from the default e.g. ''charset<nowiki>=</nowiki>utf8'' (optional)<br />
<br />
===Optional Arguments===<br />
*'''username:''' Usually required for MySQL, ignored by SQLite <br />
*'''password:''' Usually required for MySQL, ignored by SQLite <br />
*'''options :''' List of key=value pairs separated by semicolons. Supported keys are:<br />
**'''share''' which can be set to 0 or 1. (Default value for SQLite is "share=1", for MySQL is "share=0"). When set to 1, the connection is shared and will be used by other calls to dbConnect with the same host string. This is usually a good thing for SQLite connections, but not so good for MySQL unless care is taken.<br />
**'''batch''' which can be set to 0 or 1. (Default is "batch=1"). When set to 1, queries called in the same frame are automatically batched together which can significantly speed up inserts/updates. The downside is you lose control of the feature that is used to achieve batching (For SQLite it is transactions, for MySQL it is autocommit mode). Therefore, if you use transactions, lock tables or control autocommit yourself, you may want to disable this feature.<br />
**'''autoreconnect''' which can be set to 0 or 1. (Default value "autoreconnect=1"). When set to 1, dropped connections will automatically be reconnected. Note that session variables (incl. SET NAMES), user variables, table locks and temporary tables will be reset because of the reconnection. So if you use these fancy features, you will need to turn autoreconnect off and cope with dropped connections some other way.<br />
**'''log''' which can be set to 0 or 1. (Default value "log<nowiki>=</nowiki>1"). When set to 0, activity from this connection will not be recorded in the [[Server_Commands#debugdb|database debug log file]].<br />
**'''tag''' (Default value "tag<nowiki>=</nowiki>script"). A string which helps identify activity from this connection in the [[Server_Commands#debugdb|database debug log file]].<br />
**'''suppress''' A comma separated list of error codes to ignore. (eg. "suppress<nowiki>=</nowiki>1062,1169").<br />
{{New items|3.0160|1.5.2|<br />
**'''multi_statements''' Enable multiple statements (separated by a semi-colon) in one query. Use [[dbPrepareString]] when building a multiple statement query to reduce SQL injection risks.<br />
|7972}}<br />
<br />
===Returns===<br />
Returns a database connection element unless there are problems, in which case it return ''false''.<br />
<br />
==Example==<br />
This example opens a connection to a SQLite database file in the current resource<br />
<syntaxhighlight lang="lua"><br />
test_db = dbConnect( "sqlite", "file.db" )<br />
</syntaxhighlight><br />
<br />
This example opens a connection to a SQLite database file in another resource<br />
<syntaxhighlight lang="lua"><br />
test_db = dbConnect( "sqlite", ":resname/file.db" )<br />
</syntaxhighlight><br />
<br />
This example opens a connection to a SQLite database file in the global databases directory<br />
<syntaxhighlight lang="lua"><br />
test_db = dbConnect( "sqlite", ":/file.db" )<br />
</syntaxhighlight><br />
<br />
This example opens a connection to a SQLite database file in a sub directory of the global databases directory<br />
<syntaxhighlight lang="lua"><br />
test_db = dbConnect( "sqlite", ":/example/sub/dir/file.db" )<br />
</syntaxhighlight><br />
<br />
This example opens a connection to a MySQL database called 'frank' at server ip 1.2.3.4 using utf8 character set and allows the connection to be shared. Note that changing the database or other connection dependent settings affect all connections that are shared.<br />
<syntaxhighlight lang="lua"><br />
test_db = dbConnect( "mysql", "dbname=frank;host=1.2.3.4;charset=utf8", "username", "password", "share=1" )<br />
</syntaxhighlight><br />
<br />
This example opens a connection to a SQLite database is disallows sharing of the connection<br />
<syntaxhighlight lang="lua"><br />
test_db = dbConnect( "sqlite", "file.db", "", "", "share=0" )<br />
</syntaxhighlight><br />
<br />
This example output debug message, if the connection with SQLite database was established or not<br />
<syntaxhighlight lang="lua"><br />
test_db = dbConnect( "sqlite", "file.db" )<br />
<br />
if test_db then<br />
outputDebugString( "Connection with database was successfully established." )<br />
else<br />
outputDebugString( "Connection with database couldn't be established." )<br />
end<br />
</syntaxhighlight><br />
<br />
The folowing example shows how you could approach a common resource for database operations with exported functions ('''query''' and '''execute'''):<br />
<br />
<syntaxhighlight lang="lua"><br />
function connect()<br />
DBConnection = dbConnect( "mysql", "dbname=DBNAME;host=HOST;charset=utf8", "USERNAME", "PASSWORD" )<br />
if (not DBConnection) then<br />
outputDebugString("Error: Failed to establish connection to the MySQL database server")<br />
else<br />
outputDebugString("Success: Connected to the MySQL database server")<br />
end<br />
end<br />
<br />
addEventHandler("onResourceStart",resourceRoot, connect)<br />
<br />
function query(...)<br />
local queryHandle = dbQuery(DBConnection, ...)<br />
if (not queryHandle) then<br />
return nil<br />
end<br />
local rows = dbPoll(queryHandle, -1)<br />
return rows<br />
end<br />
<br />
function execute(...)<br />
local queryHandle = dbQuery(DBConnection, ...)<br />
local result, numRows = dbPoll(queryHandle, -1)<br />
return numRows<br />
end<br />
<br />
function getDBConnection()<br />
return DBConnection<br />
end<br />
</syntaxhighlight><br />
<br />
==Requirements==<br />
{{Requirements|1.1.1-9.03328|n/a}}<br />
<br />
==Changelog==<br />
{{ChangelogHeader}}<br />
{{ChangelogItem|1.3.1-9.04817|Added options 'log', 'tag' and 'suppress'}}<br />
{{ChangelogItem|1.3.5-9.06386|Added option 'charset'}}<br />
{{ChangelogItem|1.5.2-9.07972|Added option 'multi_statements'}}<br />
<br />
==See Also==<br />
{{SQL_functions}}<br />
<br />
[[ru:dbConnect]]</div>Ccwhttps://wiki.multitheftauto.com/index.php?title=Template:Languages_list&diff=54606Template:Languages list2018-04-06T23:01:10Z<p>Ccw: </p>
<hr />
<div><noinclude>Adds 'A in other languages' sidebar. If you add a language here, please send a message to MTA staff so we can enable it - (Staff note: To add another language copy and modify an existing one in the wiki_dev_interwiki mysql table)</noinclude><br />
{{#ifeq: {{{1}}} | ar || [[ar:Main Page]] }}<br />
{{#ifeq: {{{1}}} | cs || [[cs:hlavni]] }}<br />
{{#ifeq: {{{1}}} | de || [[de:Hauptseite]] }}<br />
{{#ifeq: {{{1}}} | en || [[en:Main Page]] }}<br />
{{#ifeq: {{{1}}} | es || [[es:Página Principal]] }}<br />
{{#ifeq: {{{1}}} | fr || [[fr:Main Page]] }}<br />
{{#ifeq: {{{1}}} | hu || [[hu:Main Page]] }}<br />
{{#ifeq: {{{1}}} | it || [[it:Pagina principale]] }}<br />
{{#ifeq: {{{1}}} | nl || [[nl:Main Page]] }}<br />
{{#ifeq: {{{1}}} | pl || [[pl:Strona_Główna]] }}<br />
{{#ifeq: {{{1}}} | pt-br|| [[pt-br:Página Inicial]] }}<br />
{{#ifeq: {{{1}}} | ru || [[ru:Main Page]] }}<br />
{{#ifeq: {{{1}}} | sk || [[sk:Main Page]] }}<br />
{{#ifeq: {{{1}}} | uk || [[uk:Main Page]] }}<br />
{{#ifeq: {{{1}}} | tr || [[tr:Anasayfa]] }}<br />
{{#ifeq: {{{1}}} | zh-CN || [[zh-cn:Main Page]] }}</div>Ccwhttps://wiki.multitheftauto.com/index.php?title=SetCameraMatrix&diff=54535SetCameraMatrix2018-04-03T21:35:11Z<p>Ccw: Reverted edits by Abdennour-mez (talk) to last revision by Ccw</p>
<hr />
<div>__NOTOC__<br />
{{Server client function}}<br />
This function sets the camera's position and direction. The first three arguments are the point at which the camera lies, the last three are the point the camera faces (or the point it "looks at").<br />
<br />
'''Note:''' Calling this function takes the camera's focus away from the player and sets the camera in a fixed position and rotation. The camera's focus can be brought back to the player using the [[setCameraTarget]] function.<br />
==Syntax==<br />
<section name="Server" class="server" show="true"><br />
<syntaxhighlight lang="lua"><br />
bool setCameraMatrix ( player thePlayer, float positionX, float positionY, float positionZ [, float lookAtX, float lookAtY, float lookAtZ, float roll = 0, float fov = 70 ] )<br />
</syntaxhighlight><br />
{{OOP||[[player]]:setCameraMatrix|cameraMatrix|getCameraMatrix}}<br />
===Required Arguments=== <br />
*'''thePlayer:''' The player whose camera is to be changed.<br />
*'''positionX:''' The x coordinate of the camera's position.<br />
*'''positionY:''' The y coordinate of the camera's position.<br />
*'''positionZ:''' The z coordinate of the camera's position.<br />
*'''{{New feature/item|3.0141|1.4.1|7005|Instead of six coordinates, or two vectors, a Matrix can be supplied.}}'''<br />
<br />
===Optional Arguments=== <br />
*'''lookAtX:''' The x coordinate of the point the camera faces.<br />
*'''lookAtY:''' The y coordinate of the point the camera faces.<br />
*'''lookAtZ:''' The z coordinate of the point the camera faces.<br />
*'''roll:''' The camera roll angle, -180 to 180. A value of 0 means the camera sits straight, positive values will turn it counter-clockwise and negative values will turn it clockwise. -180 or 180 means the camera is upside down.<br />
*'''fov:''' the field of view angle, 0.01 to 180. The higher this value is, the more you will be able to see what is to your sides.<br />
</section><br />
<br />
<section name="Client" class="client" show="true"><br />
<syntaxhighlight lang="lua"><br />
bool setCameraMatrix ( float positionX, float positionY, float positionZ [, float lookAtX, float lookAtY, float lookAtZ, float roll = 0, float fov = 70 ] )<br />
</syntaxhighlight><br />
{{OOP|This is under the static class '''Camera'''|Camera.setMatrix|matrix|getCameraMatrix}}<br />
<br />
===Required Arguments=== <br />
*'''positionX:''' The x coordinate of the camera's position.<br />
*'''positionY:''' The y coordinate of the camera's position.<br />
*'''positionZ:''' The z coordinate of the camera's position.<br />
*'''{{New feature/item|3.0141|1.4.1|7005|Instead of six coordinates, or two vectors, a Matrix can be supplied.}}'''<br />
<br />
===Optional Arguments=== <br />
*'''lookAtX:''' The x coordinate of the point the camera faces.<br />
*'''lookAtY:''' The y coordinate of the point the camera faces.<br />
*'''lookAtZ:''' The z coordinate of the point the camera faces.<br />
*'''roll:''' The camera roll angle, -180 to 180. A value of 0 means the camera sits straight, positive values will turn it counter-clockwise and negative values will turn it clockwise. -180 or 180 means the camera is upside down.<br />
*'''fov:''' the field of view angle, 0.01 to 180. The higher this value is, the more you will be able to see what is to your sides.<br />
</section><br />
<br />
===Returns===<br />
Returns ''true'' if the arguments are valid, ''false'' otherwise.<br />
<br />
==Example==<br />
This code fixates the camera onto the Vinewood sign in Los Santos for any player that joins the server:<br />
<section class="server" name="Server script" show="true"><br />
<syntaxhighlight lang="lua"><br />
function setCameraOnPlayerJoin()<br />
-- slowly fade the camera in to make the screen visible<br />
fadeCamera(source, true, 5)<br />
-- set the player's camera to a fixed position, looking at a fixed point<br />
setCameraMatrix(source, 1468.8785400391, -919.25317382813, 100.153465271, 1468.388671875, -918.42474365234, 99.881813049316)<br />
end<br />
addEventHandler("onPlayerJoin", root, setCameraOnPlayerJoin)</syntaxhighlight><br />
</section><br />
<br />
==See Also==<br />
{{Camera functions}}</div>Ccwhttps://wiki.multitheftauto.com/index.php?title=AddDebugHook&diff=54245AddDebugHook2018-03-29T19:45:53Z<p>Ccw: </p>
<hr />
<div>__NOTOC__<br />
{{Server client function}}<br />
{{New feature/item|3.0136|1.3|5939|<br />
This function allows tracing of MTA functions and events. It should only be used when debugging scripts as it may degrade script performance.<br />
<br />
Debug hooks are not recursive, so functions and events triggered inside the hook callback will not be traced.<br />
}}<br />
<br />
==Syntax==<br />
<syntaxhighlight lang="lua"><br />
bool addDebugHook( string hookType, function callbackFunction[, table nameList ] )<br />
</syntaxhighlight><br />
<br />
===Required Arguments=== <br />
*'''hookType:''' The type of hook to add. This can be:<br />
** preEvent<br />
** postEvent<br />
** preFunction<br />
** postFunction<br />
{{New feature/item|9.0155|1.5.5|11856|<br />
* preEventFunction<br />
* postEventFunction<br />
}}<br />
*'''callbackFunction :''' The function to call<br />
{{New feature/item|9.0152|1.5.2|7967|<br />
* Returning the string "skip" from the callback function will cause the original function/event to be skipped<br />
}}<br />
<br />
===Optional Arguments=== <br />
*'''nameList:''' Table of strings for restricting which functions and events the hook will be triggered on<br />
{{New feature/item|9.0152|1.5.2|7967|<br />
* addDebugHook and removeDebugHook will only be hooked if they are specified in the name list<br />
}}<br />
<br />
===Returns===<br />
Returns ''true'' if the hook was successfully added, or ''false'' otherwise.<br />
<br />
==Callback parameters==<br />
<syntaxhighlight lang="lua"><br />
string preFunction( resource sourceResource, string functionName, bool isAllowedByACL, string luaFilename, int luaLineNumber, ...functionArguments )<br />
postFunction( resource sourceResource, string functionName, bool isAllowedByACL, string luaFilename, int luaLineNumber, ...functionArguments )<br />
string preEvent( resource sourceResource, string eventName, element eventSource, element eventClient, string luaFilename, int luaLineNumber, ...eventArguments )<br />
postEvent( resource sourceResource, string eventName, element eventSource, element eventClient, string luaFilename, int luaLineNumber, ...eventArguments )<br />
</syntaxhighlight><br />
{{New feature/item|3.0155|1.5.5|11856|<br />
<syntaxhighlight lang="lua"><br />
string preEventFunction ( resource eventResource, string eventName, element eventSource, element eventClient, string eventFilename, int eventLineNumber, resource functionResource, string functionFilename, int functionLineNumber, ...eventArgs )<br />
postEventFunction ( resource eventResource, string eventName, element eventSource, element eventClient, string eventFilename, int eventLineNumber, resource functionResource, string functionFilename, int functionLineNumber, ...eventArgs )<br />
</syntaxhighlight><br />
}}<br />
<br />
==Example==<br />
This example will dump info about all triggered events:<br />
<syntaxhighlight lang="lua"><br />
function onPreEvent( sourceResource, eventName, eventSource, eventClient, luaFilename, luaLineNumber, ... )<br />
local args = { ... }<br />
local srctype = eventSource and getElementType(eventSource)<br />
local resname = sourceResource and getResourceName(sourceResource)<br />
local plrname = eventClient and getPlayerName(eventClient)<br />
outputDebugString( "preEvent"<br />
.. " " .. tostring(resname)<br />
.. " " .. tostring(eventName)<br />
.. " source:" .. tostring(srctype)<br />
.. " player:" .. tostring(plrname)<br />
.. " file:" .. tostring(luaFilename)<br />
.. "(" .. tostring(luaLineNumber) .. ")"<br />
.. " numArgs:" .. tostring(#args)<br />
.. " arg1:" .. tostring(args[1])<br />
)<br />
end<br />
addDebugHook( "preEvent", onPreEvent )<br />
</syntaxhighlight><br />
This example will dump info about all called MTA functions:<br />
<syntaxhighlight lang="lua"><br />
function onPreFunction( sourceResource, functionName, isAllowedByACL, luaFilename, luaLineNumber, ... )<br />
local args = { ... }<br />
local resname = sourceResource and getResourceName(sourceResource)<br />
outputDebugString( "preFunction"<br />
.. " " .. tostring(resname)<br />
.. " " .. tostring(functionName)<br />
.. " allowed:" .. tostring(isAllowedByACL)<br />
.. " file:" .. tostring(luaFilename)<br />
.. "(" .. tostring(luaLineNumber) .. ")"<br />
.. " numArgs:" .. tostring(#args)<br />
.. " arg1:" .. tostring(args[1])<br />
)<br />
end<br />
addDebugHook( "preFunction", onPreFunction)<br />
</syntaxhighlight><br />
<br />
This example adds a hook which will only be triggered for the named functions<br />
<syntaxhighlight lang="lua"><br />
addDebugHook( "preFunction", onPreFunction, {"setElementPosition","loadstring"} )<br />
</syntaxhighlight><br />
<br />
<br />
{{New feature/item|9.0152|1.5.2|7967|<br />
This example shows how to disable addDebugHook<br />
<syntaxhighlight lang="lua"><br />
addDebugHook( "preFunction", onPreFunction, {"addDebugHook"} )<br />
function onPreFunction( sourceResource, functionName, isAllowedByACL, luaFilename, luaLineNumber, ... )<br />
return "skip"<br />
end<br />
</syntaxhighlight><br />
}}<br />
==Changelog==<br />
{{ChangelogHeader}}<br />
{{ChangelogItem|1.3.5-9.06054|Added clientside}}<br />
{{ChangelogItem|1.3.5-9.06142|Added option to restrict to specified functions and events }}<br />
{{ChangelogItem|1.5.2-9.07957|Added option to skip original function/event <br/>Added ability to hook addDebugHook and removeDebugHook }}<br />
{{ChangelogItem|1.5.5-9.11856|Added pre/postEventFunction hooks }}<br />
==Requirements==<br />
{{Requirements|1.3.4-9.05939|1.3.5-9.06054}}<br />
<br />
==See Also==<br />
{{Utility functions}}</div>Ccwhttps://wiki.multitheftauto.com/index.php?title=OnPlayerWeaponFire&diff=54221OnPlayerWeaponFire2018-03-28T01:49:12Z<p>Ccw: </p>
<hr />
<div>{{Server event}}<br />
__NOTOC__ <br />
{{New feature/item|3.0153|1.5.3|9921|<br />
This event is called when a player fires a weapon. This does not trigger for projectiles, melee weapons, or camera.<br />
}}<br />
{{Note|This event works only with weapons which have enabled bullet sync.}}<br />
==Parameters==<br />
<syntaxhighlight lang="lua"><br />
int weapon, float endX, float endY, float endZ, element hitElement, float startX, float startY, float startZ<br />
</syntaxhighlight> <br />
*'''weapon''': an [[int]] representing [[weapons|weapon]] used for making a shot.<br />
*'''endX''', '''endY''', '''endZ''': [[float]] world coordinates representing an end point.<br />
*'''hitElement''': an [[element]] which was hit by a shot. Currently this can be only another [[player]]. '''Note: hitElement could be incorrect and should not be relied upon'''<br />
*'''startX''', '''startY''', '''startZ''': [[float]] world coordinates representing the start of the bullet. Note: This is not the gun muzzle.<br />
<br />
==Source==<br />
The [[event system#Event source|source]] of this event is the [[player]] who fired the weapon.<br />
<br />
==Example==<br />
This code outputs the information on debug screen when a player shoots.<br />
<syntaxhighlight lang="lua"><br />
addEventHandler ("onPlayerWeaponFire", root, <br />
function (weapon, endX, endY, endZ, hitElement, startX, startY, startZ)<br />
iprint (getPlayerName(source).. " just shot a " .. getElementType (hitElement) .. " at X: ".. endX .. " Y: " .. endY .. " Z: " .. endZ .. " from X: " .. startX .. " Y: ".. startY .. " Z: " .. startZ .. " with a ".. getWeaponNameFromID (weapon))<br />
end<br />
)<br />
</syntaxhighlight><br />
<br />
{{See also/Server event|Player events}}</div>Ccwhttps://wiki.multitheftauto.com/index.php?title=Server_mtaserver.conf&diff=54104Server mtaserver.conf2018-03-12T12:36:49Z<p>Ccw: Reverted edits by Lucasalves (talk) to last revision by Ccw</p>
<hr />
<div>This page lists the settings that can be set in the settings file. ''Setting from the default '''mtaserver.conf''' settings file is in italics''.<br />
<br />
<br />
====servername====<br />
:''<servername>Default MTA Server</servername>''<br />
:This parameter specifies the name the server will be visible as in the ingame server browser and on Game-Monitor. It is a required parameter.<br />
<br />
====serverip====<br />
:''<serverip>auto</serverip><br />
:'''ONLY USE THIS PARAMETER IF YOU ARE SURE OF WHAT YOU ARE DOING''' - it is generally only needed for professional servers and should be left at the default value otherwise.<br />
: This parameter specifies the IP to use for servers that have multiple IP addresses. If set to auto, it will automatically detect and use the server's standard local IP address.<br />
:Values: auto or x.x.x.x ; default value: auto --><br />
:SERVERIP SHOULD BE LEFT SET TO auto UNLESS YOU ARE SURE OF WHAT YOU ARE DOING<br />
:WARNING: SETTING serverip AND THEN ASKING FOR SUPPORT CAN CAUSE DEATH OR INJURY<br />
<br />
====serverport====<br />
:''<serverport>22003</serverport> <br />
:This parameter specifies the UDP port on which the server will be accepting incoming player connections;<br />
:default value: 22003. It is a required parameter.<br />
<br />
====maxplayers====<br />
:''<maxplayers>32</maxplayers><br />
:This parameter specifies the number of maximum player slots available on the server;<br />
:default value: 32. It is a required parameter.<br />
<br />
====httpserver====<br />
:''<httpserver>1</httpserver><br />
:This parameter specifies whether the built-in http server will be used.<br />
:Values: 0 - disabled , 1 - enabled ; default value: 1. Optional parameter.<br />
:More information: [[Server_Manual#Using_the_web_interface|Using the web interface]]<br />
<br />
====httpport====<br />
:''<httpport>22005</httpport><br />
:This parameter specifies the TCP port on which the server will be accepting incoming http connections. It can be set to the same value as <serverport>. It is a required parameter if <httpserver> is set to 1.<br />
:More information: [[Server_Manual#Using_the_web_interface|Using the web interface]]<br />
<br />
====httpdownloadurl====<br />
:''<httpdownloadurl></httpdownloadurl><br />
:If set, this parameter specifies the external URL from which clients will be able to download needed resources ingame. Otherwise they will download them directly from the server.<br />
:More information: [[Server_Manual#Configuring_an_external_web_server|Configuring an external web server]]<br />
<br />
====httpmaxconnectionsperclient====<br />
:''<httpmaxconnectionsperclient>5</httpmaxconnectionsperclient><br />
:This parameter limits the number of http connections each client can make. Depending on the type of http server that is used, a lower figure may reduce download timeouts. Only relevant when using an external http server.<br />
:Available range: 1 to 8.<br />
<br />
====httpdosthreshold====<br />
:''<httpdosthreshold>20</httpdosthreshold><br />
:This parameter limits the number http connections that an IP can initiate over a short period of time.<br />
:Available range: 1 to 100. default value: 20<br />
<br />
{{New feature/item|3.0136|1.3.5|6301|<br />
====http_dos_exclude====<br />
:''<http_dos_exclude></http_dos_exclude><br />
:This parameter lists the IP addresses that are to be excluded from http dos threshold limits.<br />
:e.g. 88.11.22.33,101.2.3.4<br />
}}<br />
<br />
====allow_gta3_img_mods====<br />
:''<allow_gta3_img_mods>none</allow_gta3_img_mods><br />
:By default, the server will block the use of locally customized gta3.img player skins. <br />
:This setting can be used to allow such mods. Not recommended for competitive servers.<br />
:Values: none, peds; default value: none<br />
<br />
====client_file====<br />
:''<nowiki><!-- <client_file name="data/carmods.dat" verify="0" /> --></nowiki><br />
:By default, the server will block the use of customized GTA:SA data files.<br />
:To allow specific client files, add one or more of the above lines.<br />
:More information: [[Anti-cheat_guide|Anti-cheat guide]]<br />
<br />
====disableac====<br />
:''<disableac></disableac><br />
:Comma separated list of disabled anti-cheats.<br />
:e.g. To disable anti-cheat #2 and #3, use: 2,3<br />
:More information: [[Anti-cheat_guide|Anti-cheat guide]]<br />
<br />
====enablesd====<br />
:''<enablesd></enablesd><br />
:Comma seperated list of enabled special detections. A special detection is a type of anti-cheat for (usually) harmless game modifications. Competitive servers may wish to enable special detections, but most servers should leave this setting blank.<br />
:e.g. To enable special detection #12 (disallow custom D3D9.DLL) use: 12<br />
:More information: [[Anti-cheat_guide|Anti-cheat guide]]<br />
<br />
====networkencryption====<br />
:''<networkencryption>1</networkencryption><br />
:This parameter specifies whether communications between the server and client is encrypted. Encryption can help prevent network data being viewed and modified.<br />
:Values: 0 - disabled , 1 - enabled ; default value: 1. Optional parameter.<br />
:This parameter can changed and saved while the server is running with [[setServerConfigSetting]]<br />
<br />
====minclientversion====<br />
:''<minclientversion></minclientversion><br />
:Minimum client version. Clients with a lower version will not be allowed to connect. After disconnection, clients will be given an opportunity to download an update. If left blank, this setting is disabled and there are no restrictions on who can connect. Version numbers are described in [[getPlayerVersion]] and look like this: 1.1.0-9.03100.0<br />
:This parameter can changed and saved while the server is running with [[setServerConfigSetting]]<br />
:'''Note that this setting only determines if the client should be prompted to update. The actual build number they receive will be the [[http://nightly.mtasa.com/ver highest available]].'''<br />
<br />
{{New feature/item|3.0136|1.3.4|6023|<br />
====minclientversion_auto_update====<br />
:''<minclientversion_auto_update></minclientversion_auto_update><br />
:This parameter specifies if/when the <minclientversion> setting is automatically updated.<br />
:Keeping <minclientversion> updated can help reduce cheating.<br />
:Note: The instant setting (2) is only recommended for competitive servers.<br />
:Values: 0 - disabled, 1 - enabled (delayed by a few days), 2 - enabled (instant) ; default value: 1.<br />
}}<br />
<br />
====recommendedclientversion====<br />
:''<recommendedclientversion></recommendedclientversion><br />
:Recommended client version. When connecting, if clients have a lower version, they will be given the option to download an update. If left blank, this setting is disabled.<br />
:This parameter can changed and saved while the server is running with [[setServerConfigSetting]]<br />
:'''Note that this setting only determines if the client should be prompted to update. The actual build number they receive will be the [[http://nightly.mtasa.com/ver highest available]].'''<br />
<br />
====ase====<br />
:''<ase>1</ase><br />
:This parameter can be used to make the server report to Game-Monitor master servers, allowing it to be visible in the in-game server browser. An additional UDP port needs to be available for this to work (value from <serverport> + 123 , so on a default <serverport> value 22003 the right port will be 22126 ).<br />
:Available values: 0 - disabled , 1 - enabled. Optional parameter, defaults to 0.<br />
<br />
====donotbroadcastlan====<br />
:''<donotbroadcastlan>0</donotbroadcastlan><br />
:This parameter allows you to disable LAN broadcasting. <br />
<br />
====password====<br />
:''<password></password> <br />
:If set, players will have to provide a password specified below, before they can connect to the server. If left blank, server doesn't require a password from them.<br />
:This parameter can changed and saved while the server is running with [[setServerPassword]] or [[setServerConfigSetting]]<br />
<br />
====bandwidth_reduction====<br />
:''<bandwidth_reduction>medium</bandwidth_reduction> <br />
:This parameter reduces the server's bandwidth usage by using various optimizations.<br />
:Values: none, medium or maximum ; default value: medium<br />
:This parameter can be changed and saved while the server is running with [[setServerConfigSetting]]<br />
<br />
====unoccupied_vehicle_syncer_distance====<br />
:''<unoccupied_vehicle_syncer_distance>130</unoccupied_vehicle_syncer_distance> <br />
:This parameter determines the distance limit for remote synced unoccupied vehicles<br />
:Available range: 50 - 400; default value: 130<br />
:This parameter can be changed and saved while the server is running with [[setServerConfigSetting]]<br />
<br />
====ped_syncer_distance====<br />
:''<ped_syncer_distance>100</ped_syncer_distance> <br />
:This parameter determines the distance limit for remote synced peds<br />
:Available range: 50 - 400; default value: 100<br />
:This parameter can be changed and saved while the server is running with [[setServerConfigSetting]]<br />
<br />
====player_sync_interval====<br />
:''<player_sync_interval>100</player_sync_interval> <br />
:This parameter determines the time in milliseconds between player sync packets.<br />
:Available range: 50 - 500; default value: 100<br />
:This parameter can be changed and saved while the server is running with [[setServerConfigSetting]]<br />
:Suggested values for this and the other sync_interval settings can be found here: [[Sync_interval_settings|Sync interval settings]]<br />
<br />
====lightweight_sync_interval====<br />
:''<lightweight_sync_interval>1500</lightweight_sync_interval> <br />
:This parameter determines the time in milliseconds between lightweight (player) sync packets.<br />
:Available range: 200 - 40000; default value: 1500<br />
:This parameter can be changed and saved while the server is running with [[setServerConfigSetting]]<br />
:Suggested values for this and the other sync_interval settings can be found here: [[Sync_interval_settings|Sync interval settings]]<br />
<br />
====camera_sync_interval====<br />
:''<camera_sync_interval>500</camera_sync_interval> <br />
:This parameter determines the time in milliseconds between camera sync packets.<br />
:Available range: 200 - 400; default value: 500<br />
:This parameter can be changed and saved while the server is running with [[setServerConfigSetting]]<br />
:Suggested values for this and the other sync_interval settings can be found here: [[Sync_interval_settings|Sync interval settings]]<br />
<br />
====ped_sync_interval====<br />
:''<ped_sync_interval>400</ped_sync_interval> <br />
:This parameter determines the time in milliseconds between ped sync packets.<br />
:Available range: 200 - 4000; default value: 400<br />
:This parameter can be changed and saved while the server is running with [[setServerConfigSetting]]<br />
:Suggested values for this and the other sync_interval settings can be found here: [[Sync_interval_settings|Sync interval settings]]<br />
<br />
====unoccupied_vehicle_sync_interval====<br />
:''<unoccupied_vehicle_sync_interval>1000</unoccupied_vehicle_sync_interval> <br />
:This parameter determines the time in milliseconds between unoccupied vehicle sync packets.<br />
:Available range: 200 - 4000; default value: 1000<br />
:This parameter can be changed and saved while the server is running with [[setServerConfigSetting]]<br />
:Suggested values for this and the other sync_interval settings can be found here: [[Sync_interval_settings|Sync interval settings]]<br />
<br />
====keysync_mouse_sync_interval====<br />
:''<keysync_mouse_sync_interval>100</keysync_mouse_sync_interval> <br />
:This parameter determines the minimum time in milliseconds between key sync packets due to mouse movement.<br />
:Available range: 50 - 500; default value: 100<br />
:This parameter can be changed and saved while the server is running with [[setServerConfigSetting]]<br />
:Suggested values for this and the other sync_interval settings can be found here: [[Sync_interval_settings|Sync interval settings]]<br />
<br />
====keysync_analog_sync_interval====<br />
:''<keysync_analog_sync_interval>100</keysync_analog_sync_interval> <br />
:This parameter determines the minimum time in milliseconds between key sync packets due to joystick movement.<br />
:Available range: 50 - 500; default value: 100<br />
:This parameter can be changed and saved while the server is running with [[setServerConfigSetting]]<br />
:Suggested values for this and the other sync_interval settings can be found here: [[Sync_interval_settings|Sync interval settings]]<br />
<br />
====bullet_sync====<br />
:''<bullet_sync>0</bullet_sync> <br />
:This parameter can improve the reliability of shots when using certain weapons. However, it uses more bandwidth.<br />
:Note that bullet sync will be active regardless of this setting when certain [[setGlitchEnabled|glitches]] are enabled.<br />
:Values: 0 - disabled , 1 - enabled ; default value: 0.<br />
:This parameter can be changed and saved while the server is running with [[setServerConfigSetting]]<br />
<br />
====vehext_percent====<br />
:''<vehext_percent>0</vehext_percent><br />
:This parameter sets the amount of extrapolation that clients will apply to remote vehicles. <br />
:This can reduce some of the latency induced location disparency by predicting where the remote vehicles will probably be.<br />
:Depending on the gamemode, an incorrect prediction may have a negative effect. <br />
:Therefore this setting should be considered experimental.<br />
:Available range: 0 to 100. Default - 0 --><br />
<br />
====vehext_ping_limit====<br />
:''<vehext_ping_limit>150</vehext_ping_limit><br />
:This parameter places a limit on how much time (in milliseconds) the vehicle extrapolation will attempt to compensate for.<br />
:Only relevant if <vehext_percent> is greater than zero.<br />
:Available range: 50 to 500. Default - 150<br />
<br />
====latency_reduction====<br />
:''<latency_reduction>0</latency_reduction><br />
:This parameter can reduce the delay of player actions appearing on remote clients by 2 frames (approx 50ms).<br />
:Due to the impact this may have on shot lag compensation, it should be considered experimental.<br />
:Values: 0 - disabled , 1 - enabled ; default value: 0.<br />
:Bugs caused by enabling latency_reduction: http://bugs.mtasa.com/view.php?id=8191 + http://bugs.mtasa.com/view.php?id=8226<br />
<br />
====threadnet====<br />
<!--:''<threadnet>1</threadnet>--><!-- missing from MTA:SA config --><br />
:This parameter specifies whether or not to run the network synchronization on another thread.<br />
:Enabling will make the sync smoother, but may increase CPU usage slightly.<br />
:Values: 0 - disabled , 1 - enabled ; default value: 1.<br />
:This parameter can be changed and saved while the server is running with [[setServerConfigSetting]]<br />
<br />
====idfile====<br />
:''<idfile>server-id.keys</idfile> <br />
:Specifies the location and file name of this servers unique private key. This is used to prevent private files saved on the client from being read by other servers. <br />
:Keep a backup of this file in a safe place. Default value: server-id.keys<br />
:More information about client private files: [[Filepath]]<br />
<br />
====logfile====<br />
:''<logfile>logs/server.log</logfile><br />
:Specifies the location and name of the main server log file. If left blank, server won't be saving this file.<br />
<br />
====authfile====<br />
:''<authfile>logs/server_auth.log</authfile><br />
:As well as the main log file, login successes and failures are logged here for easy reviewing of security issues. If left blank, this file is not used<br />
<br />
====dbfile====<br />
:''<dbfile>logs/db.log</dbfile><br />
:Specifies the location and name of the file used to log database queries. The server command [[Server_Commands#debugdb|debugdb]] sets the amount of logging.<br />
<br />
{{New feature/item|3.0136|1.3.4|5809|<br />
====loadstringfile====<br />
:''<nowiki><!-- <loadstringfile>logs/loadstring.log</loadstringfile> --></nowiki><br />
:Specifies the location and name of the file used to log loadstring function calls. If left blank or not set, no logging is done.<br />
}}<br />
<br />
====acl====<br />
:''<acl>acl.xml</acl> <br />
:This parameter specifies the location and name of the Access Control List settings file. If left<br />
:blank, server will use acl.xml file, located in the same folder as this configuration file.<br />
<br />
====scriptdebuglogfile====<br />
:''<scriptdebuglogfile>logs/scripts.log</scriptdebuglogfile> <br />
:Specifies the location and name of the debugscript log file. If left blank, server won't be saving this file.<br />
<br />
====scriptdebugloglevel====<br />
:''<scriptdebugloglevel>0</scriptdebugloglevel><br />
:Specifies the level of the debugscript log file. Available values: 0, 1, 2, 3. When not set, defaults to 0.<br />
<br />
====fpslimit====<br />
:''<fpslimit>36</fpslimit><br />
:Specifies the frame rate limit that will be applied to connecting clients.<br />
:Available range: 25 to 100. Default: 36.<br />
:When running the map editor locally (i.e. from the client), the default FPS limit is 50.<br />
:This parameter can be changed and saved while the server is running with [[setServerConfigSetting]]<br />
<br />
====voice====<br />
:''<voice>0</voice><br />
:This parameter specifies whether or not to enable player voice chat in-game<br />
:Values: 0 - disabled , 1 - enabled<br />
<br />
====voice_samplerate====<br />
:''<voice_samplerate>1</voice_samplerate><br />
:This parameter specifies the sample rate for voice chat. 'voice' parameter must be set to 1 for this to be effective. Higher settings use more bandwidth and increase the sampling quality of voice chat<br />
:Values: 0 - Narrowband (8kHz), 1 - Wideband (16kHz), 2 - Ultrawideband (32kHz). Default - 1<br />
<br />
====voice_quality====<br />
:''<voice_quality>4</voice_quality><br />
:This parameter specifies the voice quality for voice chat. 'voice' parameter must be set to 1 for this to be effective. Higher settings use more bandwidth and increase the the overall quality of voice chat<br />
:Available range: 0 to 10. Default - 4<br />
<br />
====voice_bitrate====<br />
:''<nowiki><!-- <voice_bitrate>24600</voice_bitrate> --></nowiki><br />
:Specifies the voice bitrate, in bps. This optional parameter overrides the previous two settings. If not set, MTA handles this automatically. Use with care.<br />
<br />
====backup_path====<br />
:''<backup_path>backups</backup_path><br />
:This parameter specifies the path to use for a basic backup of some server files. Note that basic backups are only made during server startup. Default value: backups<br />
<br />
====backup_interval====<br />
:''<backup_interval>3</backup_interval><br />
:This parameter specifies the number of days between each basic backup. Backups are only made during server startup, so the actual interval maybe much longer. Setting backup_interval to 0 will disable backups<br />
:Available range: 0 to 30. Default - 3<br />
<br />
====backup_copies====<br />
:''<backup_copies>5</backup_copies><br />
:This parameter specifies the maximum number of backup copies to keep. Setting backup_copies to 0 will disable backups<br />
:Available range: 0 to 100. Default - 5<br />
<br />
====compact_internal_databases====<br />
:''<compact_internal_databases>1</compact_internal_databases><br />
:This parameter specifies when the internal sqlite databases should be defragmented.<br />
:For more info see: http://www.sqlite.org/lang_vacuum.html<br />
:Values: 0 - Never, 1 - On server start only after basic backup, 2 - On server start always. Default - 1<br />
<br />
====crash_dump_upload====<br />
:''<crash_dump_upload>1</crash_dump_upload><br />
:This parameter specifies whether server crash dump files should be sent to MTA HQ.<br />
:Values: 0 - Off, 1 - On. Default - 1<br />
<br />
====fakelag====<br />
:''<fakelag>0</fakelag><br />
:This parameter specifies whether the [[Command fakelag|fakelag and sfakelag]] commands are enabled<br />
:Values: 0 - Off, 1 - On. Default - 0<br />
<br />
====auth_serial_groups====<br />
:''<auth_serial_groups>Admin</auth_serial_groups><br />
:This parameter lists the ACL groups that are protected by serial authorization.<br />
:Login attempts to a protected account from a second serial are blocked until the serial is manually authorized via the authserial command.<br />
:For more info see: https://mtasa.com/authserial<br />
:Values: Comma separated list of ACL groups. Default - Admin<br />
<br />
====auth_serial_http====<br />
:''<auth_serial_http>1</auth_serial_http><br />
:This parameter specifies if the authorized serial login checks should also apply to the http interface.<br />
:Protected account login attempts to the http interface will only succeed if the IP address matches one recently used by the account holder in-game.<br />
:For more info see: https://mtasa.com/authserialhttp<br />
:Values: 0 - Off, 1 - Enabled. Default - 1<br />
<br />
====database_credentials_protection====<br />
:''<database_credentials_protection>1</database_credentials_protection><br />
:This parameter specifies if extra security measures are applied to resources which use [[dbConnect]] with MySQL.<br />
:The extra measures are:<br />
: - script files cannot be accessed with [[fileOpen]]<br />
: - [[meta.xml]] is read-only<br />
:'''NOTE:''' This only protects resources which use [[dbConnect]] with MySQL.<br />
:Values: 0 - Off, 1 - Enabled. Default - 1<br />
<br />
====module====<br />
:''<nowiki><!-- <module src="sample_win32.dll" /> --></nowiki><br />
:''<nowiki><!-- <module src="sample_linux.so" /> --></nowiki><br />
:Specifies the module(s) which are loaded with the server. To load several modules, add more <module> parameter(s). Optional parameter.<br />
<br />
====resource====<br />
:''<resource src="admin" startup="1" protected="0" /><br />
:''<resource src="defaultstats" startup="1" protected="0" /><br />
:''<resource src="helpmanager" startup="1" protected="0" /><br />
:''<resource src="joinquit" startup="1" protected="0" /><br />
:''<resource src="mapcycler" startup="1" protected="0" /><br />
:''<resource src="mapmanager" startup="1" protected="0" /><br />
:''<resource src="parachute" startup="1" protected="0" /><br />
:''<resource src="resourcebrowser" startup="1" protected="1" default="true" /><br />
:''<resource src="resourcemanager" startup="1" protected="1" /><br />
:''<resource src="scoreboard" startup="1" protected="0" /><br />
:''<resource src="spawnmanager" startup="1" protected="0" /><br />
:''<resource src="voice" startup="1" protected="0" /><br />
:''<resource src="votemanager" startup="1" protected="0" /><br />
:''<resource src="webadmin" startup="1" protected="0" /><br />
:''<resource src="play" startup="1" protected="0" /><br />
<br />
:Specifies persistent resources which are loaded when the server starts. Persistent resources are not stopped even if all the other resources that depend on them stop; that is, the only way to stop them is by explicitly using the ''stop'' server command or [[stopResource]] scripting function. To load several resources, add more <resource> parameters.<br />
<br />
:In addition, there are several flags which control how the server deals with each resource:<br />
<br />
:* '''src''': the resource name. This is the only mandatory flag.<br />
:* '''startup''': controls whether the resource will be started with the server or not. If "1", "true" or "yes", the resource will be started. If not specified, defaults to not starting the resource.<br />
:* '''protected''': if "1", "true" or "yes", the resource will not be able to be stopped when started. Otherwise, even if not specified, it will default to the normal behaviour.<br />
:* '''default''': if given a "1", "true" or "yes" value, this resource will be the one who populates the built-in HTTP server main page, which is seen when no resource is given in the web address. It is not possible to have more than one default resource.<br />
<br />
[[Category: Support]]<br />
[[ru:Server mtaserver.conf]]</div>Ccwhttps://wiki.multitheftauto.com/index.php?title=Server_mtaserver.conf&diff=54098Server mtaserver.conf2018-03-07T03:27:33Z<p>Ccw: </p>
<hr />
<div>This page lists the settings that can be set in the settings file. ''Setting from the default '''mtaserver.conf''' settings file is in italics''.<br />
<br />
<br />
====servername====<br />
:''<servername>Default MTA Server</servername>''<br />
:This parameter specifies the name the server will be visible as in the ingame server browser and on Game-Monitor. It is a required parameter.<br />
<br />
====serverip====<br />
:''<serverip>auto</serverip><br />
:'''ONLY USE THIS PARAMETER IF YOU ARE SURE OF WHAT YOU ARE DOING''' - it is generally only needed for professional servers and should be left at the default value otherwise.<br />
: This parameter specifies the IP to use for servers that have multiple IP addresses. If set to auto, it will automatically detect and use the server's standard local IP address.<br />
:Values: auto or x.x.x.x ; default value: auto --><br />
:SERVERIP SHOULD BE LEFT SET TO auto UNLESS YOU ARE SURE OF WHAT YOU ARE DOING<br />
:WARNING: SETTING serverip AND THEN ASKING FOR SUPPORT CAN CAUSE DEATH OR INJURY<br />
<br />
====serverport====<br />
:''<serverport>22003</serverport> <br />
:This parameter specifies the UDP port on which the server will be accepting incoming player connections;<br />
:default value: 22003. It is a required parameter.<br />
<br />
====maxplayers====<br />
:''<maxplayers>32</maxplayers><br />
:This parameter specifies the number of maximum player slots available on the server;<br />
:default value: 32. It is a required parameter.<br />
<br />
====httpserver====<br />
:''<httpserver>1</httpserver><br />
:This parameter specifies whether the built-in http server will be used.<br />
:Values: 0 - disabled , 1 - enabled ; default value: 1. Optional parameter.<br />
:More information: [[Server_Manual#Using_the_web_interface|Using the web interface]]<br />
<br />
====httpport====<br />
:''<httpport>22005</httpport><br />
:This parameter specifies the TCP port on which the server will be accepting incoming http connections. It can be set to the same value as <serverport>. It is a required parameter if <httpserver> is set to 1.<br />
:More information: [[Server_Manual#Using_the_web_interface|Using the web interface]]<br />
<br />
====httpdownloadurl====<br />
:''<httpdownloadurl></httpdownloadurl><br />
:If set, this parameter specifies the external URL from which clients will be able to download needed resources ingame. Otherwise they will download them directly from the server.<br />
:More information: [[Server_Manual#Configuring_an_external_web_server|Configuring an external web server]]<br />
<br />
====httpmaxconnectionsperclient====<br />
:''<httpmaxconnectionsperclient>5</httpmaxconnectionsperclient><br />
:This parameter limits the number of http connections each client can make. Depending on the type of http server that is used, a lower figure may reduce download timeouts. Only relevant when using an external http server.<br />
:Available range: 1 to 8.<br />
<br />
====httpdosthreshold====<br />
:''<httpdosthreshold>20</httpdosthreshold><br />
:This parameter limits the number http connections that an IP can initiate over a short period of time.<br />
:Available range: 1 to 100. default value: 20<br />
<br />
{{New feature/item|3.0136|1.3.5|6301|<br />
====http_dos_exclude====<br />
:''<http_dos_exclude></http_dos_exclude><br />
:This parameter lists the IP addresses that are to be excluded from http dos threshold limits.<br />
:e.g. 88.11.22.33,101.2.3.4<br />
}}<br />
<br />
====allow_gta3_img_mods====<br />
:''<allow_gta3_img_mods>none</allow_gta3_img_mods><br />
:By default, the server will block the use of locally customized gta3.img player skins. <br />
:This setting can be used to allow such mods. Not recommended for competitive servers.<br />
:Values: none, peds; default value: none<br />
<br />
====client_file====<br />
:''<nowiki><!-- <client_file name="data/carmods.dat" verify="0" /> --></nowiki><br />
:By default, the server will block the use of customized GTA:SA data files.<br />
:To allow specific client files, add one or more of the above lines.<br />
:More information: [[Anti-cheat_guide|Anti-cheat guide]]<br />
<br />
====disableac====<br />
:''<disableac></disableac><br />
:Comma separated list of disabled anti-cheats.<br />
:e.g. To disable anti-cheat #2 and #3, use: 2,3<br />
:More information: [[Anti-cheat_guide|Anti-cheat guide]]<br />
<br />
====enablesd====<br />
:''<enablesd></enablesd><br />
:Comma seperated list of enabled special detections. A special detection is a type of anti-cheat for (usually) harmless game modifications. Competitive servers may wish to enable special detections, but most servers should leave this setting blank.<br />
:e.g. To enable special detection #12 (disallow custom D3D9.DLL) use: 12<br />
:More information: [[Anti-cheat_guide|Anti-cheat guide]]<br />
<br />
====networkencryption====<br />
:''<networkencryption>1</networkencryption><br />
:This parameter specifies whether communications between the server and client is encrypted. Encryption can help prevent network data being viewed and modified.<br />
:Values: 0 - disabled , 1 - enabled ; default value: 1. Optional parameter.<br />
:This parameter can changed and saved while the server is running with [[setServerConfigSetting]]<br />
<br />
====minclientversion====<br />
:''<minclientversion></minclientversion><br />
:Minimum client version. Clients with a lower version will not be allowed to connect. After disconnection, clients will be given an opportunity to download an update. If left blank, this setting is disabled and there are no restrictions on who can connect. Version numbers are described in [[getPlayerVersion]] and look like this: 1.1.0-9.03100.0<br />
:This parameter can changed and saved while the server is running with [[setServerConfigSetting]]<br />
:'''Note that this setting only determines if the client should be prompted to update. The actual build number they receive will be the [[http://nightly.mtasa.com/ver highest available]].'''<br />
<br />
{{New feature/item|3.0136|1.3.4|6023|<br />
====minclientversion_auto_update====<br />
:''<minclientversion_auto_update></minclientversion_auto_update><br />
:This parameter specifies if/when the <minclientversion> setting is automatically updated.<br />
:Keeping <minclientversion> updated can help reduce cheating.<br />
:Note: The instant setting (2) is only recommended for competitive servers.<br />
:Values: 0 - disabled, 1 - enabled (delayed by a few days), 2 - enabled (instant) ; default value: 1.<br />
}}<br />
<br />
====recommendedclientversion====<br />
:''<recommendedclientversion></recommendedclientversion><br />
:Recommended client version. When connecting, if clients have a lower version, they will be given the option to download an update. If left blank, this setting is disabled.<br />
:This parameter can changed and saved while the server is running with [[setServerConfigSetting]]<br />
:'''Note that this setting only determines if the client should be prompted to update. The actual build number they receive will be the [[http://nightly.mtasa.com/ver highest available]].'''<br />
<br />
====ase====<br />
:''<ase>1</ase><br />
:This parameter can be used to make the server report to Game-Monitor master servers, allowing it to be visible in the in-game server browser. An additional UDP port needs to be available for this to work (value from <serverport> + 123 , so on a default <serverport> value 22003 the right port will be 22126 ).<br />
:Available values: 0 - disabled , 1 - enabled. Optional parameter, defaults to 0.<br />
<br />
====donotbroadcastlan====<br />
:''<donotbroadcastlan>0</donotbroadcastlan><br />
:This parameter allows you to disable LAN broadcasting. <br />
<br />
====password====<br />
:''<password></password> <br />
:If set, players will have to provide a password specified below, before they can connect to the server. If left blank, server doesn't require a password from them.<br />
:This parameter can changed and saved while the server is running with [[setServerPassword]] or [[setServerConfigSetting]]<br />
<br />
====bandwidth_reduction====<br />
:''<bandwidth_reduction>medium</bandwidth_reduction> <br />
:This parameter reduces the server's bandwidth usage by using various optimizations.<br />
:Values: none, medium or maximum ; default value: medium<br />
:This parameter can be changed and saved while the server is running with [[setServerConfigSetting]]<br />
<br />
====unoccupied_vehicle_syncer_distance====<br />
:''<unoccupied_vehicle_syncer_distance>130</unoccupied_vehicle_syncer_distance> <br />
:This parameter determines the distance limit for remote synced unoccupied vehicles<br />
:Available range: 50 - 400; default value: 130<br />
:This parameter can be changed and saved while the server is running with [[setServerConfigSetting]]<br />
<br />
====ped_syncer_distance====<br />
:''<ped_syncer_distance>100</ped_syncer_distance> <br />
:This parameter determines the distance limit for remote synced peds<br />
:Available range: 50 - 400; default value: 100<br />
:This parameter can be changed and saved while the server is running with [[setServerConfigSetting]]<br />
<br />
====player_sync_interval====<br />
:''<player_sync_interval>100</player_sync_interval> <br />
:This parameter determines the time in milliseconds between player sync packets.<br />
:Available range: 50 - 500; default value: 100<br />
:This parameter can be changed and saved while the server is running with [[setServerConfigSetting]]<br />
:Suggested values for this and the other sync_interval settings can be found here: [[Sync_interval_settings|Sync interval settings]]<br />
<br />
====lightweight_sync_interval====<br />
:''<lightweight_sync_interval>1500</lightweight_sync_interval> <br />
:This parameter determines the time in milliseconds between lightweight (player) sync packets.<br />
:Available range: 200 - 40000; default value: 1500<br />
:This parameter can be changed and saved while the server is running with [[setServerConfigSetting]]<br />
:Suggested values for this and the other sync_interval settings can be found here: [[Sync_interval_settings|Sync interval settings]]<br />
<br />
====camera_sync_interval====<br />
:''<camera_sync_interval>500</camera_sync_interval> <br />
:This parameter determines the time in milliseconds between camera sync packets.<br />
:Available range: 200 - 400; default value: 500<br />
:This parameter can be changed and saved while the server is running with [[setServerConfigSetting]]<br />
:Suggested values for this and the other sync_interval settings can be found here: [[Sync_interval_settings|Sync interval settings]]<br />
<br />
====ped_sync_interval====<br />
:''<ped_sync_interval>400</ped_sync_interval> <br />
:This parameter determines the time in milliseconds between ped sync packets.<br />
:Available range: 200 - 4000; default value: 400<br />
:This parameter can be changed and saved while the server is running with [[setServerConfigSetting]]<br />
:Suggested values for this and the other sync_interval settings can be found here: [[Sync_interval_settings|Sync interval settings]]<br />
<br />
====unoccupied_vehicle_sync_interval====<br />
:''<unoccupied_vehicle_sync_interval>1000</unoccupied_vehicle_sync_interval> <br />
:This parameter determines the time in milliseconds between unoccupied vehicle sync packets.<br />
:Available range: 200 - 4000; default value: 1000<br />
:This parameter can be changed and saved while the server is running with [[setServerConfigSetting]]<br />
:Suggested values for this and the other sync_interval settings can be found here: [[Sync_interval_settings|Sync interval settings]]<br />
<br />
====keysync_mouse_sync_interval====<br />
:''<keysync_mouse_sync_interval>100</keysync_mouse_sync_interval> <br />
:This parameter determines the minimum time in milliseconds between key sync packets due to mouse movement.<br />
:Available range: 50 - 500; default value: 100<br />
:This parameter can be changed and saved while the server is running with [[setServerConfigSetting]]<br />
:Suggested values for this and the other sync_interval settings can be found here: [[Sync_interval_settings|Sync interval settings]]<br />
<br />
====keysync_analog_sync_interval====<br />
:''<keysync_analog_sync_interval>100</keysync_analog_sync_interval> <br />
:This parameter determines the minimum time in milliseconds between key sync packets due to joystick movement.<br />
:Available range: 50 - 500; default value: 100<br />
:This parameter can be changed and saved while the server is running with [[setServerConfigSetting]]<br />
:Suggested values for this and the other sync_interval settings can be found here: [[Sync_interval_settings|Sync interval settings]]<br />
<br />
====bullet_sync====<br />
:''<bullet_sync>0</bullet_sync> <br />
:This parameter can improve the reliability of shots when using certain weapons. However, it uses more bandwidth.<br />
:Note that bullet sync will be active regardless of this setting when certain [[setGlitchEnabled|glitches]] are enabled.<br />
:Values: 0 - disabled , 1 - enabled ; default value: 0.<br />
:This parameter can be changed and saved while the server is running with [[setServerConfigSetting]]<br />
<br />
====vehext_percent====<br />
:''<vehext_percent>0</vehext_percent><br />
:This parameter sets the amount of extrapolation that clients will apply to remote vehicles. <br />
:This can reduce some of the latency induced location disparency by predicting where the remote vehicles will probably be.<br />
:Depending on the gamemode, an incorrect prediction may have a negative effect. <br />
:Therefore this setting should be considered experimental.<br />
:Available range: 0 to 100. Default - 0 --><br />
<br />
====vehext_ping_limit====<br />
:''<vehext_ping_limit>150</vehext_ping_limit><br />
:This parameter places a limit on how much time (in milliseconds) the vehicle extrapolation will attempt to compensate for.<br />
:Only relevant if <vehext_percent> is greater than zero.<br />
:Available range: 50 to 500. Default - 150<br />
<br />
====latency_reduction====<br />
:''<latency_reduction>0</latency_reduction><br />
:This parameter can reduce the delay of player actions appearing on remote clients by 2 frames (approx 50ms).<br />
:Due to the impact this may have on shot lag compensation, it should be considered experimental.<br />
:Values: 0 - disabled , 1 - enabled ; default value: 0.<br />
:Bugs caused by enabling latency_reduction: http://bugs.mtasa.com/view.php?id=8191 + http://bugs.mtasa.com/view.php?id=8226<br />
<br />
====threadnet====<br />
<!--:''<threadnet>1</threadnet>--><!-- missing from MTA:SA config --><br />
:This parameter specifies whether or not to run the network synchronization on another thread.<br />
:Enabling will make the sync smoother, but may increase CPU usage slightly.<br />
:Values: 0 - disabled , 1 - enabled ; default value: 1.<br />
:This parameter can be changed and saved while the server is running with [[setServerConfigSetting]]<br />
<br />
====idfile====<br />
:''<idfile>server-id.keys</idfile> <br />
:Specifies the location and file name of this servers unique private key. This is used to prevent private files saved on the client from being read by other servers. <br />
:Keep a backup of this file in a safe place. Default value: server-id.keys<br />
:More information about client private files: [[Filepath]]<br />
<br />
====logfile====<br />
:''<logfile>logs/server.log</logfile><br />
:Specifies the location and name of the main server log file. If left blank, server won't be saving this file.<br />
<br />
====authfile====<br />
:''<authfile>logs/server_auth.log</authfile><br />
:As well as the main log file, login successes and failures are logged here for easy reviewing of security issues. If left blank, this file is not used<br />
<br />
====dbfile====<br />
:''<dbfile>logs/db.log</dbfile><br />
:Specifies the location and name of the file used to log database queries. The server command [[Server_Commands#debugdb|debugdb]] sets the amount of logging.<br />
<br />
{{New feature/item|3.0136|1.3.4|5809|<br />
====loadstringfile====<br />
:''<nowiki><!-- <loadstringfile>logs/loadstring.log</loadstringfile> --></nowiki><br />
:Specifies the location and name of the file used to log loadstring function calls. If left blank or not set, no logging is done.<br />
}}<br />
<br />
====acl====<br />
:''<acl>acl.xml</acl> <br />
:This parameter specifies the location and name of the Access Control List settings file. If left<br />
:blank, server will use acl.xml file, located in the same folder as this configuration file.<br />
<br />
====scriptdebuglogfile====<br />
:''<scriptdebuglogfile>logs/scripts.log</scriptdebuglogfile> <br />
:Specifies the location and name of the debugscript log file. If left blank, server won't be saving this file.<br />
<br />
====scriptdebugloglevel====<br />
:''<scriptdebugloglevel>0</scriptdebugloglevel><br />
:Specifies the level of the debugscript log file. Available values: 0, 1, 2, 3. When not set, defaults to 0.<br />
<br />
====fpslimit====<br />
:''<fpslimit>36</fpslimit><br />
:Specifies the frame rate limit that will be applied to connecting clients.<br />
:Available range: 25 to 100. Default: 36.<br />
:When running the map editor locally (i.e. from the client), the default FPS limit is 50.<br />
:This parameter can be changed and saved while the server is running with [[setServerConfigSetting]]<br />
<br />
====voice====<br />
:''<voice>0</voice><br />
:This parameter specifies whether or not to enable player voice chat in-game<br />
:Values: 0 - disabled , 1 - enabled<br />
<br />
====voice_samplerate====<br />
:''<voice_samplerate>1</voice_samplerate><br />
:This parameter specifies the sample rate for voice chat. 'voice' parameter must be set to 1 for this to be effective. Higher settings use more bandwidth and increase the sampling quality of voice chat<br />
:Values: 0 - Narrowband (8kHz), 1 - Wideband (16kHz), 2 - Ultrawideband (32kHz). Default - 1<br />
<br />
====voice_quality====<br />
:''<voice_quality>4</voice_quality><br />
:This parameter specifies the voice quality for voice chat. 'voice' parameter must be set to 1 for this to be effective. Higher settings use more bandwidth and increase the the overall quality of voice chat<br />
:Available range: 0 to 10. Default - 4<br />
<br />
====voice_bitrate====<br />
:''<nowiki><!-- <voice_bitrate>24600</voice_bitrate> --></nowiki><br />
:Specifies the voice bitrate, in bps. This optional parameter overrides the previous two settings. If not set, MTA handles this automatically. Use with care.<br />
<br />
====backup_path====<br />
:''<backup_path>backups</backup_path><br />
:This parameter specifies the path to use for a basic backup of some server files. Note that basic backups are only made during server startup. Default value: backups<br />
<br />
====backup_interval====<br />
:''<backup_interval>3</backup_interval><br />
:This parameter specifies the number of days between each basic backup. Backups are only made during server startup, so the actual interval maybe much longer. Setting backup_interval to 0 will disable backups<br />
:Available range: 0 to 30. Default - 3<br />
<br />
====backup_copies====<br />
:''<backup_copies>5</backup_copies><br />
:This parameter specifies the maximum number of backup copies to keep. Setting backup_copies to 0 will disable backups<br />
:Available range: 0 to 100. Default - 5<br />
<br />
====compact_internal_databases====<br />
:''<compact_internal_databases>1</compact_internal_databases><br />
:This parameter specifies when the internal sqlite databases should be defragmented.<br />
:For more info see: http://www.sqlite.org/lang_vacuum.html<br />
:Values: 0 - Never, 1 - On server start only after basic backup, 2 - On server start always. Default - 1<br />
<br />
====crash_dump_upload====<br />
:''<crash_dump_upload>1</crash_dump_upload><br />
:This parameter specifies whether server crash dump files should be sent to MTA HQ.<br />
:Values: 0 - Off, 1 - On. Default - 1<br />
<br />
====fakelag====<br />
:''<fakelag>0</fakelag><br />
:This parameter specifies whether the [[Command fakelag|fakelag and sfakelag]] commands are enabled<br />
:Values: 0 - Off, 1 - On. Default - 0<br />
<br />
====auth_serial_groups====<br />
:''<auth_serial_groups>Admin</auth_serial_groups><br />
:This parameter lists the ACL groups that are protected by serial authorization.<br />
:Login attempts to a protected account from a second serial are blocked until the serial is manually authorized via the authserial command.<br />
:For more info see: https://mtasa.com/authserial<br />
:Values: Comma separated list of ACL groups. Default - Admin<br />
<br />
====auth_serial_http====<br />
:''<auth_serial_http>1</auth_serial_http><br />
:This parameter specifies if the authorized serial login checks should also apply to the http interface.<br />
:Protected account login attempts to the http interface will only succeed if the IP address matches one recently used by the account holder in-game.<br />
:For more info see: https://mtasa.com/authserialhttp<br />
:Values: 0 - Off, 1 - Enabled. Default - 1<br />
<br />
====database_credentials_protection====<br />
:''<database_credentials_protection>1</database_credentials_protection><br />
:This parameter specifies if extra security measures are applied to resources which use [[dbConnect]] with MySQL.<br />
:The extra measures are:<br />
: - script files cannot be accessed with [[fileOpen]]<br />
: - [[meta.xml]] is read-only<br />
:'''NOTE:''' This only protects resources which use [[dbConnect]] with MySQL.<br />
:Values: 0 - Off, 1 - Enabled. Default - 1<br />
<br />
====module====<br />
:''<nowiki><!-- <module src="sample_win32.dll" /> --></nowiki><br />
:''<nowiki><!-- <module src="sample_linux.so" /> --></nowiki><br />
:Specifies the module(s) which are loaded with the server. To load several modules, add more <module> parameter(s). Optional parameter.<br />
<br />
====resource====<br />
:''<resource src="admin" startup="1" protected="0" /><br />
:''<resource src="defaultstats" startup="1" protected="0" /><br />
:''<resource src="helpmanager" startup="1" protected="0" /><br />
:''<resource src="joinquit" startup="1" protected="0" /><br />
:''<resource src="mapcycler" startup="1" protected="0" /><br />
:''<resource src="mapmanager" startup="1" protected="0" /><br />
:''<resource src="parachute" startup="1" protected="0" /><br />
:''<resource src="resourcebrowser" startup="1" protected="1" default="true" /><br />
:''<resource src="resourcemanager" startup="1" protected="1" /><br />
:''<resource src="scoreboard" startup="1" protected="0" /><br />
:''<resource src="spawnmanager" startup="1" protected="0" /><br />
:''<resource src="voice" startup="1" protected="0" /><br />
:''<resource src="votemanager" startup="1" protected="0" /><br />
:''<resource src="webadmin" startup="1" protected="0" /><br />
:''<resource src="play" startup="1" protected="0" /><br />
<br />
:Specifies persistent resources which are loaded when the server starts. Persistent resources are not stopped even if all the other resources that depend on them stop; that is, the only way to stop them is by explicitly using the ''stop'' server command or [[stopResource]] scripting function. To load several resources, add more <resource> parameters.<br />
<br />
:In addition, there are several flags which control how the server deals with each resource:<br />
<br />
:* '''src''': the resource name. This is the only mandatory flag.<br />
:* '''startup''': controls whether the resource will be started with the server or not. If "1", "true" or "yes", the resource will be started. If not specified, defaults to not starting the resource.<br />
:* '''protected''': if "1", "true" or "yes", the resource will not be able to be stopped when started. Otherwise, even if not specified, it will default to the normal behaviour.<br />
:* '''default''': if given a "1", "true" or "yes" value, this resource will be the one who populates the built-in HTTP server main page, which is seen when no resource is given in the web address. It is not possible to have more than one default resource.<br />
<br />
[[Category: Support]]<br />
[[ru:Server mtaserver.conf]]</div>Ccwhttps://wiki.multitheftauto.com/index.php?title=Key_names&diff=53866Key names2018-02-03T07:42:29Z<p>Ccw: </p>
<hr />
<div>This page lists all the key names. Except for ''''''escape'''''', they can all be used by the console commands ''bind'' and ''unbind'' as well as the script functions [[bindKey]] and [[unbindKey]].<br />
<br />
Lua table of all the valid key names listed on this page:<br />
<syntaxhighlight lang="lua">keyTable = { "mouse1", "mouse2", "mouse3", "mouse4", "mouse5", "mouse_wheel_up", "mouse_wheel_down", "arrow_l", "arrow_u",<br />
"arrow_r", "arrow_d", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k",<br />
"l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "num_0", "num_1", "num_2", "num_3", "num_4", "num_5",<br />
"num_6", "num_7", "num_8", "num_9", "num_mul", "num_add", "num_sep", "num_sub", "num_div", "num_dec", "num_enter", "F1", "F2", "F3", "F4", "F5",<br />
"F6", "F7", "F8", "F9", "F10", "F11", "F12", "escape", "backspace", "tab", "lalt", "ralt", "enter", "space", "pgup", "pgdn", "end", "home",<br />
"insert", "delete", "lshift", "rshift", "lctrl", "rctrl", "[", "]", "pause", "capslock", "scroll", ";", ",", "-", ".", "/", "#", "\\", "=" }</syntaxhighlight><br />
<br />
<br />
<div style="border:3px solid green;margin-bottom:3px;"><div style="float:right;padding-right:5px;font-weight:bold;">MOUSE</div><br />
* '''mouse1''' ''(This is left click)''<br />
* '''mouse2''' ''(This is right click)''<br />
* '''mouse3''' ''(This is the middle mouse button)''<br />
* '''mouse4''' <br />
* '''mouse5'''<br />
* '''mouse_wheel_up'''<br />
* '''mouse_wheel_down'''<br />
</div><br />
<div style="border:3px solid red;margin-bottom:3px;"><div style="float:right;padding-right:5px;font-weight:bold;">ARROW KEYS</div><br />
* '''arrow_l'''<br />
* '''arrow_u'''<br />
* '''arrow_r'''<br />
* '''arrow_d'''<br />
</div><br />
<div style="border:3px solid blue;margin-bottom:3px;"><div style="float:right;padding-right:5px;font-weight:bold;">NUMBERS</div><br />
* '''0'''<br />
* '''1'''<br />
* '''2'''<br />
* '''3'''<br />
* '''4'''<br />
* '''5'''<br />
* '''6'''<br />
* '''7'''<br />
* '''8'''<br />
* '''9'''<br />
</div><br />
<div style="border:3px solid orange;margin-bottom:3px;"><div style="float:right;padding-right:5px;font-weight:bold;">LETTERS</div><br />
* '''a'''<br />
* '''b'''<br />
* '''c'''<br />
* '''d'''<br />
* '''e'''<br />
* '''f'''<br />
* '''g'''<br />
* '''h'''<br />
* '''i'''<br />
* '''j'''<br />
* '''k'''<br />
* '''l'''<br />
* '''m'''<br />
* '''n'''<br />
* '''o'''<br />
* '''p'''<br />
* '''q'''<br />
* '''r'''<br />
* '''s'''<br />
* '''t'''<br />
* '''u'''<br />
* '''v'''<br />
* '''w'''<br />
* '''x'''<br />
* '''y'''<br />
* '''z'''<br />
</div><br />
<div style="border:3px solid yellow;margin-bottom:3px;"><div style="float:right;padding-right:5px;font-weight:bold;">NUMERIC KEYPAD</div><br />
* '''num_0'''<br />
* '''num_1'''<br />
* '''num_2'''<br />
* '''num_3'''<br />
* '''num_4'''<br />
* '''num_5'''<br />
* '''num_6'''<br />
* '''num_7'''<br />
* '''num_8'''<br />
* '''num_9'''<br />
* '''num_mul'''<br />
* '''num_add'''<br />
* '''num_sep'''<br />
* '''num_sub'''<br />
* '''num_div'''<br />
* '''num_dec'''<br />
* '''num_enter'''<br />
</div><br />
<div style="border:3px solid pink;margin-bottom:3px;"><div style="float:right;padding-right:5px;font-weight:bold;">FUNCTION KEYS</div><br />
* '''F1'''<br />
* '''F2'''<br />
* '''F3'''<br />
* '''F4'''<br />
* '''F5'''<br />
* '''F6'''<br />
* '''F7'''<br />
* '''F8'''<br />
* '''F9'''<br />
* '''F10'''<br />
* '''F11'''<br />
* '''F12'''<br />
</div><br />
<div style="border:3px solid purple;margin-bottom:3px;"><div style="float:right;padding-right:5px;font-weight:bold;">OTHER</div><br />
* '''escape'''<br />
* '''backspace'''<br />
* '''tab'''<br />
* '''lalt'''<br />
* '''ralt'''<br />
* '''enter'''<br />
* '''space'''<br />
* '''pgup'''<br />
* '''pgdn'''<br />
* '''end'''<br />
* '''home'''<br />
* '''insert'''<br />
* '''delete'''<br />
* '''lshift'''<br />
* '''rshift'''<br />
* '''lctrl'''<br />
* '''rctrl'''<br />
* '''['''<br />
* ''']'''<br />
* '''pause'''<br />
* '''capslock'''<br />
* '''scroll'''<br />
* ''';'''<br />
* ''','''<br />
* '''-'''<br />
* '''.'''<br />
* '''/'''<br />
* '''#'''<br />
* '''\'''<br />
* '''='''<br />
<br />
</div><br />
[[pl:Key names]]<br />
[[Category:Scripting Concepts]]</div>Ccwhttps://wiki.multitheftauto.com/index.php?title=Authorized_Serial_Account_Protection&diff=53838Authorized Serial Account Protection2018-01-25T16:56:23Z<p>Ccw: Reverted edits by Кирилл1111 (talk) to last revision by Ccw</p>
<hr />
<div>=FAQ=<br />
==Help, I can't login (game)==<br />
To allow the last attempted serial, use the '''authserial''' command in the server console.<br/><br />
For example, to allow the last attempted serial for account ''MrBob'', enter the following command in the server console:<br />
authserial MrBob<br />
<br />
==Help, I can't login (HTTP)==<br />
To login to the HTTP web interface, there are two options:<br />
====Authorize an IP address:====<br />
* Join the MTA server<br />
* Login to the account<br />
* Disconnect from MTA server (optional)<br />
* Login via HTTP<br />
or<br />
====Set a special password:====<br />
* Use the command '''authserial <account_name> httppass''' in the server console<br />
* Note the supplied 7 digit code<br />
* Login via HTTP and append the supplied 7 digit code to your password<br />
<br/><br />
=Main documentation=<br />
==Introduction==<br />
New from 1.5.3, Authorized Serial Account Protection provides a way to prevent password reuse causing damage to your server.<br />
==How to enable==<br />
Open '''mtaserver.conf''' and find ''<auth_serial_groups>'' and change to below.<br />
(If ''<auth_serial_groups>'' does not exist, then add it)<br />
<auth_serial_groups>Admin</auth_serial_groups><br />
If you wish to protect other ACL groups, then add them separated by commas, e.g.:<br />
<auth_serial_groups>Admin,SuperModerator</auth_serial_groups><br />
==How to disable==<br />
Open '''mtaserver.conf''' and find ''<auth_serial_groups>'' and change to below<br />
<auth_serial_groups></auth_serial_groups><br />
'''Note''': Authorized Serial Account Protection helps prevent your server from getting hacked. If there is a chance any of your admins are using the same password on other servers, then do not disable this feature.<br />
==How to use==<br />
To allow the last attempted serial for an account, enter the following command in the server console:<br />
authserial <account_name><br />
To view authorized serials for an account:<br />
authserial <account_name> list<br />
To remove the newest authorized serial for an account:<br />
authserial <account_name> remove<br />
To enable HTTP login from an unauthorized IP, use the following command to get a 7 digit code which should be appended to the HTTP login password ''(Requires server version 1.5.4-9.11302)''<br />
authserial <account_name> httppass</div>Ccwhttps://wiki.multitheftauto.com/index.php?title=DxGetStatus&diff=53258DxGetStatus2018-01-02T11:43:15Z<p>Ccw: </p>
<hr />
<div>{{Client function}}<br />
__NOTOC__<br />
This function gets information about various internal datum<br />
<br />
==Syntax== <br />
<syntaxhighlight lang="lua"><br />
table dxGetStatus ( )<br />
</syntaxhighlight> <br />
<br />
===Returns===<br />
Returns a table with the following entries:<br />
* '''TestMode :''' The current dx test mode. See [[dxSetTestMode]].<br />
*'''VideoCardName :''' The name of the graphics card.<br />
*'''VideoCardRAM :''' The installed memory in MB of the graphics card.<br />
*'''VideoCardPSVersion :''' The maximum pixel shader version of the graphics card.<br />
*'''VideoCardNumRenderTargets:''' The maximum number of simultaneous render targets a shader can use.<br />
*'''VideoCardMaxAnisotropy:''' The maximum anisotropic filtering available. (0-4 which respectively mean: off,2x,4x,8x,16x)<br />
*'''VideoMemoryFreeForMTA :''' The amount of memory in MB available for MTA to use. '''When this gets to zero, [[guiCreateFont]], [[dxCreateFont]] and [[dxCreateRenderTarget]] will fail.'''<br />
*'''VideoMemoryUsedByFonts :''' The amount of graphic memory in MB used by custom fonts.<br />
*'''VideoMemoryUsedByTextures :''' The amount of graphic memory in MB used by textures.<br />
*'''VideoMemoryUsedByRenderTargets :''' The amount of graphic memory in MB used by render targets.<br />
*'''SettingWindowed :''' The windowed setting. (true/false)<br />
*'''SettingFullScreenStyle :''' Display style when in full screen mode. (0-2 which respectively mean: Standard, Borderless window, Borderless keep res)<br />
*'''SettingFXQuality :''' The FX Quality. (0-3)<br />
*'''SettingDrawDistance :''' The draw distance setting. (0-100)<br />
*'''SettingVolumetricShadows :''' The volumetric shadows setting. (true/false)<br />
*'''SettingStreamingVideoMemoryForGTA :''' The usable graphics memory setting. (64-256)<br />
*'''SettingAnisotropicFiltering:''' The anisotropic filtering setting. (0-4 which respectively mean: off,2x,4x,8x,16x)<br />
*'''SettingAntiAliasing:''' The anti-aliasing setting. (0-3 which respectively mean: off,1x,2x,3x)<br />
*'''SettingHeatHaze:''' The heat haze setting. (true/false)<br />
*'''SettingGrassEffect:''' The grass effect setting. (true/false)<br />
*'''Setting32BitColor:''' The color depth of the screen. (false is 16bit, true is 32bit)<br />
*'''SettingHUDMatchAspectRatio:''' The hud match aspect ratio setting (true/false)<br />
*'''SettingAspectRatio:''' The aspect ratio setting ("auto", "4:3", "16:10", "16:9")<br />
*'''SettingFOV:''' The FOV setting<br />
{{New feature/item|3.0154|1.5.3|11199|<br />
*'''SettingHighDetailVehicles:''' High detail vehicles setting (true/false).<br />
}}<br />
*'''AllowScreenUpload :''' The allows screen uploads setting. (true/false)<br />
*'''DepthBufferFormat:''' The format of the shader readable depth buffer, or 'unknown' if not available<br />
*'''UsingDepthBuffer:''' ''true'' if the depth buffer is used, ''false'' otherwise<br />
==Example==<br />
<syntaxhighlight lang="lua"><br />
addCommandHandler( "getinfo",<br />
function( )<br />
local info = dxGetStatus( )<br />
for k, v in pairs( info ) do<br />
outputChatBox( k .. " : " .. tostring( v ) )<br />
end<br />
end<br />
)<br />
</syntaxhighlight><br />
<br />
==Changelog==<br />
{{ChangelogHeader}}<br />
{{ChangelogItem|1.3.0-9.04715|Added DepthBufferFormat argument}}<br />
{{ChangelogItem|1.3.0-9.04811|Added VideoCardMaxAnisotropy, SettingAnisotropicFiltering, SettingAntiAliasing,<br/> SettingHeatHaze, SettingGrassEffect and Setting32BitColor arguments}}<br />
{{ChangelogItem|1.3.4-9.05731|Added SettingHUDMatchAspectRatio and SettingAspectRatio}}<br />
{{ChangelogItem|1.4.1-9.07181|Added SettingFOV}}<br />
{{ChangelogItem|1.4.1-9.07310|Added VideoCardNumRenderTargets}}<br />
{{ChangelogItem|1.5.2-9.07816|Added UsingDepthBuffer}}<br />
{{ChangelogItem|1.5.3-9.11199|Added SettingHighDetailVehicles}}<br />
{{ChangelogItem|1.5.5-9.11814|Added SettingFullScreenStyle<br/>Fixed SettingWindowed}}<br />
<br />
==See Also==<br />
{{Drawing_functions}}</div>Ccwhttps://wiki.multitheftauto.com/index.php?title=Server_mtaserver.conf&diff=53111Server mtaserver.conf2017-12-15T06:12:09Z<p>Ccw: Undo revision 53110 by Youssef222 (talk)</p>
<hr />
<div>This page lists the settings that can be set in the settings file. ''Setting from the default '''mtaserver.conf''' settings file is in italics''.<br />
<br />
<br />
====servername====<br />
:''<servername>Default MTA Server</servername>''<br />
:This parameter specifies the name the server will be visible as in the ingame server browser and on Game-Monitor. It is a required parameter.<br />
<br />
====serverip====<br />
:''<serverip>auto</serverip><br />
:'''ONLY USE THIS PARAMETER IF YOU ARE SURE OF WHAT YOU ARE DOING''' - it is generally only needed for professional servers and should be left at the default value otherwise.<br />
: This parameter specifies the IP to use for servers that have multiple IP addresses. If set to auto, it will automatically detect and use the server's standard local IP address.<br />
:Values: auto or x.x.x.x ; default value: auto --><br />
:SERVERIP SHOULD BE LEFT SET TO auto UNLESS YOU ARE SURE OF WHAT YOU ARE DOING<br />
:WARNING: SETTING serverip AND THEN ASKING FOR SUPPORT CAN CAUSE DEATH OR INJURY<br />
<br />
====serverport====<br />
:''<serverport>22003</serverport> <br />
:This parameter specifies the UDP port on which the server will be accepting incoming player connections;<br />
:default value: 22003. It is a required parameter.<br />
<br />
====maxplayers====<br />
:''<maxplayers>32</maxplayers><br />
:This parameter specifies the number of maximum player slots available on the server;<br />
:default value: 32. It is a required parameter.<br />
<br />
====httpserver====<br />
:''<httpserver>1</httpserver><br />
:This parameter specifies whether the builtin http server will be used.<br />
:Values: 0 - disabled , 1 - enabled ; default value: 1. Optional parameter.<br />
:More information: [[Server_Manual#Using_the_web_interface|Using the web interface]]<br />
<br />
====httpport====<br />
:''<httpport>22005</httpport><br />
:This parameter specifies the TCP port on which the server will be accepting incoming http connections. It can be set to the same value as <serverport>. It is a required parameter if <httpserver> is set to 1.<br />
:More information: [[Server_Manual#Using_the_web_interface|Using the web interface]]<br />
<br />
====httpdownloadurl====<br />
:''<httpdownloadurl></httpdownloadurl><br />
:If set, this parameter specifies the external URL from which clients will be able to download needed resources ingame. Otherwise they will download them directly from the server.<br />
:More information: [[Server_Manual#Configuring_an_external_web_server|Configuring an external web server]]<br />
<br />
====httpmaxconnectionsperclient====<br />
:''<httpmaxconnectionsperclient>5</httpmaxconnectionsperclient><br />
:This parameter limits the number of http connections each client can make. Depending on the type of http server that is used, a lower figure may reduce download timeouts. Only relevant when using an external http server.<br />
:Available range: 1 to 8.<br />
<br />
====httpdosthreshold====<br />
:''<httpdosthreshold>20</httpdosthreshold><br />
:This parameter limits the number http connections that an IP can initiate over a short period of time.<br />
:Available range: 1 to 100. default value: 20<br />
<br />
{{New feature/item|3.0136|1.3.5|6301|<br />
====http_dos_exclude====<br />
:''<http_dos_exclude></http_dos_exclude><br />
:This parameter lists the IP addresses that are to be excluded from http dos threshold limits.<br />
:e.g. 88.11.22.33,101.2.3.4<br />
}}<br />
<br />
====allow_gta3_img_mods====<br />
:''<allow_gta3_img_mods>none</allow_gta3_img_mods><br />
:By default, the server will block the use of locally customized gta3.img player skins. <br />
:This setting can be used to allow such mods. Not recommended for competitive servers.<br />
:Values: none, peds; default value: none<br />
<br />
====client_file====<br />
:''<nowiki><!-- <client_file name="data/carmods.dat" verify="0" /> --></nowiki><br />
:By default, the server will block the use of customized GTA:SA data files.<br />
:To allow specific client files, add one or more of the above lines.<br />
:More information: [[Anti-cheat_guide|Anti-cheat guide]]<br />
<br />
====disableac====<br />
:''<disableac></disableac><br />
:Comma seperated list of disabled anti-cheats.<br />
:e.g. To disable anti-cheat #2 and #3, use: 2,3<br />
:More information: [[Anti-cheat_guide|Anti-cheat guide]]<br />
<br />
====enablesd====<br />
:''<enablesd></enablesd><br />
:Comma seperated list of enabled special detections. A special detection is a type of anti-cheat for (usually) harmless game modifications. Competitive servers may wish to enable special detections, but most servers should leave this setting blank.<br />
:e.g. To enable special detection #12 (disallow custom D3D9.DLL) use: 12<br />
:More information: [[Anti-cheat_guide|Anti-cheat guide]]<br />
<br />
====networkencryption====<br />
:''<networkencryption>1</networkencryption><br />
:This parameter specifies whether communications between the server and client is encrypted. Encryption can help prevent network data being viewed and modified.<br />
:Values: 0 - disabled , 1 - enabled ; default value: 1. Optional parameter.<br />
:This parameter can changed and saved while the server is running with [[setServerConfigSetting]]<br />
<br />
====minclientversion====<br />
:''<minclientversion></minclientversion><br />
:Minimum client version. Clients with a lower version will not be allowed to connect. After disconnection, clients will be given an opportunity to download an update. If left blank, this setting is disabled and there are no restrictions on who can connect. Version numbers are described in [[getPlayerVersion]] and look like this: 1.1.0-9.03100.0<br />
:This parameter can changed and saved while the server is running with [[setServerConfigSetting]]<br />
:'''Note that this setting only determines if the client should be prompted to update. The actual build number they receive will be the [[http://nightly.mtasa.com/ver highest available]].'''<br />
<br />
{{New feature/item|3.0136|1.3.4|6023|<br />
====minclientversion_auto_update====<br />
:''<minclientversion_auto_update></minclientversion_auto_update><br />
:This parameter specifies if/when the <minclientversion> setting is automatically updated.<br />
:Keeping <minclientversion> updated can help reduce cheating.<br />
:Note: The instant setting (2) is only recommened for competitive servers.<br />
:Values: 0 - disabled, 1 - enabled (delayed by a few days), 2 - enabled (instant) ; default value: 1.<br />
}}<br />
<br />
====recommendedclientversion====<br />
:''<recommendedclientversion></recommendedclientversion><br />
:Recommended client version. When connecting, if clients have a lower version, they will be given the option to download an update. If left blank, this setting is disabled.<br />
:This parameter can changed and saved while the server is running with [[setServerConfigSetting]]<br />
:'''Note that this setting only determines if the client should be prompted to update. The actual build number they receive will be the [[http://nightly.mtasa.com/ver highest available]].'''<br />
<br />
====ase====<br />
:''<ase>1</ase><br />
:This parameter can be used to make the server report to Game-Monitor master servers, allowing it to be visible in the ingame server browser. An additional UDP port needs to be available for this to work (value from <serverport> + 123 , so on a default <serverport> value 22003 the right port will be 22126 ).<br />
:Available values: 0 - disabled , 1 - enabled. Optional parameter, defaults to 0.<br />
<br />
====donotbroadcastlan====<br />
:''<donotbroadcastlan>0</donotbroadcastlan><br />
:This parameter allows you to disable LAN broadcasting. <br />
<br />
====password====<br />
:''<password></password> <br />
:If set, players will have to provide a password specified below, before they can connect to the server. If left blank, server doesn't require a password from them.<br />
:This parameter can changed and saved while the server is running with [[setServerPassword]] or [[setServerConfigSetting]]<br />
<br />
====bandwidth_reduction====<br />
:''<bandwidth_reduction>medium</bandwidth_reduction> <br />
:This parameter reduces the server's bandwidth usage by using various optimizations.<br />
:Values: none, medium or maximum ; default value: medium<br />
:This parameter can be changed and saved while the server is running with [[setServerConfigSetting]]<br />
<br />
====unoccupied_vehicle_syncer_distance====<br />
:''<unoccupied_vehicle_syncer_distance>130</unoccupied_vehicle_syncer_distance> <br />
:This parameter determines the distance limit for remote synced unoccupied vehicles<br />
:Available range: 50 - 400; default value: 130<br />
:This parameter can be changed and saved while the server is running with [[setServerConfigSetting]]<br />
<br />
====ped_syncer_distance====<br />
:''<ped_syncer_distance>100</ped_syncer_distance> <br />
:This parameter determines the distance limit for remote synced peds<br />
:Available range: 50 - 400; default value: 100<br />
:This parameter can be changed and saved while the server is running with [[setServerConfigSetting]]<br />
<br />
====player_sync_interval====<br />
:''<player_sync_interval>100</player_sync_interval> <br />
:This parameter determines the time in milliseconds between player sync packets.<br />
:Available range: 50 - 500; default value: 100<br />
:This parameter can be changed and saved while the server is running with [[setServerConfigSetting]]<br />
:Suggested values for this and the other sync_interval settings can be found here: [[Sync_interval_settings|Sync interval settings]]<br />
<br />
====lightweight_sync_interval====<br />
:''<lightweight_sync_interval>1500</lightweight_sync_interval> <br />
:This parameter determines the time in milliseconds between lightweight (player) sync packets.<br />
:Available range: 200 - 40000; default value: 1500<br />
:This parameter can be changed and saved while the server is running with [[setServerConfigSetting]]<br />
:Suggested values for this and the other sync_interval settings can be found here: [[Sync_interval_settings|Sync interval settings]]<br />
<br />
====camera_sync_interval====<br />
:''<camera_sync_interval>500</camera_sync_interval> <br />
:This parameter determines the time in milliseconds between camera sync packets.<br />
:Available range: 200 - 400; default value: 500<br />
:This parameter can be changed and saved while the server is running with [[setServerConfigSetting]]<br />
:Suggested values for this and the other sync_interval settings can be found here: [[Sync_interval_settings|Sync interval settings]]<br />
<br />
====ped_sync_interval====<br />
:''<ped_sync_interval>400</ped_sync_interval> <br />
:This parameter determines the time in milliseconds between ped sync packets.<br />
:Available range: 200 - 4000; default value: 400<br />
:This parameter can be changed and saved while the server is running with [[setServerConfigSetting]]<br />
:Suggested values for this and the other sync_interval settings can be found here: [[Sync_interval_settings|Sync interval settings]]<br />
<br />
====unoccupied_vehicle_sync_interval====<br />
:''<unoccupied_vehicle_sync_interval>1000</unoccupied_vehicle_sync_interval> <br />
:This parameter determines the time in milliseconds between unoccupied vehicle sync packets.<br />
:Available range: 200 - 4000; default value: 1000<br />
:This parameter can be changed and saved while the server is running with [[setServerConfigSetting]]<br />
:Suggested values for this and the other sync_interval settings can be found here: [[Sync_interval_settings|Sync interval settings]]<br />
<br />
====keysync_mouse_sync_interval====<br />
:''<keysync_mouse_sync_interval>100</keysync_mouse_sync_interval> <br />
:This parameter determines the minimum time in milliseconds between key sync packets due to mouse movement.<br />
:Available range: 50 - 500; default value: 100<br />
:This parameter can be changed and saved while the server is running with [[setServerConfigSetting]]<br />
:Suggested values for this and the other sync_interval settings can be found here: [[Sync_interval_settings|Sync interval settings]]<br />
<br />
====keysync_analog_sync_interval====<br />
:''<keysync_analog_sync_interval>100</keysync_analog_sync_interval> <br />
:This parameter determines the minimum time in milliseconds between key sync packets due to joystick movement.<br />
:Available range: 50 - 500; default value: 100<br />
:This parameter can be changed and saved while the server is running with [[setServerConfigSetting]]<br />
:Suggested values for this and the other sync_interval settings can be found here: [[Sync_interval_settings|Sync interval settings]]<br />
<br />
====bullet_sync====<br />
:''<bullet_sync>0</bullet_sync> <br />
:This parameter can improve the reliability of shots when using certain weapons. However, it uses more bandwidth.<br />
:'''It only works on server build 4247 or later, and when enabled, connecting clients will be auto-updated if required.'''<br />
:Note that bullet sync will be active regardless of this setting when certain [[setGlitchEnabled|glitches]] are enabled.<br />
:Values: 0 - disabled , 1 - enabled ; default value: 0.<br />
:This parameter can be changed and saved while the server is running with [[setServerConfigSetting]]<br />
<br />
====vehext_percent====<br />
:''<vehext_percent>0</vehext_percent><br />
:This parameter sets the amount of extrapolation that clients will apply to remote vehicles. <br />
:This can reduce some of the latency induced location disparency by predicting where the remote vehicles will probably be.<br />
:Depending on the gamemode, an incorrect prediction may have a negative effect. <br />
:Therefore this setting should be considered expermental.<br />
:'''It only works on server build 4456 or later.'''<br />
:Available range: 0 to 100. Default - 0 --><br />
<br />
====vehext_ping_limit====<br />
:''<vehext_ping_limit>150</vehext_ping_limit><br />
:This parameter places a limit on how much time (in milliseconds) the vehicle extrapolation will attempt to compensate for.<br />
:Only relevant if <vehext_percent> is greater than zero.<br />
:'''It only works on server build 4456 or later.'''<br />
:Available range: 50 to 500. Default - 150<br />
<br />
====latency_reduction====<br />
:''<latency_reduction>0</latency_reduction><br />
:This parameter can reduce the delay of player actions appearing on remote clients by 2 frames (approx 50ms).<br />
:Due to the impact this may have on shot lag compensation, it should be considered experimental.<br />
:Values: 0 - disabled , 1 - enabled ; default value: 0.<br />
:Bugs caused by enabling latency_reduction: http://bugs.mtasa.com/view.php?id=8191 + http://bugs.mtasa.com/view.php?id=8226<br />
<br />
====threadnet====<br />
<!--:''<threadnet>1</threadnet>--><!-- missing from MTA:SA config --><br />
:This parameter specifies whether or not to run the network synchronization on another thread.<br />
:Enabling will make the sync smoother, but may increase cpu usage slightly.<br />
:Values: 0 - disabled , 1 - enabled ; default value: 1.<br />
:This parameter can be changed and saved while the server is running with [[setServerConfigSetting]]<br />
<br />
====idfile====<br />
:''<idfile>server-id.keys</idfile> <br />
:Specifies the location and file name of this servers unique private key. This is used to prevent private files saved on the client from being read by other servers. <br />
:Keep a backup of this file in a safe place. Default value: server-id.keys<br />
:More information about client private files: [[Filepath]]<br />
<br />
====logfile====<br />
:''<logfile>logs/server.log</logfile><br />
:Specifies the location and name of the main server log file. If left blank, server won't be saving this file.<br />
<br />
====authfile====<br />
:''<authfile>logs/server_auth.log</authfile><br />
:As well as the main log file, login successes and failures are logged here for easy reviewing of security issues. If left blank, this file is not used<br />
<br />
====dbfile====<br />
:''<dbfile>logs/db.log</dbfile><br />
:Specifies the location and name of the file used to log database queries. The server command [[Server_Commands#debugdb|debugdb]] sets the amount of logging.<br />
<br />
{{New feature/item|3.0136|1.3.4|5809|<br />
====loadstringfile====<br />
:''<nowiki><!-- <loadstringfile>logs/loadstring.log</loadstringfile> --></nowiki><br />
:Specifies the location and name of the file used to log loadstring function calls. If left blank or not set, no logging is done.<br />
}}<br />
<br />
====acl====<br />
:''<acl>acl.xml</acl> <br />
:This parameter specifies the location and name of the Access Control List settings file. If left<br />
:blank, server will use acl.xml file, located in the same folder as this configuration file.<br />
<br />
====scriptdebuglogfile====<br />
:''<scriptdebuglogfile>logs/scripts.log</scriptdebuglogfile> <br />
:Specifies the location and name of the debugscript log file. If left blank, server won't be saving this file.<br />
<br />
====scriptdebugloglevel====<br />
:''<scriptdebugloglevel>0</scriptdebugloglevel><br />
:Specifies the level of the debugscript log file. Available values: 0, 1, 2, 3. When not set, defaults to 0.<br />
<br />
====fpslimit====<br />
:''<fpslimit>36</fpslimit><br />
:Specifies the frame rate limit that will be applied to connecting clients.<br />
:Available range: 25 to 100. Default: 36.<br />
:When running the map editor locally (i.e. from the client), the default FPS limit is 50.<br />
:This parameter can be changed and saved while the server is running with [[setServerConfigSetting]]<br />
<br />
====voice====<br />
:''<voice>0</voice><br />
:This parameter specifies whether or not to enable player voice chat in-game<br />
:Values: 0 - disabled , 1 - enabled<br />
<br />
====voice_samplerate====<br />
:''<voice_samplerate>1</voice_samplerate><br />
:This parameter specifies the sample rate for voice chat. 'voice' parameter must be set to 1 for this to be effective. Higher settings use more bandwidth and increase the sampling quality of voice chat<br />
:Values: 0 - Narrowband (8kHz), 1 - Wideband (16kHz), 2 - Ultrawideband (32kHz). Default - 1<br />
<br />
====voice_quality====<br />
:''<voice_quality>4</voice_quality><br />
:This parameter specifies the voice quality for voice chat. 'voice' parameter must be set to 1 for this to be effective. Higher settings use more bandwidth and increase the the overall quality of voice chat<br />
:Available range: 0 to 10. Default - 4<br />
<br />
====voice_bitrate====<br />
:''<nowiki><!-- <voice_bitrate>24600</voice_bitrate> --></nowiki><br />
:Specifies the voice bitrate, in bps. This optional parameter overrides the previous two settings. If not set, MTA handles this automatically. Use with care.<br />
<br />
====backup_path====<br />
:''<backup_path>backups</backup_path><br />
:This parameter specifies the path to use for a basic backup of some server files. Note that basic backups are only made during server startup. Default value: backups<br />
<br />
====backup_interval====<br />
:''<backup_interval>3</backup_interval><br />
:This parameter specifies the number of days between each basic backup. Backups are only made during server startup, so the actual interval maybe much longer. Setting backup_interval to 0 will disable backups<br />
:Available range: 0 to 30. Default - 3<br />
<br />
====backup_copies====<br />
:''<backup_copies>5</backup_copies><br />
:This parameter specifies the maximum number of backup copies to keep. Setting backup_copies to 0 will disable backups<br />
:Available range: 0 to 100. Default - 5<br />
<br />
====compact_internal_databases====<br />
:''<compact_internal_databases>1</compact_internal_databases><br />
:This parameter specifies when the internal sqlite databases should be defragmented.<br />
:For more info see: http://www.sqlite.org/lang_vacuum.html<br />
:Values: 0 - Never, 1 - On server start only after basic backup, 2 - On server start always. Default - 1<br />
<br />
====crash_dump_upload====<br />
:''<crash_dump_upload>1</crash_dump_upload><br />
:This parameter specifies whether server crash dump files should be sent to MTA HQ.<br />
:Values: 0 - Off, 1 - On. Default - 1<br />
<br />
====fakelag====<br />
:''<fakelag>0</fakelag><br />
:This parameter specifies whether the [[Command fakelag|fakelag and sfakelag]] commands are enabled<br />
:Values: 0 - Off, 1 - On. Default - 0<br />
<br />
====auth_serial_groups====<br />
:''<auth_serial_groups>Admin</auth_serial_groups><br />
:This parameter lists the ACL groups that are protected by serial authorization.<br />
:Login attempts to a protected account from a second serial are blocked until the serial is manually authorized via the authserial command.<br />
:For more info see: https://mtasa.com/authserial<br />
:Values: Comma separated list of ACL groups. Default - Admin<br />
<br />
====auth_serial_http====<br />
:''<auth_serial_http>1</auth_serial_http><br />
:This parameter specifies if the authorized serial login checks should also apply to the http interface.<br />
:Protected account login attempts to the http interface will only succeed if the IP address matches one recently used by the account holder in-game.<br />
:For more info see: https://mtasa.com/authserialhttp<br />
:Values: 0 - Off, 1 - Enabled. Default - 1<br />
<br />
====database_credentials_protection====<br />
:''<database_credentials_protection>1</database_credentials_protection><br />
:This parameter specifies if extra security measures are applied to resources which use [[dbConnect]] with MySQL.<br />
:The extra measures are:<br />
: - script files cannot be accessed with [[fileOpen]]<br />
: - [[meta.xml]] is read-only<br />
:'''NOTE:''' This only protects resources which use [[dbConnect]] with MySQL.<br />
:Values: 0 - Off, 1 - Enabled. Default - 1<br />
<br />
====module====<br />
:''<nowiki><!-- <module src="sample_win32.dll" /> --></nowiki><br />
:''<nowiki><!-- <module src="sample_linux.so" /> --></nowiki><br />
:Specifies the module(s) which are loaded with the server. To load several modules, add more <module> parameter(s). Optional parameter.<br />
<br />
====resource====<br />
:''<resource src="admin" startup="1" protected="0" /><br />
:''<resource src="defaultstats" startup="1" protected="0" /><br />
:''<resource src="helpmanager" startup="1" protected="0" /><br />
:''<resource src="joinquit" startup="1" protected="0" /><br />
:''<resource src="mapcycler" startup="1" protected="0" /><br />
:''<resource src="mapmanager" startup="1" protected="0" /><br />
:''<resource src="parachute" startup="1" protected="0" /><br />
:''<resource src="resourcebrowser" startup="1" protected="1" default="true" /><br />
:''<resource src="resourcemanager" startup="1" protected="1" /><br />
:''<resource src="scoreboard" startup="1" protected="0" /><br />
:''<resource src="spawnmanager" startup="1" protected="0" /><br />
:''<resource src="voice" startup="1" protected="0" /><br />
:''<resource src="votemanager" startup="1" protected="0" /><br />
:''<resource src="webadmin" startup="1" protected="0" /><br />
:''<resource src="play" startup="1" protected="0" /><br />
<br />
:Specifies persistent resources which are loaded when the server starts. Persistent resources are not stopped even if all the other resources that depend on them stop; that is, the only way to stop them is by explicitly using the ''stop'' server command or [[stopResource]] scripting function. To load several resources, add more <resource> parameters.<br />
<br />
:In addition, there are several flags which control how the server deals with each resource:<br />
<br />
:* '''src''': the resource name. This is the only mandatory flag.<br />
:* '''startup''': controls whether the resource will be started with the server or not. If "1", "true" or "yes", the resource will be started. If not specified, defaults to not starting the resource.<br />
:* '''protected''': if "1", "true" or "yes", the resource will not be able to be stopped when started. Otherwise, even if not specified, it will default to the normal behaviour.<br />
:* '''default''': if given a "1", "true" or "yes" value, this resource will be the one who populates the built-in HTTP server main page, which is seen when no resource is given in the web address. It is not possible to have more than one default resource.<br />
<br />
[[Category: Support]]<br />
[[ru:Server mtaserver.conf]]</div>Ccwhttps://wiki.multitheftauto.com/index.php?title=Compiling_MTASA&diff=53094Compiling MTASA2017-12-08T15:04:37Z<p>Ccw: Reverted edits by Ccw (talk) to last revision by Qaisjp</p>
<hr />
<div>In order to successfully build Multi Theft Auto from source, it is necessary to perform a number of steps, which we will explain below.<br />
<br />
Please read the instructions carefully and do not skip parts of it, if you have no experience.<br />
<br />
== Prerequisites ==<br />
<br />
You should be using Windows 7 or above, before you can compile the Multi Theft Auto client.<br />
<br />
Make sure you have the following software and SDKs installed:<br />
<br />
=== Visual Studio 2017 ===<br />
[[File:Visual_Studio_Community.PNG|left|150px|link=https://www.visualstudio.com/vs/]]<br />
'''Download'''<br><br />
[https://www.visualstudio.com/vs/ Microsoft Visual Studio 2017] (Community Edition is free).<br><br />
(Make sure you [[Media:VsFoundationClasses.png|select ''MFC and ATL support, and VC++ 2015 toolset'']] during installation.)<br><br />
<br />
'''Addon: ReAttach''' (optional)<br><br />
Download: [https://visualstudiogallery.msdn.microsoft.com/8cccc206-b9de-42ef-8f5a-160ad0f017ae ReAttach]<br><br />
(ReAttach gives you an easy way to re-attach your prior debug targets)<br />
<br />
'''Missing #include "afxres.h"'''<br><br />
[[Media:VsFoundationClasses.png|Make sure you have ''MFC and ATL support'' installed.]]<br><br />
(You can re-run the installer to modify your current installation, no need to uninstall and reinstall)<br style="clear:both"><br />
<br />
'''Toolset issues'''<br><br />
[[Media:VsFoundationClasses.png|Make sure you have ''VC++ 2015 toolset'' installed.]]<br><br />
(You can re-run the installer to modify your current installation, no need to uninstall and reinstall)<br style="clear:both"><br />
<br />
=== Microsoft DirectX SDK ===<br />
[[File:DirectX_SDK.jpg|left|150px|link=https://www.microsoft.com/en-us/download/details.aspx?id=23549]]<br />
'''Download'''<br><br />
[https://www.microsoft.com/en-us/download/details.aspx?id=23549 Microsoft DirectX SDK (August 2009)]<br><br />
<br />
'''S1023 Error'''<br><br />
[https://support.microsoft.com/en-us/kb/2728613 "S1023" error when you install the DirectX SDK (June 2010)]<br style="clear:both"><br />
<br />
=== Git Client ===<br />
[[File:Git_logo.png|left|32px|link=https://git-scm.com/]]<br />
You have three options here available. You can install '''ONE''' of the clients below (for collaboration) or download the entire codebase in a [https://github.com/multitheftauto/mtasa-blue/archive/master.zip .ZIP] file (if you only want to compile the code). You can also use Git on the command line to checkout the respository.<br style="clear:both"><br />
<br />
==== GitHub Desktop ====<br />
[[File:GitHub_Desktop.png|left|150px]]<br />
'''Download:'''<br><br />
[https://windows.github.com/ GitHub for Windows]<br style="clear:both"><br />
<br />
==== SourceTree ====<br />
[[File:Atlassian_SourceTree.png|left|150px]]<br />
'''Download:'''<br><br />
[https://www.sourcetreeapp.com/ SourceTree]<br style="clear:both"><br />
<br />
==== GitKraken ====<br />
[[File:GitKraken_Logo.png|left|150px]]<br />
'''Download:'''<br><br />
[https://www.gitkraken.com/ GitKraken]<br style="clear:both"><br />
<br />
== Getting the latest source code ==<br />
<br />
To get the latest code, you will have to download the latest copy of our Git repository.<br><br />
We recommend cloning the repository in your Git client, because you can pull any updates from there easily.<br />
<br />
* '''Repository:''' [https://github.com/multitheftauto/mtasa-blue multitheftauto/mtasa-blue]<br />
* '''.zip:''' [https://github.com/multitheftauto/mtasa-blue/archive/master.zip master.zip]<br />
* '''.tar.gz:''' [https://github.com/multitheftauto/mtasa-blue/archive/master.tar.gz master.tar.gz]<br />
<br />
== Compiling the code ==<br />
# Execute the script '''win-create-projects.bat'''<br />
# Open the solution file '''MTASA.sln''' in the '''Build''' directory<br />
# Compile in Visual Studio with '''Debug''' configuration (may take some minutes)<br />
# Execute the script '''win-install-data.bat'''<br />
<br />
= Running the software =<br />
<br />
== Running the client ==<br />
<br />
You can start your client in the '''Bin''' directory. You might find there a ''Multi Theft Auto.exe'' and/or ''Multi Theft Auto_d.exe'' executable. The ''_d'' suffix indicates a debug build of the software.<br><br />
Furthermore, you can also run your client inside the debugger from Visual Studio if you want to investigate a stack trace or set breakpoints in interesting code regions (read more in the section Debugging below).<br />
<br />
== Running the dedicated server ==<br />
<br />
If you already have run the step 5 (''Install resources'') in ''Compiling the code'' to install resources then you can goto ''Starting the server''.<br />
<br />
=== Installing the latest resources ===<br />
If you want to run the Multi Theft Auto dedicated server, you will have to install the required resources. These are required because they implement the most basic functionality (e.g. spawning players) in order to play.<br />
<br />
Our official resources repository is [https://github.com/multitheftauto/mtasa-resources hosted on GitHub]. You can download the latest resources from there or [http://mirror.mtasa.com/mtasa/resources/ download a zipped version]. Make sure that you have the latest resources package.<br />
<br />
=== Starting the server ===<br />
To run the server, open the ''MTA Server.exe'' executable in the '''Bin/server''' directory. The ''_d'' suffix indicates a debug build of the software.<br><br />
You can also run the debug build ''MTA Server_d.exe'' with the Visual Studio Debugger (as of writing, you can do that by right-clicking on the Server's Launcher project and selecting ''Start a local instance'' in the ''Debugger'' menu), but you can also attach to a running debug build MTA server (see more in the section Debugging below).<br />
<br />
== Debugging ==<br />
<br />
If you already compiled the code in the '''Debug''' configuration then continue reading, if not, then go up to ''Compilling the code'' and follow the steps for a ''Debug'' build.<br><br />
You can either launch MTA yourself and attach any debugger you want to use (also applies to the Visual Studio debugger) or you start a local debugging session in Visual Studio.<br><br />
If you choose to run MTA with Visual Studio then you should also attach the debugger to the executable '''gta_sa.exe''' (press ''CTRL + ALT + P'' in Visual Studio) - otherwise your<br />
breakpoints will not work for anything beside the MTA Launcher project.<br><br />
Furthermore, it is advisable to create an empty "timeout.longtime" file in your ''Bin/server/'' directory<br><br />
This will extend the time before players are kicked from your server for unresponsiveness to 120 seconds. This is useful when in Debug mode on the client and the process is halted.<br />
<br />
[[File:Local_Windows_Debugger.PNG]]<br />
<br />
[[File:Attach_to_Process.png|600px]]<br />
<br />
[[File:ReAttach_to_GTASA.PNG]]<br />
<br />
You can use [https://visualstudiogallery.msdn.microsoft.com/8cccc206-b9de-42ef-8f5a-160ad0f017ae ReAttach] to re-attach the debugger to the '''gta_sa.exe''' executable whenever you start your local debugger in Visual Studio.<br />
<br />
= Getting involved =<br />
Please see our [[Coding guidelines]] for information on coding practice.<br />
<br />
= Additional information =<br />
If you need more information, try our [http://bugs.mtasa.com/ bug tracker] or [irc://irc.multitheftauto.com IRC channel].<br />
<br />
[[pt-br:Compilando o MTASA]]<br />
[[ru:Compiling MTASA]]<br />
[[Category: Development]]</div>Ccwhttps://wiki.multitheftauto.com/index.php?title=Compiling_MTASA&diff=53093Compiling MTASA2017-12-08T14:38:10Z<p>Ccw: </p>
<hr />
<div>In order to successfully build Multi Theft Auto from source, it is necessary to perform a number of steps, which we will explain below.<br />
<br />
Please read the instructions carefully and do not skip parts of it, if you have no experience.<br />
<br />
== Prerequisites ==<br />
<br />
You should be using Windows 7 or above, before you can compile the Multi Theft Auto client.<br />
<br />
Make sure you have the following software and SDKs installed:<br />
<br />
=== Visual Studio 2017 ===<br />
[[File:Visual_Studio_Community.PNG|left|150px|link=https://www.visualstudio.com/vs/]]<br />
'''Download'''<br><br />
[https://www.visualstudio.com/vs/ Microsoft Visual Studio 2017] (Community Edition is free).<br><br />
(Make sure you [[Media:VsFoundationClasses.png|select ''MFC and ATL support, and VC++ 2015 toolset'']] during installation.)<br><br />
<br />
'''Addon: ReAttach''' (optional)<br><br />
Download: [https://visualstudiogallery.msdn.microsoft.com/8cccc206-b9de-42ef-8f5a-160ad0f017ae ReAttach]<br><br />
(ReAttach gives you an easy way to re-attach your prior debug targets)<br />
<br />
'''Missing #include "afxres.h"'''<br><br />
[[Media:VsFoundationClasses.png|Make sure you have ''MFC and ATL support'' installed.]]<br><br />
(You can re-run the installer to modify your current installation, no need to uninstall and reinstall)<br style="clear:both"><br />
<br />
'''Toolset issues'''<br><br />
[[Media:VsFoundationClasses.png|Make sure you have ''VC++ 2015 toolset'' installed.]]<br><br />
(You can re-run the installer to modify your current installation, no need to uninstall and reinstall)<br style="clear:both"><br />
<br />
=== Microsoft DirectX SDK ===<br />
[[File:DirectX_SDK.jpg|left|150px|link=https://www.microsoft.com/en-us/download/details.aspx?id=23549]]<br />
'''Download'''<br><br />
[https://www.microsoft.com/en-us/download/details.aspx?id=23549 Microsoft DirectX SDK (August 2009)]<br><br />
<br />
'''S1023 Error'''<br><br />
[https://support.microsoft.com/en-us/kb/2728613 "S1023" error when you install the DirectX SDK (June 2010)]<br style="clear:both"><br />
<br />
=== Git Client ===<br />
[[File:Git_logo.png|left|32px|link=https://git-scm.com/]]<br />
You have three options here available. You can install '''ONE''' of the clients below (for collaboration) or download the entire codebase in a [https://github.com/multitheftauto/mtasa-blue/archive/master.zip .ZIP] file (if you only want to compile the code). You can also use Git on the command line to checkout the respository.<br style="clear:both"><br />
<br />
==== GitHub Desktop ====<br />
[[File:GitHub_Desktop.png|left|150px]]<br />
'''Download:'''<br><br />
[https://windows.github.com/ GitHub for Windows]<br style="clear:both"><br />
<br />
==== SourceTree ====<br />
[[File:Atlassian_SourceTree.png|left|150px]]<br />
'''Download:'''<br><br />
[https://www.sourcetreeapp.com/ SourceTree]<br style="clear:both"><br />
<br />
==== GitKraken ====<br />
[[File:GitKraken_Logo.png|left|150px]]<br />
'''Download:'''<br><br />
[https://www.gitkraken.com/ GitKraken]<br style="clear:both"><br />
<br />
== Getting the latest source code ==<br />
<br />
To get the latest code, you will have to download the latest copy of our Git repository.<br><br />
We recommend cloning the repository in your Git client, because you can pull any updates from there easily.<br />
<br />
* '''Repository:''' [https://github.com/multitheftauto/mtasa-blue multitheftauto/mtasa-blue]<br />
* '''.zip:''' [https://github.com/multitheftauto/mtasa-blue/archive/master.zip master.zip]<br />
* '''.tar.gz:''' [https://github.com/multitheftauto/mtasa-blue/archive/master.tar.gz master.tar.gz]<br />
<br />
== Compiling the code ==<br />
# Execute the script '''win-create-projects.bat'''<br />
# Open the solution file '''MTASA.sln''' in the '''Build''' directory<br />
# Compile in Visual Studio with '''Debug''' configuration (may take some minutes)<br />
# Execute the script '''win-install-data.bat'''<br />
<br />
= Running the software =<br />
<br />
== Running the client ==<br />
<br />
You can start your client in the '''Bin''' directory. You might find there a ''Multi Theft Auto.exe'' and/or ''Multi Theft Auto_d.exe'' executable. The ''_d'' suffix indicates a debug build of the software.<br><br />
Furthermore, you can also run your client inside the debugger from Visual Studio if you want to investigate a stack trace or set breakpoints in interesting code regions (read more in the section Debugging below).<br />
<br />
== Running the dedicated server ==<br />
=== Installing the latest resources ===<br />
If you want to run the Multi Theft Auto dedicated server, you will have to install the required resources. These are required because they implement the most basic functionality (e.g. spawning players) in order to play.<br />
<br />
Our official resources repository is [https://github.com/multitheftauto/mtasa-resources hosted on GitHub]. You can download the latest resources from there or [http://mirror.mtasa.com/mtasa/resources/ download a zipped version]. Make sure that you have the latest resources package.<br />
<br />
=== Starting the server ===<br />
To run the server, open the ''MTA Server.exe'' executable in the '''Bin/server''' directory. The ''_d'' suffix indicates a debug build of the software.<br><br />
You can also run the debug build ''MTA Server_d.exe'' with the Visual Studio Debugger (as of writing, you can do that by right-clicking on the Server's Launcher project and selecting ''Start a local instance'' in the ''Debugger'' menu), but you can also attach to a running debug build MTA server (see more in the section Debugging below).<br />
<br />
== Debugging ==<br />
<br />
If you already compiled the code in the '''Debug''' configuration then continue reading, if not, then go up to ''Compilling the code'' and follow the steps for a ''Debug'' build.<br><br />
You can either launch MTA yourself and attach any debugger you want to use (also applies to the Visual Studio debugger) or you start a local debugging session in Visual Studio.<br><br />
If you choose to run MTA with Visual Studio then you should also attach the debugger to the executable '''gta_sa.exe''' (press ''CTRL + ALT + P'' in Visual Studio) - otherwise your<br />
breakpoints will not work for anything beside the MTA Launcher project.<br><br />
Furthermore, it is advisable to create an empty "timeout.longtime" file in your ''Bin/server/'' directory<br><br />
This will extend the time before players are kicked from your server for unresponsiveness to 120 seconds. This is useful when in Debug mode on the client and the process is halted.<br />
<br />
[[File:Local_Windows_Debugger.PNG]]<br />
<br />
[[File:Attach_to_Process.png|600px]]<br />
<br />
[[File:ReAttach_to_GTASA.PNG]]<br />
<br />
You can use [https://visualstudiogallery.msdn.microsoft.com/8cccc206-b9de-42ef-8f5a-160ad0f017ae ReAttach] to re-attach the debugger to the '''gta_sa.exe''' executable whenever you start your local debugger in Visual Studio.<br />
<br />
= Getting involved =<br />
Please see our [[Coding guidelines]] for information on coding practice.<br />
<br />
= Additional information =<br />
If you need more information, try our [http://bugs.mtasa.com/ bug tracker] or [irc://irc.multitheftauto.com IRC channel].<br />
<br />
[[pt-br:Compilando o MTASA]]<br />
[[ru:Compiling MTASA]]<br />
[[Category: Development]]</div>Ccwhttps://wiki.multitheftauto.com/index.php?title=Known_Issues_-_FAQ&diff=52770Known Issues - FAQ2017-11-04T15:29:40Z<p>Ccw: </p>
<hr />
<div>{{Note_box|Before you check the known issues make sure everything is [[Up-to-date]].}}<br />
Post here your proposed Q&A, regarding the known problems with MTA:SA and their solutions, especially the problems we are encountering now, that might be also encountered by users in the final release. You are also welcome to edit them grammar/style wise.<br />
<br />
* [[Resource:Editor#FAQ|Map editor FAQ/known issues can be found here.]]<br><br />
* [[MTA 0.5r2 Known Issues|Known issues for MTA 0.5r2 can be found here.]]<br />
* [[Compatibility FAQ|Compatibility FAQ]]<br />
<br />
== Client ==<br />
=== General ===<br />
==== I have the Steam version of GTA San Andreas. How can I play MTASA? ====<br />
:The Steam version of GTASA is currently incompatible with MTASA, just like it is with some other mods. However, it can be made to work with it.<br />
<br />
:'''If you just want to play the newest version of the mod, all you need to do is download the mod from our home page and then install it'''. The installer will detect your Steam's GTASA installation and will make some adjustments automatically.<br />
:No original files are modified in the process, so the single player mode will work the same way as it did before.<br />
<br />
<br />
:If you want to play some older MTA:SA version (1.3.2 or older), follow a few simple steps, and the Steam version will be compatible with it:<br />
:* '''Option 1:''' Find a '''GTA SA 1.00 No CD''' (Google will give useful results). You should obtain a 1.00 Cracked/NoCd EXE, not a Disc image. Any HOODLUM release will work fine.<br />
:** Open the download with Winrar or other similar archive tools, and inside there should be a gta_sa.exe. Place this file inside your installation directory. This is normally '''C:\Program Files\Steam\steamapps\common\grand theft auto san andreas'''. No files need to be replaced during this process.<br />
:This procedure will not affect your Steam version of GTASA, but will allow MTASA to boot alongside it.<br />
:* '''Option 2:''' Use the unofficial [https://forums.steampowered.com/forums/showthread.php?t=1952458 steam downgrade patch], be sure to downgrade to 1.0 and not 1.01.<br />
<br />
==== Does MTASA work with v1.01 or v2.00 of GTA San Andreas? ====<br />
:No. It can be made to work with them however - please see [https://forum.mtasa.com/topic/11757-patching-your-101-or-200-version-of-gta_saexe/ this forum topic] for instructions on patching the exe.<br />
<br />
==== Initial black screen/hanging GTA splash screens ====<br />
:* '''MTA shows a permanent black screen or hanging GTA splash screens.'''<br />
<br />
:It may be necessary that during/after the logo splash screens in Grand Theft Auto you have to give some input in order to skip the videos correctly. Try to click your left-mouse button a few times, or tapping a few keys.<br />
<br />
:* '''MTA shows a permanent black screen after the GTA splash screens (possibly with text in the bottom right corner).'''<br />
<br />
:This can be related to a lack of support for DirectX or video card features, on your system, which are needed to run the dynamically rendered menu. This dynamic menu is enabled by default. You can disable it by opening your [[coreconfig.xml]] configuration file located in the ''GTA San Andreas\MTA'' directory, and changing the value of ''menu_options'' to ''248''.<br />
<br />
==== Halt after MTA splash screen ====<br />
:* '''Nothing happens after the 'Stop playing with yourself' splash screen'''<br />
<br />
:If you use nVidia GeForce, try turning off nView Desktop Manager before starting MTA.<br />
<br />
:Also try deleting GTA San Andreas settings file ("gta_sa.set") in "Documents\GTA San Andreas User Files" folder.<br />
<br />
:If it all fails and you run Kaspersky Anti-Virus or Internet Security, make sure status of "multi theft auto.exe" in not restricted. Other anti-virus software may block MTA from running.<br />
<br />
==== Crash after MTA splash screen ====<br />
:* '''MTA crashes after the 'Stop playing with yourself' logo. Both single player and the MTA: Race ran fine before.'''<br />
<br />
:Try downloading the latest DirectX Runtime files from [https://www.microsoft.com/downloads/details.aspx?FamilyID=2da43d38-db71-4c1b-bc6a-9b6652cd92a3&DisplayLang=en Microsoft]. Also check in Task Manager, if :gta_sa.exe process isn't already running.<br />
<br />
:If you run at any substandard resolutions (e.g. 960x720), try to change your resolution to a commonly supported one (e.g. 640×480, 800×600, 1024×768, 1152×864, 1280×1024) by launching Grand Theft Auto: San Andreas in normal mode, setting the new resolution and exiting.<br />
<br />
:If you are a user of Windows Vista or Windows 7, try the following:<br />
:* Enable Windows XP SP3 compatiblity mode for both Multi Theft Auto.exe and gta_sa.exe, setting their privilege level to "Run this program as an administrator".<br />
:* Configure Data Execution Prevention: Use the setting ''Turn DEP for all programs and services except those I select''. Click ''add'' and find "Multi Theft Auto.exe" and "gta_sa.exe" and add them.<br />
:* Run MTASA as administrator.<br />
<br />
==== Crash after connecting to any server ====<br />
:* '''MTASA crashes upon connecting to any server. Single player runs fine.'''<br />
<br />
:Single player mods can affect the way MTA:SA works, potentially causing crashes - you should always use a clean GTASA install for MTA:SA.<br />
<br />
:This might also occur on non-modded installs, when your GTASA executable is in an unsupported by MTA:SA version (eg. 1.0 German or Australian). To resolve this, use [https://forum.mtasa.com/topic/11757-patching-your-101-or-200-version-of-gta_saexe/ our converter].<br />
<br />
==== Controls not working ====<br />
:* '''My controls don't seem to work as they should.'''<br />
<br />
:Try using the 'copygtacontrols' command in the console.<br />
<br />
==== Incorrect models ====<br />
:* '''Woman model's breasts look awkward ingame / I'm seeing odd, spider-like shaped player models.'''<br />
<br />
:This is caused by the way GTA handles player stats. To fix this, be sure to set both fat and muscles player stats to 0, when you're changing player skin.<br />
<br />
==== Incorrect drive-by functionality ====<br />
:* '''Drivebys arent working as they should'''<br />
<br />
:Drivebys are handled by script, and will change depending on the loaded gamemode.<br />
<br />
==== Unsaved settings ====<br />
:* '''My MTA setting(s) didn't get saved (...) I crashed.'''<br />
<br />
:First, configure the MTA the way you want to, then exit the game and launch it again. Settings should get saved. Alternatively, try removing the coreconfig.xml file, then configure it and quit the game.<br />
<br />
==== Gamepad support ====<br />
:* '''MTA doesn't recognise my gamepad'''<br />
<br />
:Ensure that your controller is the first controller recognised by Windows (MTA will only use the first controller). You can configure your gamepad in options in MTASA's main menu.<br />
<br />
==== Free mouselook not working properly ====<br />
:* '''MTA doesnt recognise my mouse'''<br />
<br />
:Some people got problems with their mouse in MTA. They can use it in the menu, connect to a server, but they can't use the mouse for free look.<br />
:This problem can be solved by entering a server, click your Win/Windows key at your keyboard once, and then click your mouse.<br />
:If that doesn't work try starting GTA in Singleplayer, go to options > controler setup and set "Configuration" to "Mouse + Keys" instead of "Joypad".<br />
<br />
==== Server browser not working ====<br />
:* '''The in-game server browser shows "Loading" but does not come up with any servers'''<br />
<br />
:Depending on the type and status of the internet connection you are using, it can take up to a few seconds for the server browser to retrieve all the servers. Please wait a little longer for the results to appear.<br />
<br />
==== Invalid serial number ====<br />
:* '''I am getting an 'Invalid serial number' error when trying to launch or play the game'''<br />
<br />
:You are running an outdated version of Multi Theft Auto. Head over to the [https://mtasa.com/ main page] and download the latest version of Multi Theft Auto.<br />
<br />
==== 'Network module not compatible!' on MTA:SA launch ====<br />
:* '''I am getting 'Network module not compatible!' error message upon launching MTA:SA<br />
<br />
:This could mean that your MTA:SA install is incomplete or broken. Reinstall it.<br />
<br />
==== 'No such mod installed (deathmatch)' ====<br />
:* '''I am getting a 'No such mod installed (deathmatch)' error message when trying to connect to any server<br />
<br />
:'''Option 1:''' Simply re-install MTA. <br><br />
:'''Option 2:''' Run both gta_sa.exe and Multi Theft Auto.exe with administrator privileges.<br />
<br />
==== D3dx9_**.dll is not found ====<br />
:* '''When I start Multi Theft Auto: San Andreas I am getting an error D3dx9_**.dll (** = a number) cannot be found.<br />
<br />
:This means that DirectX 9 is not installed or not up to date.<br />
:To install/update DirectX download the [https://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=2da43d38-db71-4c1b-bc6a-9b6652cd92a3 DirectX End-User Runtime Web Installer] from the Microsoft download site.<br />
<br />
==== CRC mismatch ====<br />
:* '''When joining a server, the chatbox shows 'CRC mismatch'<br />
:This is a server problem. Tell the owner to look at the server section of this page.<br />
<br />
==== 'Error loading netc.dll module! (Error 14001)' on MTA:SA launch ====<br />
:* Full error message:<br />
:''Error loading netc.dll module! (Error 14001: The application has failed to start because its side-by-side configuration is incorrect. Please see the application event log for more detail.)''<br />
<br />
:Make sure you have installed Microsoft Visual C++ 2008 regular and SP1 redistributable packages (x86):<br />
<br />
:[https://www.microsoft.com/downloads/details.aspx?FamilyID=9b2da534-3e03-4391-8a4d-074b9f2bc1bf&displaylang=en Microsoft Visual C++ 2008 Redistributable package (x86)]<br />
<br />
:[https://www.microsoft.com/download/en/details.aspx?id=5582 Microsoft Visual C++ 2008 SP1 Redistributable package (x86)]<br />
<br />
==== 'Error 1935. An error occurred during the installation of assembly 'Microsoft.VC90.ATL...' ====<br />
: Download the 'Fix it' helper from here: [https://support.microsoft.com/default.aspx?scid=kb;en-us;946414]<br />
<br />
==== Your virus scanner warns you about MTA:SA ====<br />
:* '''Your virus scanner informs you that the MTA:SA or setup executable is a virus or malware.'''<br />
:MTA does '''NOT''' contain any viruses, malware, adware or spyware. You should re-download MTASA [https://mtasa.com here] if you doubt the validity of your copy of MTA.<br />
<br />
==== When downloading large maps, progress halts ====<br />
:* '''When downloading large maps, progress often halts, while transmission is still taking place.'''<br />
:This issue is fixed in [https://forum.mtasa.com/topic/33297-multi-theft-auto-san-andreas-13-released/ MTA:SA 1.3].<br />
<br />
=== Windows Vista® / Windows 7-specific ===<br />
<br />
==== Crash on connect ====<br />
:* '''I seem to crash whenever I connect to a server just before I go in-game on Vista'''<br />
<br />
:This seems to be an issue with the Microsoft DirectX April 2006 SDK Redistributable DLL file (d3dx9_30.dll) when running in compatibility mode. Please make sure that compatibility mode is competely turned off for '''both''' your GTA_SA.exe and Multi Theft Auto.exe executables.<br />
<br />
==== Clock manipulation error ====<br />
:* '''I am getting 'Clock manipulation detected!' error message upon launching MTA:SA<br />
<br />
:This is caused by incorrect system date/time being set (which could be a result of wrong settings or a faulty battery on the pc's motherboard). Setting time and date again should fix the problem.<br />
<br />
:It might also happen if you are using an AMD Athlon 64 X2 processor with some old drivers. Update them at [https://support.amd.com/en-us/download AMD's site].<br />
<br />
==== Halt on launch ====<br />
:* '''When I launch MTA:SA, nothing happens (GTA_SA.exe is running but not loading up)<br />
<br />
:Run MTA:SA with Administrator privileges. To do this, right click on the installer executable, choose 'Properties', go into 'Compatibility' tab and tick the check box on the last field and try again.<br />
<br />
==== General GTA problems ====<br />
:* '''I have unexplainable GTA problems or crashes'''<br />
<br />
:Make sure your computer as well as your GTA install meet the [[Deathmatch_Client_Manual#System_requirements|minimum requirements]] and that you are not running in any 98/2000/XP/2003 compatibility modes.<br />
<br />
:Also try the solutions from these pages:<br />
:* http://gtaforums.com/topic/307992-san-andreas-v1-works-on-windows-vista/<br />
:* [https://web.archive.org/web/20160330172922/http://pullmonkey.com/2007/4/30/how-i-got-gta-san-andreas-to-work-with-a-crappy-os-vista http://pullmonkey.com/2007/4/30/how-i-got-gta-san-andreas-to-work-with-a-crappy-os-vista]<br />
<br />
==== Performance Issues Sandy Bridge / Second Generation Intel Core ====<br />
:* '''Slow MTA performance on Sandy Bridge Processors while other games and San Andreas Singleplayer run fine.'''<br />
:There seems to be a issue in combination with the Windows power profile running in power saving mode, you can solve this issue by changing the power profile to high performance when playing MTA:SA.<br />
:* Topic about this issue: [https://forum.mtasa.com/topic/26441-solved-sandy-bridge-performance-issues/ Sandy Bridge performance issues?]<br />
<br />
== Server ==<br />
<br />
=== General ===<br />
==== Fatal error 3 ====<br />
:* '''I'm getting ''Fatal Error 3'' whenever I connect to my server'''<br />
<br />
:This error happens when the server you are trying to connect to is unable to provide you the required downloads, because it does not have http downloading enabled. Be sure to set the '''httpdownload''' configuration tag in your configuration to '''1'''.<br />
==== Download error 9: Error downloading requested files ====<br />
:* '''I'm getting ''Download Error 9: Error downloading requested files'' whenever I connect to my server'''<br />
<br />
:This error happens when the server you are trying to connect to is unable to provide you with a valid link. This results in a 404 (Not found) HTTP error and an error at your end.<br />
<br />
:* If you are running the built-in server ('''httpserver''' is set to '''1''' and '''httpdownloadurl''' is empty), make sure that your HTTP server is accessible (you can try to access it by using a browser) for everyone.<br />
<br />
:* If you have configured an external web server ('''httpdownloadurl''' is set to your custom URL), make sure that your HTTP is accessible and make sure you have read the [[Deathmatch_Server_Manual#Configuring_an_external_web_server | Configuring an external web server]] guide.<br />
<br />
==== CRC mismatch ====<br />
:* '''When clients join my server, their chatbox shows 'CRC mismatch'<br />
:CRC mismatch occurs when either:<br />
:* The server files have been changed, but the resource has not been restarted/refreshed<br />
:* An external http server is being used and the files are not synchronized<br />
<br />
==== Accounts missing ====<br />
:The file ''accounts.xml'' is not used from 1.0.4, it has been replaced by a file called ''internal.db''. To ensure your old accounts information is migrated:<br />
:*Stop the server<br />
:*Make sure your old ''accounts.xml'' is correct<br />
:*Delete ''internal.db''<br />
:*Start the server<br />
<br />
==== Resources missing ====<br />
:From 1.0.4, resource names cannot contain dots.<br />
<br />
==== Download error 28 ====<br />
:Try closing anti-virus or firewall applications. If it then works, try adding an exception to your firewall to allow your http port through.<br />
<br />
==== Accounts disappearing ====<br />
:Account information (or anything else) not being saved correctly can be caused by database corruption. From build 2836, the server checks the integrity of the sqlite database files on startup. If it reports a database error, please read [[How to repair the database files]].<br />
:If you are running an earlier version and are having troubles such as accounts disappearing, you should upgrade your server to the [https://nightly.multitheftauto.com/ lastest build]<br />
<br />
=== Windows-related ===<br />
:No known reported issues in {{Current Version|full}}.<br />
<br />
=== Linux-related ===<br />
====Default nohup creates infinitely big nohup.out====<br />
<br />
:Temporary fix, disable the nohup file: 'nohup ./mta_server > /dev/null &'<br />
<br />
[[es:Problemas Conocidos - FAQ]]<br />
[[it:Bugs noti e FAQ]]<br />
[[ru:Known Issues - FAQ]]<br />
[[de:Known Issues - FAQ]]<br />
[[pt-br:Soluções de Problemas - FAQ]]<br />
[[hu:Known Issues - FAQ]]<br />
[[zh-cn:已知问题 - 常见问题]]<br />
<br />
[[Category:Support]]</div>Ccwhttps://wiki.multitheftauto.com/index.php?title=Support_-_MTA_Client_and_Process_Monitor&diff=52760Support - MTA Client and Process Monitor2017-11-04T00:00:47Z<p>Ccw: /* 9. Find the file 'Logfile.PML' and upload at http://upload.mtasa.com/ */</p>
<hr />
<div>__NOTOC__<br />
==Instructions for generating a process log for MTA:SA Client==<br />
<br />
<br />
===1. Download Process Monitor from here: http://technet.microsoft.com/en-us/sysinternals/bb896645 ===<br />
[[File:Client_pm_1.jpg|frame|center]]<br />
<hr/><br />
===2. Unzip ProcessMonitor.zip ===<br />
<hr/><br />
===3. Download http://nightly.mtasa.com/files/ProcmonMTAConfiguration.pmc and put it into the Process Monitor directory ===<br />
[[File:Client_pm_2.jpg|frame|center]]<br />
<hr/><br />
===4. Start Procmon.exe (if it starts with a window called 'Process Monitor Filter', press OK to close it).===<br />
===Then select the menu item ''''File'''->'''Import Configuration'''' ===<br />
(If you can't select 'Import Configuration', try running Procmon.exe as administrator)<br />
[[File:Client_pm_3.jpg|frame|center]]<br />
<hr/><br />
===5. Select the ''''ProcmonMTAConfiguration.pmc'''' file and press ''''Open'''' ===<br />
<hr/><br />
===6. Now start MTA and get to the problem ===<br />
<hr/><br />
===7. After problem has occurred, go back to the Process Monitor window and select the menu item ''''File'''->'''Save...'''' ===<br />
[[File:Client_pm_4.jpg|frame|center]]<br />
<hr/><br />
===8. Press the ''''Ok'''' button in the next window ===<br />
<hr/><br />
===9. Find the file ''''Logfile.PML'''' and upload at https://upload.mtasa.com/ ===<br />
(Give the resulting file link to an MTA developer, or post it on the relevant forum topic)<br />
[[File:Client_pm_5.jpg|frame|center]]</div>Ccw