life is cheap, death is free!
-
Автор темы
- #1
JavaScript:
var screen_size = Global.GetScreenSize();
var isLeftActive = UI.IsHotkeyActive( "Misc", "JAVASCRIPT", "Script items", "Left Hotkey" );
var isRightActive = UI.IsHotkeyActive( "Misc", "JAVASCRIPT", "Script items", "Right Hotkey" );
var isForwardActive = UI.IsHotkeyActive( "Misc", "JAVASCRIPT", "Script items", "Forward Hotkey" );
var isInverted;
var drawLeft = 1; drawHideReal = 1;
var drawRight = 0, drawBack = 0;
var leftWasPressed = false; var rightWasPressed = false; var backWasPressed = false; var upWasPressed = false;
var time, delay, fillbar, shotsfired;
function isDoubleTapActive()
{
var isCheckboxActive = UI.GetValue("Rage", "Exploits", "Doubletap");
var isKeyActive = UI.IsHotkeyActive("Rage", "Exploits", "Doubletap");
return isCheckboxActive && isKeyActive;
}
function correctLBYMode()
{
if (isDoubleTapActive() == 1)
{
UI.SetValue("Anti-Aim", "Fake angles", "LBY mode", "0")
UI.SetValue("Rage", "AUTOSNIPER", "Accuracy", "Auto stop mode", 6);
}
else
{
UI.SetValue("Anti-Aim", "Fake angles", "LBY mode", "1")
UI.SetValue("Rage", "AUTOSNIPER", "Accuracy", "Auto stop mode", 64);
}
}
correctLBYMode();
//Weapon fire event
function EVENT_WEAPON_FIRE()
{
iShotsFired = Event.GetInt("userid"); iShotsFired_index = Entity.GetEntityFromUserID(iShotsFired);
if(Entity.GetLocalPlayer() == iShotsFired_index)
{
if(UI.IsHotkeyActive("Rage", "GENERAL", "Exploits", "Doubletap", "Enabled"))
{
//Released only once
if(shotsfired == 0)
{
time = Globals.Curtime();
delay = time+0.3;
fillbar = 0;
}
}
}
}
var jump = false
function drawString()
{
correctLBYMode();
arrows_color = UI.GetColor( "Misc", "JAVASCRIPT", "Script items", "Arrows color" );
s_arrow_color = UI.GetColor( "Misc", "JAVASCRIPT", "Script items", "Selected arrow color" );
isDoubletap = UI.IsHotkeyActive("Rage", "Exploits", "Doubletap");
isInverted = UI.IsHotkeyActive("Anti-Aim", "Fake angles", "Inverter");
isHideReal = UI.IsHotkeyActive("Anti-Aim", "Fake angles", "Hide real angle");
isHIDESHOTS = UI.IsHotkeyActive("Rage", "Exploits", "Hide shots");
isLOWDELTA = UI.IsHotkeyActive("Misc", "Javascript", "Low delta on key");
isDMG = UI.IsHotkeyActive("Misc", "Javascript", "Heavy Pistol Override");
isDMG = UI.IsHotkeyActive("Misc", "Javascript", "Scout Override");
isDMG = UI.IsHotkeyActive("Misc", "Javascript", "AWP Override");
isDMG = UI.IsHotkeyActive("Misc", "Javascript", "Auto Override");
isSP = UI.IsHotkeyActive("Rage", "General", "Safe point override");
isBAIM = UI.IsHotkeyActive("Rage", "General", "Force body aim");
isFD = UI.IsHotkeyActive("Anti-Aim", "Extra", "Fake duck");
arrows_type = UI.GetValue( "Misc", "JAVASCRIPT", "Script items", "Arrows" );
dt_color = [255,0,0,255]
is_DT = false
g_Local = Entity.GetLocalPlayer( );
g_Local_weapon = Entity.GetWeapon(g_Local);
weapon_name = Entity.GetName(g_Local_weapon);
g_Local_classname = Entity.GetClassName( g_Local_weapon );
DT = "DT ";
add_y = 58;
if(UI.GetValue( "Rage", "GENERAL", "Exploits", "Doubletap" ))
{
//Enabled
if(isDoubletap)
{
curtime = Globals.Curtime();
//>_<
if (curtime <= delay)
{
fillbar+=2;
shotsfired = 1;
//Not allowing fill more
if(fillbar >= 30) fillbar = 30;
dt_color = [255, 0, 0, 255]
}
else
{
dt_color = [0, 255, 0, 255]
shotsfired = 0; //Released
}
}
else
{
//Disabled
dt_color = [255, 0, 0, 255]
}
}
if ((g_Local_classname == "CKnife" || g_Local_classname == "CWeaponSSG08" || g_Local_classname == "CWeaponAWP" || weapon_name == "r8 revolver" || g_Local_classname == "CHEGrenade" || g_Local_classname == "CMolotovGrenade" || g_Local_classname == "CIncendiaryGrenade" || g_Local_classname == "CFlashbang" || g_Local_classname == "CSmokeGrenade" || g_Local_classname == "CDecoyGrenade" || g_Local_classname == "CWeaponTaser" || g_Local_classname == "CC4"))
{
if (isFD) {
DT = DT + "(fakeduck)";
} else {
DT = DT + "(active weapon)";
}
is_DT = false;
} else
{
DT = isFD ? "DT (fakeduck)" : "DT ";
is_DT = !isFD & isDoubletap;
}
UI.SetValue( "Rage", "Exploits", "Doubletap", is_DT );
if (arrows_type == 1) {
Render.Polygon( [ [ screen_size[0] /2 -62, screen_size[1] /2 ], [ screen_size[0] /2 -45, screen_size[1] /2 -10 ], [ screen_size[0] /2 -45, screen_size[1] /2 + 10] ], drawLeft ? s_arrow_color : arrows_color ); // LEFT
Render.Polygon( [ [ screen_size[0] /2 + 45, screen_size[1] /2 + 10], [ screen_size[0] /2 + 45, screen_size[1] /2 -10], [ screen_size[0] /2 + 62, screen_size[1] /2] ], drawRight ? s_arrow_color : arrows_color ); // RIGHT
}
if (arrows_type == 2) {
Render.String(screen_size[0] /2 -50, screen_size[1] /2 -20, 1, "<", drawLeft ? s_arrow_color : arrows_color, 4 );
Render.String(screen_size[0] /2 +50, screen_size[1] /2 -20, 1, ">", drawRight ? s_arrow_color : arrows_color, 4 );
}
if (arrows_type == 3) {
Render.String(screen_size[0] /2 -50, screen_size[1] /2 -20, 1, "<", isInverted ? s_arrow_color : arrows_color, 4 );
Render.String(screen_size[0] /2 +50, screen_size[1] /2 -20, 1, ">", isInverted ? s_arrow_color : arrows_color, 4 );
}
if(UI.GetValue('Misc', 'JAVASCRIPT', 'Script items', 'Display indicators' ))
{
Render.String(screen_size[0] /2 +5, screen_size[1] /2 +10, 0, isInverted ? "LEFT" : "RIGHT", [ 255, 255, 255, 255 ],3 );
Render.String(screen_size[0] /2 +5, screen_size[1] /2 +19, 0, is_DT ? DT : DT, dt_color,3 );
if (isHIDESHOTS) {
add_y = add_y + 9;
Render.String(screen_size[0] /2 +5, screen_size[1] /2 + add_y, 0, "ONSHOT", [ 124, 195, 13, 255 ],3 );
}
if (isDMG) {
add_y = add_y + 9;
Render.String(screen_size[0] /2 +5, screen_size[1] /2 + add_y, 0, "DMG", [ 255, 255, 255, 255 ],3 );
}
if (isLOWDELTA) {
add_y = add_y + 9;
Render.String(screen_size[0] /2 +5, screen_size[1] /2 + add_y, 0, "PARADISE YAW", [ 215, 129, 161, 255 ],3 );
}
if (isFD) {
add_y = add_y + 9;
Render.String(screen_size[0] /2 +5, screen_size[1] /2 + add_y, 0, "DUCK", [ 255, 255, 255, 255 ] ,3 );
}
if (isSP) {
add_y = add_y + 9;
Render.String(screen_size[0] /2 +5, screen_size[1] /2 + add_y, 0, "SP", [ 124, 195, 13, 255 ] ,3 );
}
if (isBAIM) {
add_y = add_y + 9;
Render.String(screen_size[0] /2 +5, screen_size[1] /2 + add_y, 0, "BAIM", [ 124, 195, 13, 255 ] ,3 );
}
}
}
var oldTick = 0
var lastPressed = 0
var isHideRealActive = false
function onCreateMove()
{
isLeftActive = UI.IsHotkeyActive( "Misc", "JAVASCRIPT", "Script items", "Left Hotkey" );
isRightActive = UI.IsHotkeyActive( "Misc", "JAVASCRIPT", "Script items", "Right Hotkey" );
isBackwardsActive = UI.IsHotkeyActive( "Misc", "JAVASCRIPT", "Script items", "Backwards Hotkey" );
isForwardActive = UI.IsHotkeyActive( "Misc", "JAVASCRIPT", "Script items", "Forward Hotkey" );
if(isLeftActive && leftWasPressed == false)
{
lastPressed = Global.Tickcount();
isHideRealActive = false;
leftWasPressed = true;
backWasPressed = false;
rightWasPressed = false;
upWasPressed = false;
drawLeft = 1;
drawBack = 0;
drawRight = 0;
UI.SetValue( "Anti-Aim", "Rage Anti-Aim", "Yaw offset", -90 );
UI.SetValue( "Anti-Aim", "Fake Angles", "Hide real angle", false);
} else if(isLeftActive && leftWasPressed == true && Global.Tickcount() > lastPressed + 16){
isHideRealActive = true;
oldTick = Global.Tickcount();
}
if(isRightActive && rightWasPressed == false)
{
lastPressed = Global.Tickcount();
isHideRealActive = false;
backWasPressed = false;
leftWasPressed = false;
rightWasPressed = true;
upWasPressed = false;
drawLeft = 0;
drawBack = 0;
drawRight = 1;
UI.SetValue( "Anti-Aim", "Rage Anti-Aim", "Yaw offset", 90 );
UI.SetValue( "Anti-Aim", "Fake Angles", "Hide real angle", false);
} else if(isRightActive && rightWasPressed == true && Global.Tickcount() > lastPressed + 16){
isHideRealActive = true;
oldTick = Global.Tickcount();
}
if(isBackwardsActive && backWasPressed == false && Global.Tickcount() > lastPressed + 16)
{
lastPressed = Global.Tickcount();
isHideRealActive = false;
backWasPressed = true;
rightWasPressed = false;
leftWasPressed = false;
upWasPressed = false;
drawLeft = 0;
drawBack = 1;
drawRight = 0;
UI.SetValue( "Anti-Aim", "Rage Anti-Aim", "Yaw offset", 0 );
UI.SetValue( "Anti-Aim", "Fake Angles", "Hide real angle", false);
} else if(isBackwardsActive && backWasPressed == true && Global.Tickcount() > lastPressed + 16) {
isHideRealActive = true;
oldTick = Global.Tickcount();
}
if(isForwardActive && upWasPressed == false && Global.Tickcount() > lastPressed + 16)
{
lastPressed = Global.Tickcount();
isHideRealActive = false;
backWasPressed = false;
rightWasPressed = false;
leftWasPressed = false;
upWasPressed = true;
drawLeft = 0;
drawBack = 0;
drawRight = 0;
UI.SetValue( "Anti-Aim", "Rage Anti-Aim", "Yaw offset", 180 );
UI.SetValue( "Anti-Aim", "Fake Angles", "Hide real angle", false);
}
if(isHideRealActive)
{
if (Global.Tickcount() > oldTick + 16){
backWasPressed = false;
rightWasPressed = false;
leftWasPressed = false;
upWasPressed = false;
oldTick = Global.Tickcount();
}
drawLeft = 0;
drawBack = 0;
drawRight = 0;
UI.SetValue("Anti-Aim", "Rage Anti-Aim", "Yaw offset", 0 );
UI.SetValue("Anti-Aim", "Fake Angles", "Hide real angle", true);
}
UI.SetValue( "Anti-Aim", "Rage Anti-Aim", "At targets", isHideRealActive ? true : false );
}
function player_connect(){
lastPressed = Global.Tickcount();
oldTick = Global.Tickcount();
time = Globals.Curtime();
delay = time+0.3;
}
function Main()
{
UI.AddDropdown( "Arrows", [ "Off", "triangle", "arrows", "inverter arrow" ] );
UI.AddColorPicker( "Arrows color" )
UI.AddColorPicker( "Selected arrow color" )
UI.AddHotkey( "Left Hotkey" );
UI.AddHotkey( "Right Hotkey" );
UI.AddHotkey( "Forward Hotkey" );
UI.AddCheckbox( "Display indicators");
// callbacks
Global.RegisterCallback("Draw", "drawString")
Global.RegisterCallback("CreateMove", "onCreateMove")
Global.RegisterCallback("player_connect_full", "player_connect")
Global.RegisterCallback("weapon_fire", "EVENT_WEAPON_FIRE");
}
Main();
+ проблема индикаторов, пока right : left и dt индикаторы встали нормально то остальные не ставятся как надо
Последнее редактирование: