SetGlitchEnabled: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
(highcloserangedamage is disabled by default)
No edit summary
Line 2: Line 2:
{{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. By default all these glitches are disabled - use this function to '''enable''' them.
<!-- Not currently correct:
 
{{Note|Enabling '''fastmove''' or '''crouchbug''' will automatically enable [[Server_mtaserver.conf#bullet_sync|bullet sync]] as they require it to function correctly}}
-->
==Syntax==
==Syntax==
<syntaxhighlight lang="lua">bool setGlitchEnabled ( string glitchName, bool enable )</syntaxhighlight>
<syntaxhighlight lang="lua">bool setGlitchEnabled ( string glitchName, bool enable )</syntaxhighlight>
Line 14: Line 12:
**'''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.
**'''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.
**'''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.
**'''highcloserangedamage''' - Enabling this removes the extremely high close range damage guns inflict when fired at very close range.
<div style="padding-left:19px;">
{{New feature|999.9999|1.3.2|
*'''hitanim''' - Enabling this allows 'hit by bullet' animations to interrupt player aiming.
}}
</div>
*'''enable:''' whether or not to enable the glitch..
*'''enable:''' whether or not to enable the glitch..


Line 29: Line 32:
     setGlitchEnabled ( "crouchbug", true )
     setGlitchEnabled ( "crouchbug", true )
     setGlitchEnabled ( "highcloserangedamage", true )
     setGlitchEnabled ( "highcloserangedamage", true )
    setGlitchEnabled ( "hitanim", true )
end
end
addEventHandler ( "onResourceStart", getResourceRootElement ( ), resourceStart )
addEventHandler ( "onResourceStart", getResourceRootElement ( ), resourceStart )

Revision as of 22:32, 29 April 2013

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.

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).
    • 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 [minclientversion ] server setting.
    • highcloserangedamage - Enabling this removes the extremely high close range damage guns inflict when fired at very close range.
ADDED/UPDATED IN VERSION 1.3.2 :
  • hitanim - Enabling this allows 'hit by bullet' animations to interrupt player aiming.
  • 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.

function resourceStart ()
    setGlitchEnabled ( "quickreload", true )
    setGlitchEnabled ( "fastmove", true )
    setGlitchEnabled ( "fastfire", true )
    setGlitchEnabled ( "crouchbug", true )
    setGlitchEnabled ( "highcloserangedamage", true )
    setGlitchEnabled ( "hitanim", true )
end
addEventHandler ( "onResourceStart", getResourceRootElement ( ), resourceStart )

See Also