@ -9,12 +9,11 @@
@@ -9,12 +9,11 @@
# include <vector>
# pragma warning(disable:4996)
extern TCHAR g_settingsFileName [ MAX_PATH ] ;
bool FirstFrame = false ;
pfnUserMsgHook pMOTD ;
GameInfo_t BuildInfo ;
cvar_t * random ;
cvar_t * steamid_r ;
map < string , string > g_modelsHashMap ;
cvar_t * logsfiles ;
cvar_t * events_block ;
@ -46,12 +45,15 @@ void models(){
@@ -46,12 +45,15 @@ void models(){
for ( DWORD i = 0 ; i < 32 ; i + + ) {
player_info_s * player = g_pStudio - > PlayerInfo ( i ) ;
if ( player & & ( lstrlenA ( player - > name ) > 1 ) & & player - > model ) {
char buffer [ 128 ] ;
sprintf_s ( buffer , " NAME -> [ %s ] | MODEL -> [ %s ] \n " , player - > name , player - > model ) ;
ConsolePrintColor ( 255 , 255 , 15 , buffer ) ;
ConsolePrintColor ( 255 , 255 , 15 , " NAME -> [ %s ] | MODEL -> [ %s ] \n " , player - > name , player - > model ) ;
}
}
}
string filename ;
void Set_Ticket ( ) {
filename = g_Engine . Cmd_Argv ( 1 ) ;
ConsolePrintColor ( 255 , 255 , 255 , " [ExtraMirror] Ticket set -> \" %s \" \n " , filename . c_str ( ) ) ;
}
void Credits ( ) {
ConsolePrintColor ( 255 , 255 , 255 , " -- Thank's to " ) ; ConsolePrintColor ( 0 , 255 , 0 , " [2010] Team \n " ) ; ConsolePrintColor ( 255 , 255 , 255 , " -- Thank's to " ) ;
ConsolePrintColor ( 0 , 255 , 0 , " madotsuki-team < * \n " ) ; ConsolePrintColor ( 255 , 255 , 255 , " -- Thank's to " ) ; ConsolePrintColor ( 0 , 255 , 0 , " or_75 \n " ) ;
@ -71,11 +73,8 @@ int Callback(const char *section, const char *key, const char *value, const void
@@ -71,11 +73,8 @@ int Callback(const char *section, const char *key, const char *value, const void
return 1 ;
}
void Inject ( ) { LoadLibraryA ( g_Engine . Cmd_Argv ( 1 ) ) ; }
/*int g_blockedCvarCount;
char * g_blockedCvars [ 512 ] ; */
void DumpCmd ( )
{
void DumpCmd ( ) {
cmd_s * pCmd = g_Engine . pfnGetCmdList ( ) ;
ConsolePrintColor ( 255 , 255 , 255 , " Dump Commands: \n " ) ;
while ( pCmd )
@ -88,9 +87,12 @@ void DumpCmd()
@@ -88,9 +87,12 @@ void DumpCmd()
void Reload ( ) {
models_list . clear ( ) ;
ini_browse ( Callback , NULL , g_settingsFileName ) ;
memset ( g_blockedCmds , 0 , sizeof ( g_blockedCmds ) ) ; //memset(g_blockedCvars, 0, sizeof(g_blockedCvars));
memset ( g_serverCmds , 0 , sizeof ( g_serverCmds ) ) ; memset ( g_anticheckfiles2 , 0 , sizeof ( g_anticheckfiles2 ) ) ;
g_blockedCmdCount = 0 ; g_serverCmdCount = 0 ; g_anticheckfiles = 0 ;
memset ( g_blockedCmds , 0 , sizeof ( g_blockedCmds ) ) ;
memset ( g_serverCmds , 0 , sizeof ( g_serverCmds ) ) ;
memset ( g_anticheckfiles2 , 0 , sizeof ( g_anticheckfiles2 ) ) ;
g_blockedCmdCount = 0 ;
g_serverCmdCount = 0 ;
g_anticheckfiles = 0 ;
static TCHAR sKeyNames [ 4096 * 3 ] ;
GetPrivateProfileSection ( TEXT ( " ADetect " ) , sKeyNames , ARRAYSIZE ( sKeyNames ) , g_settingsFileName ) ;
@ -105,20 +107,14 @@ void Reload(){
@@ -105,20 +107,14 @@ void Reload(){
char * psKeyName3 = sKeyNames ;
while ( psKeyName3 [ 0 ] ! = ' \0 ' ) { g_serverCmds [ g_serverCmdCount + + ] = strdup ( psKeyName3 ) ; psKeyName3 + = strlen ( psKeyName3 ) + 1 ; }
/*GetPrivateProfileSection(TEXT("Blocked cvars"),sKeyNames,ARRAYSIZE(sKeyNames),g_settingsFileName);
char * psKeyName2 = sKeyNames ;
while ( psKeyName2 [ 0 ] ! = ' \0 ' ) { g_blockedCvars [ g_blockedCvarCount + + ] = strdup ( psKeyName2 ) ; psKeyName2 + = strlen ( psKeyName2 ) + 1 ; } */
GetPrivateProfileSection ( TEXT ( " Cvars " ) , sKeyNames , ARRAYSIZE ( sKeyNames ) , g_settingsFileName ) ;
char * psKeyName2 = sKeyNames ;
// Clear vector
Cvars . clear ( ) ;
while ( psKeyName2 [ 0 ] ! = ' \0 ' ) {
AddOrModCvar ( psKeyName2 ) ;
psKeyName2 + = strlen ( psKeyName2 ) + 1 ;
}
while ( psKeyName2 [ 0 ] ! = ' \0 ' ) { AddOrModCvar ( psKeyName2 ) ; psKeyName2 + = strlen ( psKeyName2 ) + 1 ; }
TCHAR value [ 16 ] ; char cvarname [ 32 ] ;
GetPrivateProfileString ( TEXT ( " Settings " ) , TEXT ( " sid_random " ) , TEXT ( " 0 " ) , value , ARRAYSIZE ( value ) , g_settingsFileName ) ;
sprintf ( cvarname , " sid_random %s " , value ) ; g_Engine . pfnClientCmd ( cvarname ) ; memset ( value , 0 , sizeof ( value ) ) ; memset ( cvarname , 0 , sizeof ( cvarname ) ) ;
GetPrivateProfileString ( TEXT ( " Settings " ) , TEXT ( " steamid " ) , TEXT ( " 0 " ) , value , ARRAYSIZE ( value ) , g_settingsFileName ) ;
sprintf ( cvarname , " steamid %s " , value ) ; g_Engine . pfnClientCmd ( cvarname ) ; memset ( value , 0 , sizeof ( value ) ) ; memset ( cvarname , 0 , sizeof ( cvarname ) ) ;
GetPrivateProfileString ( TEXT ( " Settings " ) , TEXT ( " cust_hud " ) , TEXT ( " 0 " ) , value , ARRAYSIZE ( value ) , g_settingsFileName ) ;
sprintf ( cvarname , " cust_hud %s " , value ) ; g_Engine . pfnClientCmd ( cvarname ) ; memset ( value , 0 , sizeof ( value ) ) ; memset ( cvarname , 0 , sizeof ( cvarname ) ) ;
GetPrivateProfileString ( TEXT ( " Settings " ) , TEXT ( " logs " ) , TEXT ( " 0 " ) , value , ARRAYSIZE ( value ) , g_settingsFileName ) ;
@ -176,15 +172,16 @@ void InitHack(){
@@ -176,15 +172,16 @@ void InitHack(){
AddOrModCvar ( psKeyName2 ) ;
psKeyName2 + = strlen ( psKeyName2 ) + 1 ;
}
if ( ! ( g_Engine . Con_IsVisible ( ) ! = 0 ) ) g_Engine . pfnClientCmd ( " toggleconsole " ) ;
ConsolePrintColor ( 0 , 255 , 11 , " -- Extra Mirror v2.6 \n " ) ;
g_pEngine - > pfnAddCommand ( " set_ticket " , Set_Ticket ) ;
if ( g_Engine . Con_IsVisible ( ) = = 0 ) g_Engine . pfnClientCmd ( " toggleconsole " ) ;
ConsolePrintColor ( 0 , 255 , 11 , " -- Extra Mirror v2.7 \n " , BuildInfo . Build ) ;
ConsolePrintColor ( 255 , 255 , 255 , " -- Use 'credits' for more information \n " ) ;
ConsolePrintColor ( 255 , 255 , 255 , " -- Thank's to Realwar for title \n " ) ;
ConsolePrintColor ( 255 , 255 , 255 , " -- Thank's to FightMagister for functions \n " ) ;
ConsolePrintColor ( 255 , 255 , 255 , " -- Thank's to Spawner { Kiass } \n " ) ;
g_pEngine - > pfnAddCommand ( " credits " , Credits ) ; g_pEngine - > pfnAddCommand ( " inject " , Inject ) ; g_pEngine - > pfnAddCommand ( " modelsn " , models ) ; g_pEngine - > pfnAddCommand ( " update " , Reload ) ; TCHAR value [ 16 ] ;
GetPrivateProfileString ( TEXT ( " Settings " ) , TEXT ( " sid_random " ) , TEXT ( " 0 " ) , value , ARRAYSIZE ( value ) , g_settingsFileName ) ;
random = g_pEngine - > pfnRegisterVariable ( " sid_random " , strdup ( value ) , 0 ) ; memset ( value , 0 , sizeof ( value ) ) ;
GetPrivateProfileString ( TEXT ( " Settings " ) , TEXT ( " steam id " ) , TEXT ( " 0 " ) , value , ARRAYSIZE ( value ) , g_settingsFileName ) ;
steamid_r = g_pEngine - > pfnRegisterVariable ( " steam id " , strdup ( value ) , 0 ) ; memset ( value , 0 , sizeof ( value ) ) ;
GetPrivateProfileString ( TEXT ( " Settings " ) , TEXT ( " cust_hud " ) , TEXT ( " 0 " ) , value , ARRAYSIZE ( value ) , g_settingsFileName ) ;
ex_thud = g_pEngine - > pfnRegisterVariable ( " cust_hud " , value , 0 ) ; memset ( value , 0 , sizeof ( value ) ) ;
GetPrivateProfileString ( TEXT ( " Settings " ) , TEXT ( " logs " ) , TEXT ( " 0 " ) , value , ARRAYSIZE ( value ) , g_settingsFileName ) ;