Смотрите видео ниже, чтобы узнать, как установить наш сайт в качестве веб-приложения на домашнем экране.
Примечание: Эта возможность может быть недоступна в некоторых браузерах.
bool enableMenu = false;
bool enableDormant = false;
float minimumDamage = 0.0f;
void init() {
RegisterCallback("OnMenu", onMenuCallback);
RegisterCallback("OnCreateMove", onCreateMove);
}
void onMenuCallback() {
if(!CheatVars.menuOpen)
return;
if(Menu::Begin("Dormant Aimbot - by ScommerOfc", enableMenu, 0)) {
Menu::Checkbox("Enable Dormaint Aimbot", enableDormant);
Menu::SliderFloat("Minimum Damage", minimumDamage , 0, 100, "%1.f", 1.f);
Menu::End();
}
}
void onCreateMove(CUserCmd & cmd, bool & sendPacket) {
if(!enableDormant)
return;
CBaseEntity@ localPlayer = Interfaces.ClientEntityList.GetLocalPlayer();
CBaseCombatWeapon@ localWeapon = localPlayer.GetWeapon();
float inacuccary = localWeapon.GetInaccuracy();
if(localPlayer is null || localWeapon is null)
return;
if(!localWeapon.IsGrenade() || localWeapon.GetItemDefinitionIndex() != 59 || !localWeapon.InReload()) { //Exception Handling
int maxPlayers = Interfaces.EngineClient.GetMaxClients();
for (int i = 1 ; i <= maxPlayers ; i++) {
CBaseEntity@ player = Interfaces.ClientEntityList.GetBaseEntity(i);
if(player.IsEnemy() and player.GetDormant() and player.IsAlive()) { //Filter out targets
Vector eyeAngles = localPlayer.GetEyePos(); //Shot from this position
Vector enemyAngle = player.GetHitboxPoint(HITBOX_BODY); //Position to shoot
player.UpdateVisibility(); //Refresh a last time to ensure dormancy
if(Util.IsPointHitable(eyeAngles, enemyAngle, localPlayer, player, minimumDamage)) { //Can We Hit For Minumum Damagge???
QAngle finalAngle = Math.CalcAngle(eyeAngles, enemyAngle) - localPlayer.GetAimPunchAngle() * 4.f; //Get the final angle to shoot to
cmd.viewangles = finalAngle; //Set our view to the angle
cmd.buttons |= IN_ATTACK; //Shoot
}
}
}
}
}
//PS: I am gay
// @credits: https://monolith.club/index.php?members/waparabka.1381/
// enjoy!
namespace winapi { // OneShot's code <3
const uint createFileA = FFI::GetProcAddress("Kernel32.dll", "CreateFileA");
const uint closeHandle = FFI::GetProcAddress("Kernel32.dll", "CloseHandle");
const uint readFile = FFI::GetProcAddress("Kernel32.dll", "ReadFile");
const uint OPEN_EXISTING = 3;
const uint GENERIC_READ = 0x80000000;
const uint FILE_ATTRIBUTE_NORMAL = 0x80;
const uint INVALID_HANDLE_VALUE = -1;
const uint FILE_SHARE_READ = 0x00000001;
uint CreateFileA(string lpFileName, uint dwDesiredAccess, uint dwShareMode, uint lpSecurityAttributes, uint dwCreationDisposition, uint dwFlagsAndAttributes, uint hTemplateFile) {
return FFI::UINT32Call(createFileA, "__stdcall", lpFileName, dwDesiredAccess, dwShareMode, lpSecurityAttributes, dwCreationDisposition, dwFlagsAndAttributes, hTemplateFile);
}
bool ReadFile(uint hFile, uint lpBuffer, uint nNumberOfBytesToRead, uint lpNumberOfBytesRead, uint lpOverlapped) {
return FFI::UINT8Call(readFile, "__stdcall", hFile, lpBuffer, nNumberOfBytesToRead, lpNumberOfBytesRead, 0) != 0;
}
bool CloseHandle(uint hFile) {
return FFI::UINT8Call(closeHandle, "__stdcall", hFile) > 0;
}
string ReadFileIntoString(string filePath) {
string retStr;
string buffer;
const int bufferSize = 256;
buffer.resize(bufferSize);
uint handle = CreateFileA(filePath, GENERIC_READ, FILE_SHARE_READ, 0, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0);
if (handle != INVALID_HANDLE_VALUE)
{
uint numBytesRead = 0;
while (ReadFile(handle, buffer.Address(), bufferSize, FFI::Ref(numBytesRead).Address(), 0) && numBytesRead > 0)
retStr += buffer.substr(0, numBytesRead);
CloseHandle(handle);
}
return retStr;
}
}
namespace globals {
IClientEntityList@ entity_list = Interfaces.ClientEntityList;
class c_model {
string name = "";
int model = -1;
bool enabled = false;
}
array<c_model> models;
int original_model_index = -1;
}
namespace ui {
bool open = false;
bool enabled = false;
int enabled_model_index = -1;
void render() {
if (Menu::Begin("Model Changer", open, 2)) {
Menu::SetWindowSize(Vec2(250, 150), 0);
Menu::Checkbox("Enabled", enabled);
if (enabled) {
if (globals::models.length() == 0)
Menu::Text("Models not found!");
for (int i = 0; i < globals::models.length(); i++) {
Menu::Checkbox(globals::models[i].name, globals::models[i].enabled);
if (enabled_model_index != -1 && globals::models[i].enabled && enabled_model_index != i)
globals::models[enabled_model_index].enabled = false;
if (globals::models[i].enabled)
enabled_model_index = i;
if (!globals::models[i].enabled && enabled_model_index == i)
enabled_model_index = -1;
}
}
Menu::End();
}
}
}
namespace callbacks {
void draw_menu_event() {
if (CheatVars.menuOpen)
ui::render();
CBaseEntity@ entity_local = globals::entity_list.GetLocalPlayer();
if (entity_local is null || !entity_local.IsAlive())
return;
if (globals::original_model_index == -1)
globals::original_model_index = entity_local.GetModelIndex();
if (ui::enabled_model_index == -1 || !ui::enabled) {
entity_local.GetModelIndex() = globals::original_model_index;
return;
}
entity_local.GetModelIndex() = globals::models[ui::enabled_model_index].model;
}
}
void init() {
string txt = winapi::ReadFileIntoString("models.txt");
if (txt.length() == 0) {
printf("models.txt not found!");
return;
}
string[] lines = txt.split("\n");
for (int i = 0; i < lines.length(); i++) {
string[] name_and_path = lines[i].split("=");
globals::c_model model;
model.name = name_and_path[0];
if (i != lines.length()-1)
name_and_path[1].erase(name_and_path[1].length()-1);
model.model = Util.PrecacheModel(name_and_path[1]);
globals::models.insertAt(i, model);
}
RegisterCallback("OnMenu", callbacks::draw_menu_event);
}
/*
*
* Title: Custom scope lines
* Author: april#0001
* Description: Renders grandient 'lines' as scope lines.
*
*/
//region Globals
// Initialize our global interfaces.
ISurface@ g_Surface = Interfaces.Surface;
IEngineClient@ g_Engine = Interfaces.EngineClient;
IClientEntityList@ g_EntityList = Interfaces.ClientEntityList;
CGlobalVarsBase@ g_Globals = Interfaces.Globals;
// Initialize our FrameStage_t enum.
enum g_Stage {
FRAME_UNDEFINED = -1,
FRAME_START,
FRAME_NET_UPDATE_START,
FRAME_NET_UPDATE_POSTDATAUPDATE_START,
FRAME_NET_UPDATE_POSTDATAUPDATE_END,
FRAME_NET_UPDATE_END,
FRAME_RENDER_START,
FRAME_RENDER_END
};
//endregion
//region Functions
//region UI
namespace UI {
// Handles the menu's open state
bool m_Open = false;
// Saves the script's settings
bool m_Enabled = false;
float m_Size = 5;
float m_Offset = 1;
// Saves the scope's color
float m_ColorR = 255;
float m_ColorG = 255;
float m_ColorB = 255;
void Render( ) {
// Creates a new window
if ( Menu::Begin( "Scope Lines", m_Open, 0 ) ) {
// Adds the master switch
Menu::Checkbox( "Enable", m_Enabled );
// Checks if the master switch is enabled in order to render the
// rest of the elements
if ( m_Enabled ) {
// Render the other elements
Menu::SliderFloat( "Size", m_Size, 1.f, 100.f, "%.1f%%", 2.f );
Menu::SliderFloat( "Offset", m_Offset, 0.f, 100.f, "%.1f%%", 2.f );
Menu::Text( "Color" );
Menu::SetNextItemWidth( 75.f );
Menu::SliderFloat( "Red", m_ColorB, 0.f, 255.f, "%.0f", 1.f ); //they're flipped cbf redoing rendering so just flipped menu elements LOLOOLOLOL
Menu::SetNextItemWidth( 75.f );
Menu::SameLine( 0.f, 5.f );
Menu::SliderFloat( "Green", m_ColorG, 0.f, 255.f, "%.0f", 1.f );
Menu::SetNextItemWidth( 75.f );
Menu::SameLine( 0.f, 5.f );
Menu::SliderFloat( "Blue", m_ColorR, 0.f, 255.f, "%.0f", 1.f );
}
// Ends the window
Menu::End( );
}
}
}
//endregion
//region Scope
namespace Scope {
// Used to save the last state of the master switch so we can
// update the 'fov_cs_debug' cvar
bool m_LastEnabled = false;
// Used to determine whether or not to render the scope lines
bool m_Scoped = false;
float m_AnimTime = 0.f;
void RemoveScope( CBaseEntity& me ) {
// Calculate the fraction which should be added/subtracted this frame
const float increment = g_Globals.frametime * 8;
// Check if the local player is scoped
if ( me.IsScoped( ) ) {
// If so, set 'm_bIsScoped' to false, causing the scope overlay to disappear.
me.IsScoped( ) = false;
// Tell the script we're scoped in and update the animation time.
m_Scoped = true;
m_AnimTime = Util.ClampFloat( m_AnimTime + increment, 0.f, 1.f );
return;
}
// Otherwise, tell the script we aren't scoped in and update the animation time.
m_Scoped = false;
m_AnimTime = Util.ClampFloat( m_AnimTime - increment, 0.f, 1.f );
}
void PreserveViewModel( ) {
// Check if the master switch's state has changed.
if ( m_LastEnabled == UI::m_Enabled )
return;
// Cache the current state for further checks.
m_LastEnabled = UI::m_Enabled;
// Set 'fov_cs_debug' to 90 if we enabled the script, or to 0 if we disabled it.
UI::m_Enabled ? g_Engine.ClientCmd_Unrestricted( "fov_cs_debug 90", false ) : g_Engine.ClientCmd_Unrestricted( "fov_cs_debug 0", false );
}
void Do( ) {
// Check if we're scoped in and still animating.
if ( !m_Scoped && m_AnimTime == 0 )
return;
// Declare and get the screen's width and height.
int w, h;
g_Surface.GetScreenSize( w, h );
// Calculate the line's size and offset based on the user's settings.
int size = int( UI::m_Size * w / 100 );
int offset = int( UI::m_Offset * w / 100 );
// Initialize the colors used on the scope lines.
uint transparent_clr = Color(UI::m_ColorR , UI::m_ColorG , UI::m_ColorB , 0).D3D();
uint filled_clr = Color(( UI::m_ColorR ), ( UI::m_ColorG ), ( UI::m_ColorB ), ( 255 * m_AnimTime ) ).D3D();
// Render all four lines.
//Renderer.FilledRect( Vec2( w / 2, h / 2 - offset - size ), 10, size, filled_clr,transparent_clr , transparent_clr ,filled_clr );
Renderer.Line(Vec2(w/2, h/2 - size - offset), Vec2( w / 2, h / 2 - offset ), filled_clr, transparent_clr, 1.f);
Renderer.Line(Vec2(w/2 - size - offset, h/2), Vec2( w / 2 - offset, h / 2), filled_clr, transparent_clr, 1.f);
Renderer.Line(Vec2(w/2 + size + offset, h/2),Vec2( w / 2 + offset, h / 2), filled_clr, transparent_clr, 1.f);
Renderer.Line(Vec2(w/2, h/2 + size + offset),Vec2( w / 2 , h / 2 + offset) , filled_clr, transparent_clr, 1.f);
//Renderer.FilledRect( Vec2( w / 2, h / 2 + offset ), 10, size, transparent_clr, filled_clr, transparent_clr, filled_clr );
//Renderer.FilledRect( Vec2( w / 2 - offset - size, h / 2 ), size, 10, transparent_clr, transparent_clr, filled_clr, filled_clr );
//Renderer.FilledRect( Vec2( w / 2 + offset, h / 2 ), size, 10, filled_clr, transparent_clr, transparent_clr, filled_clr);
}
}
//endregion
//region Callbacks
void onMenu( ) {
// Checks whether or not the menu is open so we can render our window.
if ( CheatVars.menuOpen )
UI::Render( );
}
void onPaint( ) {
// Check if the script is enabled.
if ( !UI::m_Enabled )
return;
// Check if we're in-game and connected to a server.
if ( !g_Engine.IsInGame( ) || !g_Engine.IsConnected( ) ) {
// Otherwise, reset the scope animation. Doing this so when you die/disconnect while scoped,
// you don't render the scope the next time you play.
Scope::m_AnimTime = 0.f;
return;
}
// Get our local player.
CBaseEntity@ me = g_EntityList.GetLocalPlayer( );
// Check if we're valid and alive.
if ( me is null || !me.IsAlive( ) ) {
// Otherwise, reset the scope animation.
Scope::m_AnimTime = 0.f;
return;
}
// Render the scope lines.
Scope::Do( );
}
void onFSN( int stage ) {
// Check if we're on the correct FrameStage.
if ( stage != g_Stage::FRAME_RENDER_START )
return;
// Enable/Disable the viewmodel when scopped.
Scope::PreserveViewModel( );
// Check if the script is enabled.
if ( !UI::m_Enabled )
return;
// Get our local player.
CBaseEntity@ me = g_EntityList.GetLocalPlayer( );
// Check if we're valid and alive.
if ( me is null || !me.IsAlive( ) )
return;
// Removes the scope overlay/lines.
Scope::RemoveScope( me );
}
void init( ) {
// Register our callbacks.
RegisterCallback( "OnPaint", onPaint );
RegisterCallback( "OnMenu", onMenu );
RegisterCallback( "OnFrameStagePre", onFSN );
}
//endregion
//endregion
void init()
{
Interfaces.EngineClient.ExecuteClientCmd("con_filter_enable 1");
Interfaces.EngineClient.ExecuteClientCmd("con_filter_text out dhdwagduhawg");
Interfaces.EngineClient.ExecuteClientCmd("con_filter_text dwadboxmnuiwdn 1");
}