//
// By iDesync, for YouGame.biz
//
//-------------------------MENU STUFF-------------------------//
UI.AddLabel("---Override Mindamage---");
UI.AddHotkey("Key");
UI.AddSliderInt("SCOUT", 0, 120);
UI.AddSliderInt("AWP", 0, 120);
UI.AddSliderInt("AUTOSNIPER", 0, 120);
UI.AddSliderInt("PISTOL", 0, 120);
UI.AddSliderInt("HEAVY PISTOL", 0, 120) + '\n';
UI.AddLabel("Indicator Position:");
const ScreenSize = Render.GetScreenSize();
UI.AddSliderInt("Height:", 0, ScreenSize[0]);
UI.AddSliderInt("Width:", 0, ScreenSize[1]);
//--------------------------------------------BACKUP VALUES------------------------------------------------------//
const cache = [UI.GetValue("Rage", "AWP", "Targeting", "Minimum damage"), // [1]
UI.GetValue("Rage", "SCOUT", "Targeting", "Minimum damage"), // [2]
UI.GetValue("Rage", "AUTOSNIPER", "Targeting", "Minimum damage"), // [3]
UI.GetValue("Rage", "PISTOL", "Targeting", "Minimum damage"), // [4]
UI.GetValue("Rage", "HEAVY PISTOL", "Targeting", "Minimum damage")]; // [5]
//------------------------------------------------WEAPONS CHECKS------------------------------------------------------//
function isPistol(weapon_name)
{
if (weapon_name == "usp s" || weapon_name == "dual berettas" || weapon_name == "p250" || weapon_name == "cz75 auto" || weapon_name == "glock 18")
{
return true;
}
}
function isHeavy(weapon_name)
{
if (weapon_name == "r8 revolver" || weapon_name == "desert eagle") // r8 doensn't works if csgo language - Russian
{
return true;
}
}
function isAuto(weapon_name)
{
if (weapon_name == "g3sg1" || weapon_name == "scar 20")
{
return true;
}
}
//----------------------------------------------DO WORK-----------------------------------------------------//
function SetupValues()
{
//-------------------------GET VALUES-------------------------//
weapon_name = Entity.GetName(Entity.GetWeapon(Entity.GetLocalPlayer()));
var values = [UI.GetValue("Misc", "JAVASCRIPT", "Script items", "AWP"), // [0]
UI.GetValue("Misc", "JAVASCRIPT", "Script items", "SCOUT"), // [1]
UI.GetValue("Misc", "JAVASCRIPT", "Script items", "PISTOL"), // [2]
UI.GetValue("Misc", "JAVASCRIPT", "Script items", "AUTOSNIPER"), // [3]
UI.GetValue("Misc", "JAVASCRIPT", "Script items", "HEAVY PISTOL")]; // [4]
//-------------------------SETUP VALUES-------------------------//
//---AWP---//
if (weapon_name == "awp" && UI.IsHotkeyActive("MISC", "JAVASCRIPT", "SCRIPT ITEMS", "Key")) // [0]
{
UI.SetValue("Rage", "AWP", "Targeting", "Minimum damage", values[0]);
}
else
{
UI.SetValue("Rage", "AWP", "Targeting", "Minimum damage", cache[0]);
}
//---SCOUT---//
if (weapon_name == "ssg 08" && UI.IsHotkeyActive("MISC", "JAVASCRIPT", "SCRIPT ITEMS", "Key")) // [1]
{
UI.SetValue("Rage", "SCOUT", "Targeting", "Minimum damage", values[1]);
}
else
{
UI.SetValue("Rage", "SCOUT", "Targeting", "Minimum damage", cache[1]);
}
//---AUTOSNIPER---//
if (isAuto(weapon_name) && UI.IsHotkeyActive("MISC", "JAVASCRIPT", "SCRIPT ITEMS", "Key")) // [2]
{
UI.SetValue("Rage", "AUTOSNIPER", "Targeting", "Minimum damage", values[2]);
}
else
{
UI.SetValue("Rage", "AUTOSNIPER", "Targeting", "Minimum damage", cache[2]);
}
//---PISTOLS---//
if (isPistol(weapon_name) && UI.IsHotkeyActive("MISC", "JAVASCRIPT", "SCRIPT ITEMS", "Key")) // [3]
{
UI.SetValue("Rage", "PISTOL", "Targeting", "Minimum damage", values[3]);
}
else
{
UI.SetValue("Rage", "PISTOL", "Targeting", "Minimum damage", cache[3]);
}
//---HEAVY PISTOLS---//
if (isHeavy(weapon_name) && UI.IsHotkeyActive("MISC", "JAVASCRIPT", "SCRIPT ITEMS", "Key")) // [4]
{
UI.SetValue("Rage", "HEAVY PISTOL", "Targeting", "Minimum damage", values[4]);
}
else
{
UI.SetValue("Rage", "HEAVY PISTOL", "Targeting", "Minimum damage", cache[4]);
}
}
function indicators()
{
//-------------------------GET VALUES & ETC-------------------------//
var X = UI.GetValue("Misc", "JAVASCRIPT", "Script items", "Height:");
var Y = UI.GetValue("Misc", "JAVASCRIPT", "Script items", "Width:");
var string;
//-------------------------WEAPON CHECKS-------------------------//
if (weapon_name == "ssg 08")
{
string = scout;
}
if (weapon_name == "awp")
{
string = awp;
}
if (isHeavy(weapon_name))
{
string = heavy;
}
if (isAuto(weapon_name))
{
string = auto;
}
if (isPistol(weapon_name))
{
string = pistol;
}
//-----------------------------GET VALUES & RENDER-------------------------------//
scout = "DMG: " + UI.GetValue("Rage", "SCOUT", "Targeting", "Minimum damage");
awp = "DMG: " + UI.GetValue("Rage", "AWP", "Targeting", "Minimum damage");
auto = "DMG: " + UI.GetValue("Rage", "AUTOSNIPER", "Targeting", "Minimum damage");
pistol = "DMG: " + UI.GetValue("Rage", "PISTOL", "Targeting", "Minimum damage");
heavy = "DMG: " + UI.GetValue("Rage", "HEAVY PISTOL", "Targeting", "Minimum damage");
Render.String(X, Y, 0, string, [255, 255, 255, 255]);
}
Cheat.RegisterCallback("Draw", "indicators");
Cheat.RegisterCallback("CreateMove", "SetupValues");