setGlitchEnabled | Multi Theft Auto: Wiki Skip to content

setGlitchEnabled

Client-side
Server-side
Shared

This page is incomplete! Help wanted!

Please finish this page using the corresponding Old Wiki article.
Go to Contribution guidelines for more information.


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.

Note

By default all these glitches are disabled - use this function to enable them.

Syntax

setGlitchEnabled ( )

Code Examples

server

This example allows you to toggle specific glitch usingtrueorfalse.

local glitchesData = {
["quickreload"] = false,
["fastmove"] = false,
["fastfire"] = false,
["crouchbug"] = false,
["highcloserangedamage"] = false,
["hitanim"] = false,
["fastsprint"] = false,
["baddrivebyhitbox"] = false,
["quickstand"] = false,
["kickoutofvehicle_onmodelreplace"] = false,
["vehicle_rapid_stop"] = false,
}
local function toggleGlitches()
for glitchName, glitchState in pairs(glitchesData) do
setGlitchEnabled(glitchName, glitchState)
end
end
addEventHandler("onResourceStart", resourceRoot, toggleGlitches)