bool RemoveSAMPHook ( uint32_t dwFuncOffset , void * origFunc , int iType , int iSize ) { if ( GetModuleHandle ( "samp.dll" ) == NULL ) return false ; uint32_t g_dwSAMP_Addr = ( uint32_t ) GetModuleHandle ( "samp.dll" ) ; CDetour api ; return api . Remove ( ( uint8_t * ) ( ( uint32_t ) g_dwSAMP_Addr ) + dwFuncOffset , ( uint8_t * ) origFunc , iType , iSize ) ; } RemoveSAMPHook ( SAMP_HOOKENTER_CNETGAME_DESTR , oDestrFuncs [ 0 ] , 3 , 5 ) RemoveSAMPHook ( SAMP_HOOKENTER_CNETGAME_DESTR2 , oDestrFuncs [ 1 ] , 3 , 5 )
while ( m_pGameWindow == NULL ) { m_pGameWindow = FindWindowA ( NULL , "GTA:SA:MP" ) ; Sleep ( timeout ) ; }