Results 1 to 6 of 6
  1. #1
    *GuideMan*'s Avatar
    Join Date
    May 2010
    Gender
    male
    Location
    Austria
    Posts
    13
    Reputation
    10
    Thanks
    0
    My Mood
    In Love

    CA crashes when I send a message

    Hey, CA crashed when I use:

    Code:
    if (GetAsyncKeyState(VK_F10))
    	{
    		if (heaD9->ValidPointer(g_LTClient))
    		{
    			CAutoMessage msg;
    
    			msg.Writeuint8(135);
    			g_LTClient->SendToServer(msg.Read(), MESSAGE_GUARANTEED);
    		}
    	}
    Any ideas?
    Last edited by Drake; 05-10-2012 at 09:11 AM.

  2. #2
    justiniscool6's Avatar
    Join Date
    Aug 2010
    Gender
    male
    Location
    Mpgh
    Posts
    265
    Reputation
    -9
    Thanks
    7
    Did you try adding the right classes updating it and also did you include ltclient addie?

  3. #3
    Flengo's Avatar
    Join Date
    May 2010
    Gender
    male
    Location
    /admincp/banning.php
    Posts
    20,591
    Reputation
    5180
    Thanks
    14,178
    My Mood
    Inspired
    Quote Originally Posted by justiniscool6 View Post
    Did you try adding the right classes updating it and also did you include ltclient addie?
    Not pointing the class to the Address wouldn't make it crash, just not work.

    If it was the wrong address, it could crash.

    LTClient Class is posted.
    I Read All Of My PM's & VM's
    If you need help with anything, just let me know.

     


     
    VM | PM | IM
    Staff Administrator Since 10.13.2019
    Publicist Since 04.04.2015
    Middleman Since 04.14.2014
    Global Moderator Since 08.01.2013
    Premium Since 05.29.2013

    Minion+ Since 04.18.2013

    Combat Arms Minion Since 12.26.2012
    Contributor Since 11.16.2012
    Member Since 05.11.2010


  4. #4
    matypatty's Avatar
    Join Date
    Aug 2009
    Gender
    male
    Posts
    864
    Reputation
    229
    Thanks
    2,694
    My Mood
    Amused
    Quote Originally Posted by comando2056 View Post


    Not pointing the class to the Address wouldn't make it crash, just not work.

    If it was the wrong address, it could crash.

    LTClient Class is posted.
    Even if it it isn't the cause of the crash, its still wrong so lets fix it.

    Code:
    //Define this at the top of your code
    typedef unsigned int( __stdcall *tSendToServer )( ILTMessage_Read *Message, unsigned int Flags );
    tSendToServer pSendToServer;
    
    if (GetAsyncKeyState(VK_F10))
    	{
    
                   //This is where you point your classes to addresses.
                   pSendToServer = (tSendToServer)0x474350;  //The address in engine which the sendtoserver function is located at.
    	       g_LTClient = *(CLTClient**)0x377E0C88;  //The LTCLient
    	       g_CommonLT = g_LTClient->Common();  //LT Common class which is used in the CAutoMessage class.
    
    		if (heaD9->ValidPointer(g_LTClient))
    		{
    			CAutoMessage msg;
    
    			msg.Writeuint8(135);
    			pSendToServer(msg.Read(), MESSAGE_GUARANTEED);  //Replaced with our engine call function
    		}
    	}

  5. The Following 2 Users Say Thank You to matypatty For This Useful Post:

    Drake (05-10-2012),[MPGH]Flengo (04-18-2012)

  6. #5
    Flengo's Avatar
    Join Date
    May 2010
    Gender
    male
    Location
    /admincp/banning.php
    Posts
    20,591
    Reputation
    5180
    Thanks
    14,178
    My Mood
    Inspired
    Quote Originally Posted by matypatty View Post


    Even if it it isn't the cause of the crash, its still wrong so lets fix it.

    Code:
    //Define this at the top of your code
    typedef unsigned int( __stdcall *tSendToServer )( ILTMessage_Read *Message, unsigned int Flags );
    tSendToServer pSendToServer;
    
    if (GetAsyncKeyState(VK_F10))
    	{
    
                   //This is where you point your classes to addresses.
                   pSendToServer = (tSendToServer)0x474350;  //The address in engine which the sendtoserver function is located at.
    	       g_LTClient = *(CLTClient**)0x377E0C88;  //The LTCLient
    	       g_CommonLT = g_LTClient->Common();  //LT Common class which is used in the CAutoMessage class.
    
    		if (heaD9->ValidPointer(g_LTClient))
    		{
    			CAutoMessage msg;
    
    			msg.Writeuint8(135);
    			pSendToServer(msg.Read(), MESSAGE_GUARANTEED);  //Replaced with our engine call function
    		}
    	}
    Why not just do this instead

    Code:
    typedef unsigned int (__stdcall *tfnSendToServer)(ILTMessage_Read *pMsg, uint32 flags);
    tfnSendToServer pfnSendToServer = (tfnSendToServer)0x474350;//So you don't have to add the line over and over
    And you would also have to change the check for if the key is pressed.

    Code:
    if (GetAsyncKeyState(VK_F10) &1)
    You could just declare all of the pointers to the classes globally and render them. That's what I do, its faster and saves lines.

    Code:
    void cHacks::InitGamePointers()
    {
    	g_LTClient = *(CLTClient**)ADDR_LTCLIENT;
    	g_CommonLT = g_LTClient->Common();
            
            //All your other stuff in here too.
    }
    I Read All Of My PM's & VM's
    If you need help with anything, just let me know.

     


     
    VM | PM | IM
    Staff Administrator Since 10.13.2019
    Publicist Since 04.04.2015
    Middleman Since 04.14.2014
    Global Moderator Since 08.01.2013
    Premium Since 05.29.2013

    Minion+ Since 04.18.2013

    Combat Arms Minion Since 12.26.2012
    Contributor Since 11.16.2012
    Member Since 05.11.2010


  7. The Following User Says Thank You to Flengo For This Useful Post:

    matypatty (04-18-2012)

  8. #6
    matypatty's Avatar
    Join Date
    Aug 2009
    Gender
    male
    Posts
    864
    Reputation
    229
    Thanks
    2,694
    My Mood
    Amused
    Whatever floats your boat

  9. The Following User Says Thank You to matypatty For This Useful Post:

    [MPGH]Flengo (04-18-2012)

Similar Threads

  1. Why crossfire game crashed when i play with any program hack
    By goergemamdoh in forum CrossFire Hacks & Cheats
    Replies: 2
    Last Post: 08-31-2009, 07:30 AM
  2. Warrock crashes when using this code in my D3D hack...
    By k2hacker in forum C++/C Programming
    Replies: 0
    Last Post: 07-21-2008, 05:04 PM
  3. When OGKEYS send Retail?
    By jaft88 in forum WarRock - International Hacks
    Replies: 5
    Last Post: 07-09-2008, 02:53 PM
  4. Crash when debugging
    By Koekenbakker in forum WarRock - International Hacks
    Replies: 6
    Last Post: 12-26-2007, 08:21 AM
  5. CUE crash when attach to warrock
    By TheRedEye in forum WarRock - International Hacks
    Replies: 2
    Last Post: 05-17-2007, 12:02 AM