Государственная служба РФ
-
Автор темы
- #1
почему он не свичает на дефолт значения?
JavaScript:
UI.AddHotkey("Key");
UI.AddSliderInt("Override dmg", 1, 130);
function IshotkeyACTIVE() {
//var (gui)
var IskeyActive = UI.IsHotkeyActive( "Script items", "Key" )
var SliderValue = UI.GetValue( "Script items", "Override dmg" )
//var (cheat)
var General_cache = UI.GetValue( "Rage", "GENERAL", "Targeting", "Minimum damage" )
var Pistol_cache = UI.GetValue( "Rage", "PISTOL", "Targeting", "Minimum damage" )
var HeavyPistol_cache = UI.GetValue( "Rage", "HEAVY PISTOL", "Targeting", "Minimum damage" )
var Scout_cache = UI.GetValue( "Rage", "SCOUT", "Targeting", "Minimum damage" )
var Awp_cache = UI.GetValue( "Rage", "AWP", "Targeting", "Minimum damage" )
var AutoSniper_cache = UI.GetValue( "Rage", "AUTOSNIPER", "Targeting", "Minimum damage" )
//functionWork
if ( IskeyActive ) {
UI.SetValue( "Rage", "GENERAL", "Targeting", "Minimum damage", SliderValue );
UI.SetValue( "Rage", "PISTOL", "Targeting", "Minimum damage", SliderValue );
UI.SetValue( "Rage", "HEAVY PISTOL", "Targeting", "Minimum damage", SliderValue );
UI.SetValue( "Rage", "SCOUT", "Targeting", "Minimum damage", SliderValue );
UI.SetValue( "Rage", "AWP", "Targeting", "Minimum damage", SliderValue );
UI.SetValue( "Rage", "AUTOSNIPER", "Targeting", "Minimum damage", SliderValue );
} else if ( !IskeyActive ) {
UI.SetValue( "Rage", "GENERAL", "Targeting", "Minimum damage", General_cache );
UI.SetValue( "Rage", "PISTOL", "Targeting", "Minimum damage", Pistol_cache );
UI.SetValue( "Rage", "HEAVY PISTOL", "Targeting", "Minimum damage", HeavyPistol_cache );
UI.SetValue( "Rage", "SCOUT", "Targeting", "Minimum damage", Scout_cache );
UI.SetValue( "Rage", "AWP", "Targeting", "Minimum damage", Awp_cache );
UI.SetValue( "Rage", "AUTOSNIPER", "Targeting", "Minimum damage", AutoSniper_cache );
}
}
Cheat.RegisterCallback("Draw", "IshotkeyACTIVE");