-
Автор темы
- #1
This is the *OLD* Primordial auto peek indicator for anyone wondering.
This will also help you implement iEffects if your too retarded too yourself.
Step 1: head over to your csgo.cpp and paste
Step 2: also in csgo.cpp, paste
Step 3: head over to csgo.hpp and paste
Step 4: also in csgo.hpp paste
Step 5: Create Effects.h header
Step 6: In Effects.h paste
Step 7: Go to where your auto peek indicator is rendered and paste this in ur function
Step 8: go to your auto peek render header and paste this in your private
If I did anything wrong then please correct me!
This will also help you implement iEffects if your too retarded too yourself.
Step 1: head over to your csgo.cpp and paste
after the other #undef's:
#undef iEffects
Anywhere with the other functions:
IEffects * C_CSGO::iEffects()
{
if (!p_iEffects)
p_iEffects = Interface<IEffects>(CLIENT_DLL, crypt_str("IEffects001"));
return p_iEffects;
}
in public section under C_CSGO:
IEffects * iEffects();
in private section under C_CSGO:
IEffects * p_iEffects = nullptr;
Step 6: In Effects.h paste
iEffects:
#pragma once
#include ".. /math/Vector.hpp"
class IEffects
{
public:
virtual ~IEffects() {};
virtual void Beam(const Vector& Start, const Vector& End, int nModelIndex,
int nHaloIndex, unsigned char frameStart, unsigned char frameRate,
float flLife, unsigned char width, unsigned char endWidth, unsigned char fadeLength,
unsigned char noise, unsigned char red, unsigned char green,
unsigned char blue, unsigned char brightness, unsigned char speed) = 0;
//-----------------------------------------------------------------------------
Purpose: Emits smoke sprites.
Input : origin - Where to emit the sprites.
scale - Sprite scale * 10.
framerate - Framerate at which to animate the smoke sprites.
//-----------------------------------------------------------------------------
virtual void Smoke(const Vector& origin, int modelIndex, float scale, float framerate) = 0;
virtual void Sparks(const Vector& position, int nMagnitude = 1, int nTrailLength = 1, const Vector* pvecDir = NULL) = 0;
virtual void Dust(const Vector& pos, const Vector& dir, float size, float speed) = 0;
virtual void MuzzleFlash(const Vector& vecOrigin, const Vector& vecAngles, float flScale, int iType) = 0;
like ricochet, but no sound
virtual void MetalSparks(const Vector& position, const Vector& direction) = 0;
virtual void EnergySplash(const Vector& position, const Vector& direction, bool bExplosive = false) = 0;
virtual void Ricochet(const Vector& position, const Vector& direction) = 0;
FIXME: Should these methods remain in this interface? Or go in some
other client-server neutral interface?
virtual float Time() = 0;
virtual bool IsServer() = 0;
Used by the playback system to suppress sounds
virtual void SuppressEffectsSounds(bool bSuppress) = 0;
};
Auto peek render:
void otheresp::AutoPeekIndicator()
{
auto weapon = g_ctx.local()->m_hActiveWeapon(). Get();
if (!weapon)
return;
static auto position = ZERO;
if (!g_ctx.globals.start_position. IsZero())
position = g_ctx.globals.start_position;
if (position. IsZero())
return;
if (!g_ctx.local()->is_alive() || !m_engine()->IsInGame() || !m_engine()->IsConnected())
return;
if (!key_binds::get().get_key_bind_state(18))
return;
current_peek_position = position;
current_rotation = current_rotation + rotation_step;
Vector end_pos = Vector(radius * cos(current_rotation) + current_peek_position.x, radius * sin(current_rotation) + current_peek_position.y, current_peek_position.z);
iEffects()->EnergySplash(end_pos, Vector(0, 0, 0), true);
if (current_rotation > pi * 2)
current_rotation = 0.0f;
}
Header:
float radius = 25.f;
float rotation_step = 0.06f;
float current_rotation = 0.0f;
Vector current_peek_position = Vector(0, 0, 0);
Вложения
-
87.5 KB Просмотры: 699
Последнее редактирование: