function GetScriptOption(name)
{
var Value = UI.GetValue("Misc", "JAVASCRIPT", "Script items", name);
return Value;
}
UI.AddHotkey('hc override');
UI.AddSliderInt('hc val', 1, 100);
var heavy_cache = UI.GetValue("Rage", "HEAVY PISTOL", "Accuracy", "Hitchance");
var pistol_cache = UI.GetValue("Rage", "PISTOL", "Accuracy", "Hitchance")
var scout_cache = UI.GetValue("Rage", "SCOUT", "Accuracy", "Hitchance")
var awp_cache = UI.GetValue("Rage", "AWP", "Accuracy", "Hitchance");
var auto_cache = UI.GetValue("Rage", "AUTOSNIPER", "Accuracy", "Hitchance");
function hc_override() {
var val = GetScriptOption('hc val');
if (UI.IsHotkeyActive("Script items", "hc override"))
{
UI.SetValue("Rage", "HEAVY PISTOL", "Accuracy", "Hitchance", val);
UI.SetValue("Rage", "SCOUT", "Accuracy", "Hitchance", val);
UI.SetValue("Rage", "AWP", "Accuracy", "Hitchance", val);
UI.SetValue("Rage", "AUTOSNIPER", "Accuracy", "Hitchance", val);
UI.SetValue("Rage", "PISTOL", "Accuracy", "Hitchance", val);
}
else {
UI.SetValue("Rage", "HEAVY PISTOL", "Accuracy", "Hitchance", heavy_cache);
UI.SetValue("Rage", "SCOUT", "Accuracy", "Hitchance", scout_cache);
UI.SetValue("Rage", "AWP", "Accuracy", "Hitchance", awp_cache);
UI.SetValue("Rage", "AUTOSNIPER", "Accuracy", "Hitchance", auto_cache);
UI.SetValue("Rage", "PISTOL", "Accuracy", "Hitchance", pistol_cache);
}
}
Cheat.RegisterCallback("CreateMove", "hc_override");