UI.AddCheckbox("Pitch zero on land");
const groundCounter = 0;
const pitchZeroOnLand = function () {
if (!UI.GetValue('Misc', 'JAVASCRIPT', 'Script items', "Pitch zero on land")) return;
if (!Entity.GetLocalPlayer()) return;
UI.SetValue('Misc', 'PERFOMANCE & INFORMATION', 'Information', 'Restrictions', 0);
const localPlayer = Entity.GetLocalPlayer();
const localPlayerFlags = Entity.GetProp(localPlayer, "CBasePlayer", "m_fFlags");
if (localPlayerFlags == 256 || localPlayerFlags == 262) {
groundCounter = 0;
}
if (localPlayerFlags == 257 || localPlayerFlags == 261 || localPlayerFlags == 263) {
groundCounter = groundCounter + 1;
}
if (groundCounter > 10 && groundCounter < 250) {
UI.SetValue('Anti-Aim', 'Extra', 'Pitch', 3);
} else {
UI.SetValue('Anti-Aim', 'Extra', 'Pitch', 1);
}
}
Cheat.RegisterCallback("Draw", "pitchZeroOnLand");