Thread: NPC Telekill

Results 1 to 5 of 5
  1. #1
    Skaterforeva1's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    Up your ass
    Posts
    936
    Reputation
    32
    Thanks
    485
    My Mood
    Psychedelic

    NPC Telekill

    Okay so I was working on a npc version for telekill because the way I have the regular telekill setup makes it confusing when combing them. So I have this but when i turn it on, it crashes. I have been looking at other examples and stuff but i cant figure it out. So if anyone wants to help feel free.

    Code:
    void cHacks::NPCTelekill( int enable)
    {
    	if(enable)
    	{
    		DWORD PositionY, PositionPointer;
    		PositionPointer = (DWORD)GetModuleHandleA("ClientFX.fxd");
    		PositionPointer += 0x0006BF34;
    
    		memcpy(&PositionY,(void *)PositionPointer, 4);
    
    		for(int i = 0; i < SFXMgr->SFXList[SFX_CHARACTER]; i++)
    		{
    			CharacterFX = (cCharacterFX*)SFXMgr->SFXList[SFX_CHARACTER];
    			if(Main->Tools->ValidPointer(CharacterFX) && !CharacterFX->IsPlayer)
    			{
    				*(float*)(PositionY + 0xC8) = (CharacterFX->object->Pos.x + 75.0f);
    				*(float*)(PositionY + 0xCC) = (CharacterFX->object->Pos.y + 75.0f);
    				*(float*)(PositionY + 0xD0) = (CharacterFX->object->Pos.z);
    			}
    		}
    	}
    }
    Last edited by Skaterforeva1; 07-15-2013 at 01:57 PM.




    ^Suck it!

  2. #2
    Ch40zz-C0d3r's Avatar
    Join Date
    Apr 2011
    Gender
    male
    Posts
    831
    Reputation
    44
    Thanks
    401
    My Mood
    Twisted
    Well the code doesnt look wrong but I made a better solution:
    Put a check for FireTeam in a GetNearestPlayer function, and just let it return the id of the character (not player!)
    Then you have 1 single function for 2 features:

    Code:
    int ID = GetNearestIndex(false, true);
    if(ID != -1)
    {
    	cCharacterFX *pFX = (cCharacterFX*)pSFXMgr->SFXList[SFX_CHARACTER].List[ID];
    }

    Progress with my game - "Disbanded"
    • Fixed FPS lag on spawning entities due to the ent_preload buffer!
    • Edit the AI code to get some better pathfinding
    • Fixed the view bug within the sniper scope view. The mirror entity is invisible now!
    • Added a new silencer for ALL weapons. Also fixed the rotation bugs
    • Added a ton of new weapons and the choice to choose a silencer for every weapon
    • Created a simple AntiCheat, noobs will cry like hell xD
    • The name will be Disbanded, the alpha starts on the 18th august 2014



    Some new physics fun (Serversided, works on every client)



    My new AI
    https://www.youtube.com/watch?v=EMSB1GbBVl8

    And for sure my 8 months old gameplay with 2 friends
    https://www.youtube.com/watch?v=Na2kUdu4d_k

  3. The Following User Says Thank You to Ch40zz-C0d3r For This Useful Post:

    Skaterforeva1 (07-16-2013)

  4. #3
    Skaterforeva1's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    Up your ass
    Posts
    936
    Reputation
    32
    Thanks
    485
    My Mood
    Psychedelic
    Quote Originally Posted by Ch40zz-C0d3r View Post
    Well the code doesnt look wrong but I made a better solution:
    Put a check for FireTeam in a GetNearestPlayer function, and just let it return the id of the character (not player!)
    Then you have 1 single function for 2 features:

    Code:
    int ID = GetNearestIndex(false, true);
    if(ID != -1)
    {
    	cCharacterFX *pFX = (cCharacterFX*)pSFXMgr->SFXList[SFX_CHARACTER].List[ID];
    }
    Its still crashing... Maybe my classes are wrong...




    ^Suck it!

  5. #4
    matypatty's Avatar
    Join Date
    Aug 2009
    Gender
    male
    Posts
    864
    Reputation
    229
    Thanks
    2,694
    My Mood
    Amused
    Quote Originally Posted by Skaterforeva1 View Post
    Its still crashing... Maybe my classes are wrong...
    I would recommend getting your target position from a bone transform result as im not sure if you can call position directly or not, cant remember because ive always done it by bone. Also remember to do what chaos said aswell as its not gonna work very well without a target calculation and you needa have .List[ID]; on the end.

    Oh and for your loop:
    Code:
    int numplayers = SFXMgr->SFXList[SFX_CHARACTER].Num
    Some Useful defines:
    Code:
    #define PELVIS	3
    #define TORSO	5
    #define HEAD	8
    Code:
    GetLTModel()->GetNodeTransform( fx->Object, HEAD, &Players[i].Head,  true );

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

    Skaterforeva1 (07-26-2013)

  7. #5
    Skaterforeva1's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    Up your ass
    Posts
    936
    Reputation
    32
    Thanks
    485
    My Mood
    Psychedelic
    Quote Originally Posted by matypatty View Post


    I would recommend getting your target position from a bone transform result as im not sure if you can call position directly or not, cant remember because ive always done it by bone. Also remember to do what chaos said aswell as its not gonna work very well without a target calculation and you needa have .List[ID]; on the end.

    Oh and for your loop:
    Code:
    int numplayers = SFXMgr->SFXList[SFX_CHARACTER].Num
    Some Useful defines:
    Code:
    #define PELVIS	3
    #define TORSO	5
    #define HEAD	8
    Code:
    GetLTModel()->GetNodeTransform( fx->Object, HEAD, &Players[i].Head,  true );
    Thanks I must have been getting the wrong target or something. It works now. @Flengo close please.




    ^Suck it!

Similar Threads

  1. [Detected] Chaos Advanced v1.3 - ESPECIAL DE NATAL! (NPC TeleKill, GhostMode controlável)
    By ChaosMagician in forum Combat Arms Brazil Hacks
    Replies: 19
    Last Post: 01-03-2013, 07:09 PM
  2. Preview NPC TeleKill
    By pDevice in forum Brazil Spam
    Replies: 9
    Last Post: 12-28-2012, 04:15 AM
  3. with NPC Telekill
    By steven1578 in forum Combat Arms Coding Help & Discussion
    Replies: 7
    Last Post: 08-25-2011, 01:31 PM
  4. Telekill/OPK for NPC?
    By xGolani in forum Combat Arms Hack Requests
    Replies: 21
    Last Post: 07-05-2011, 07:51 AM
  5. help with NPC opk/telekill
    By supercarz1991 in forum Combat Arms Coding Help & Discussion
    Replies: 16
    Last Post: 02-06-2011, 12:18 AM

Tags for this Thread