nixware.cc
-
Автор темы
- #1
C++:
class c_effect_data // CEffectData in schema
{
public:
void* vftable = { }; // 0x0
vec3_t origin = { }; // 0x8
vec3_t start = { }; // 0x14
vec3_t normal = { }; // 0x20
angle_t angles = { }; // 0x2c
uint32_t handle_entity = { }; // 0x38
uint32_t handle_other_entity = { }; // 0x3c
float scale = { }; // 0x40
float magnitude = { }; // 0x44
float radius = { }; // 0x48
int surface_prop = { }; // 0x4c
void* effect_index = { }; // 0x50
uint32_t damage_type = { }; // 0x58
uint8_t penetrate = { }; // 0x5c
uint8_t __pad005d[ 0x1 ] = { }; // 0x5d
uint16_t material = { }; // 0x5e
uint16_t hitbox = { }; // 0x60
uint8_t color = { }; // 0x62
uint8_t flags = { }; // 0x63
uint8_t attachment_index = { }; // 0x64
uint8_t __pad0065[ 0x3 ] = { }; // 0x65
int attachment_name = { }; // 0x68
uint16_t effect_name = { }; // 0x6c
uint8_t explosion_type = { }; // 0x6e
uint8_t __pad006f[ 0x9 ] = { };
};
void c_cs_player_pawn::create_shocked_effect( )
{
static auto EffectDataVftable = utils::find_pattern_rel( "client.dll", "48 8D 05 ? ? ? ? 0F 57 DB 0F 57 D2 48 89 44 24 ? 0F 57 C9", 3 );
static auto DispatchEffect = reinterpret_cast< void( __fastcall* )( const char* name, c_effect_data* data ) >( utils::find_pattern_rel( "client.dll", "E8 ? ? ? ? EB 15 8B D6", 1 ) );
c_effect_data effect = { };
effect.vftable = EffectDataVftable;
effect.handle_entity = this->get_entity_handle( );
effect.handle_other_entity = static_cast< uint32_t >( -1 );
DispatchEffect( "csshocked", &effect );
}