SetGlitchEnabled: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
(highcloserangedamage is disabled by default)
(Undo revision 77198 by Samr46 (talk))
Tag: Undo
 
(22 intermediate revisions by 14 users not shown)
Line 1: Line 1:
__NOTOC__
__NOTOC__
{{Server function}}
{{Server function}}
This function enables or disables glitches that are found in the original Single Player game that can be used to gain an advantage in multiplayer. By default all these glitches are disabled - use this function to '''enable''' them.
This function enables or disables glitches that are found in the original Single Player game that can be used to gain an advantage in multiplayer.  
<!-- Not currently correct:
{{Note|By default all these glitches are disabled - use this function to '''enable''' them.}}
{{Note|Enabling '''fastmove''' or '''crouchbug''' will automatically enable [[Server_mtaserver.conf#bullet_sync|bullet sync]] as they require it to function correctly}}
 
-->
Users of the '''fastmove''' glitch may additionally want to install [https://community.mtasa.com/index.php?p=resources&s=details&id=13368 this resource to disable crouchsliding].
 
==Syntax==
==Syntax==
<syntaxhighlight lang="lua">bool setGlitchEnabled ( string glitchName, bool enable )</syntaxhighlight>
<syntaxhighlight lang="lua">bool setGlitchEnabled ( string glitchName, bool enable )</syntaxhighlight>
Line 10: Line 11:
===Required Arguments===
===Required Arguments===
*'''glitchName:''' the name of the property to set. Possible values are:
*'''glitchName:''' the name of the property to set. Possible values are:
**'''quickreload''' - This is the glitch where switching weapons auto-reloads your weapon, without actually performing the reload animation.
{{Glitches}}
**'''fastmove''' - This is the glitch that can be achieved by a certain key combinations whilst standing up after crouching, which allows you to move quickly with slow weapons (e.g. deagle).
*'''enable:''' whether or not to enable the glitch.
**'''fastfire''' - This is the glitch that can be achieved by cancelling the full fire animation, allowing you to shoot with slow-fire weapons (e.g. deagle) much faster.
**'''crouchbug''' - This glitch is only available on servers and clients higher that 1.0.4-9.02035.0 - If you want to use it, it is advisable to use the [[http://wiki.multitheftauto.com/wiki/Server_Manual#Client_Checks minclientversion ]] server setting.
**'''highcloserangedamage''' - Disabling this removes the extremely high close range damage guns inflict when fired at very close range.
*'''enable:''' whether or not to enable the glitch..


===Returns===
===Returns===
Line 23: Line 20:
This example enables all glitches in the server once the resource is loaded.
This example enables all glitches in the server once the resource is loaded.
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
function resourceStart ()
local glitches = {"quickreload", "fastmove", "fastfire", "crouchbug", "highcloserangedamage", "hitanim", "fastsprint", "baddrivebyhitbox", "quickstand", "kickoutofvehicle_onmodelreplace"}
    setGlitchEnabled ( "quickreload", true )
 
    setGlitchEnabled ( "fastmove", true )
function enableGlitches()
    setGlitchEnabled ( "fastfire", true )
  for _, glitch in ipairs(glitches) do
    setGlitchEnabled ( "crouchbug", true )
      setGlitchEnabled(glitch, true)
    setGlitchEnabled ( "highcloserangedamage", true )
  end
end
end
addEventHandler ( "onResourceStart", getResourceRootElement ( ), resourceStart )
addEventHandler("onResourceStart", resourceRoot, enableGlitches)
</syntaxhighlight>
</syntaxhighlight>


==See Also==
==See Also==
{{Server functions}}
{{Server functions}}

Latest revision as of 22:00, 25 July 2023

This function enables or disables glitches that are found in the original Single Player game that can be used to gain an advantage in multiplayer.

[[{{{image}}}|link=|]] Note: By default all these glitches are disabled - use this function to enable them.

Users of the fastmove glitch may additionally want to install this resource to disable crouchsliding.

Syntax

bool setGlitchEnabled ( string glitchName, bool enable )

Required Arguments

  • glitchName: the name of the property to set. Possible values are:
  • quickreload: This is the glitch where switching weapons auto-reloads your weapon, without actually performing the reload animation.
  • fastmove: This is the glitch that can be achieved by a certain key combinations whilst standing up after crouching, which allows you to move quickly with slow weapons (e.g. deagle). Side effect: also enables the "crouchslide" bug - use the "NoCrouchSlide" resource to remedy this.
  • fastfire: This is the glitch that can be achieved by cancelling the full fire animation, allowing you to shoot with slow-fire weapons (e.g. deagle) much faster.
  • crouchbug: This is the glitch where the post shooting animation can be aborted by using the crouch key.
  • highcloserangedamage: Enabling this removes the extremely high damage guns inflict when fired at very close range.
  • hitanim: Enabling this allows 'hit by bullet' animations to interrupt player aiming.
  • fastsprint: Enabling fastsprint allows players to tap space with a macro to boost their speed beyond normal speeds of GTASA.
  • baddrivebyhitbox: This glitch leaves players invulnerable to gun fire when performing certain driveby animations.
  • quickstand: This glitch allows players to quickly stand up by pressing the crouch, sprint or jump controls just after realasing the aim weapon button while using one and being ducked.
  • kickoutofvehicle_onmodelreplace: This glitch enables the old behavior where players get warped out of a vehicle when the model is replaced.
  • enable: whether or not to enable the glitch.

Returns

Returns true if successful, false otherwise.

Example

This example enables all glitches in the server once the resource is loaded.

local glitches = {"quickreload", "fastmove", "fastfire", "crouchbug", "highcloserangedamage", "hitanim", "fastsprint", "baddrivebyhitbox", "quickstand", "kickoutofvehicle_onmodelreplace"}

function enableGlitches()
   for _, glitch in ipairs(glitches) do
      setGlitchEnabled(glitch, true)
   end 
end
addEventHandler("onResourceStart", resourceRoot, enableGlitches)

See Also