Results 1 to 2 of 2
  1. #1
    niko1921's Avatar
    Join Date
    Apr 2014
    Gender
    male
    Location
    mov Location, eax
    Posts
    130
    Reputation
    36
    Thanks
    261

    How to hooks is visible player on mw3 1.4.382

    Hi, I'm trying hook the IsVisible(); Function from teknomw3, I have tried the following:

    Code:
    typedef struct {
        char _0x0000[2];
        SHORT Valid; //0x0002
        char _0x0004[16];
        Vector Origin; //0x0014
        Vector Angles; //0x0020
        char _0x002C[60];
        int Flags; //0x0068
        char _0x006C[12];
        Vector OldOrigin; //0x0078
        char _0x0084[76];
        int ClientNum; //0x00D0
        SHORT Type; //0x00D4
        char _0x00D6[18];
        Vector NewOrigin; //0x00E8
        char _0x00F4[64];
        BYTE OldWeaponID; //0x0134
        char _0x0135[99];
        BYTE WeaponID; //0x0198
        char _0x0199[1];
        SHORT Alive; //0x019A
        char _0x019C[8];
        float Flags2; //0x01A4
        char _0x01A8[40];
        int IsAlive; //0x01D0
        char _0x01D4[36];
    } entity_t; //Size=0x01F8
    
    
    
    
    bool IsPlayerVisible(Entity_t * retx,int* addrplayer)
    {
    	DWORD CallFun = 0X54E6D0;
    	bool Is;
    	
    	__asm
    	{
    		push retx
    		push addrplayer
    		call CallFun
    		mov Is, al
    	}
    	return Is;
    }
    
    
    void test() // Testing debuging
    {
    	DWORD Player1 = 0x9FC748 + 0x560; // Example player A
    	Entity_t newent;
    	
    	
    	if(IsPlayerVisible(newent, Player1))
    	{
    		cout << "Player visible!" << endl;
    	}
    	else
    	{
    		cout << "Player not visible!" << endl;
    	}
    }
    addresses:

    IsVisible(); // 0x0054E6D0
    Client info for all players // 0x009FC748 + increments 560 for each player.

    the original code i have obtained from @Kenshin13 :

    Code:
    char isVisible(Entity_t* ret, int* entityNum) //54E6D0
    {
      int *v4; // eax@1
      char result; // al@2
    
      v4 = &dword_9FC748[344 * *(_DWORD *)(entityNum+ 352)]; //Get the ClientInfo address for the entity passsed.
      if ( !*entityNum|| *((_BYTE *)entityNum+ 56) & 0x40 ) //Compare perk. if(SelectedClient->Perk & 0x40) return;
        result = 0;
      else
        result = sub_474000(ret, entityNum, (int)&unk_2807823) != 0; //Else, execute a trace using cEntity, EntityClientNum and the traceflag, here it's 0x2807823
      return result; //Then returns 1 if the Entity is visible.
    }

    anyone who has had experience with this, can say how i can make the structure hooking the assembly code,
    the goal is to know if a player is visible.
    Thx to all.

  2. #2
    niko1921's Avatar
    Join Date
    Apr 2014
    Gender
    male
    Location
    mov Location, eax
    Posts
    130
    Reputation
    36
    Thanks
    261
    [SOLVED] char ABCDEFGH

Similar Threads

  1. how can i return my player????...
    By omer1595 in forum Combat Arms EU Help
    Replies: 5
    Last Post: 08-16-2010, 10:13 PM
  2. how do you become top player in a map
    By jokers300 in forum Combat Arms Discussions
    Replies: 7
    Last Post: 06-25-2010, 07:02 AM
  3. Replies: 9
    Last Post: 02-16-2010, 09:24 AM
  4. How To Make Non-Hacking Players Think You're Legit (For Hackers)
    By jacob19999 in forum Combat Arms Discussions
    Replies: 25
    Last Post: 12-27-2009, 09:07 PM
  5. tut How to hook tut 6
    By llvengancell in forum WarRock - International Hacks
    Replies: 1
    Last Post: 06-26-2007, 03:24 PM

Tags for this Thread