Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int CreateKeyValues( int a1 )
- {
- static auto image = ( std::uintptr_t )GetModuleHandleA( "engine.dl" );
- static auto procedure = reinterpret_cast< int( __cdecl* )( int ) >( image + 0x24B630 );
- return procedure( a1 );
- }
- DWORD* SetKeyValues( DWORD* a1, const char* a2 )
- {
- static auto image = ( std::uintptr_t )GetModuleHandleA( "engine.dl" );
- static auto procedure = reinterpret_cast< DWORD*( __thiscall* )( DWORD*, const char* ) >( image + 0x24B5D0 );
- return procedure( a1, a2 );
- }
- DWORD* SetKeyValuesString( DWORD* a1, const char* a2, const char* a3 )
- {
- static auto image = ( std::uintptr_t )GetModuleHandleA( "engine.dl" );
- static auto procedure = reinterpret_cast< DWORD*( __thiscall* )( DWORD*, const char*, const char* ) >( image + 0x24E0D0 );
- return procedure( a1, a2, a3 );
- }
- class IVEngineClient
- {
- public:
- void ServerCmdKeyValues( KeyValues* pKeyValues )
- {
- return memory::Call< 127, void >( this, pKeyValues );
- }
- };
- void SetClanTag( const char* clan_tag )
- {
- DWORD* pKeyValues = ( DWORD* )CreateKeyValues( 32 );
- if( !pKeyValues )
- return;
- pKeyValues = SetKeyValues( pKeyValues, "ClanTagChanged" );
- SetKeyValuesString( pKeyValues, "tag", clan_tag );
- g_pEngineClient->ServerCmdKeyValues( pKeyValues );
- }
Advertisement
Add Comment
Please, Sign In to add comment