Results 1 to 7 of 7
  1. #1
    awtstalamaker's Avatar
    Join Date
    Mar 2010
    Gender
    male
    Posts
    130
    Reputation
    10
    Thanks
    54
    My Mood
    Blah

    Error In My Code

    Hello Coders I Am Getting A Error On My Code Could You Please Point Out / Fix The Problem?


    Code:
    #include <windows.h>
    #define wpoint 0xE66094
    #define NoRecoil1 0xEA8
    #define NoRecoil2 0x1178
    #define NoRecoil3 0x1010
    #define NoRecoil4 0x36B8
    #define NoRecoil5 0x34E8
    #define NoRecoil6 0x34D8
    #define NoRecoil7 0x658
    
    bool coil = true; 
    
    Sleep(9800); 
    
    DWORD CShell     = (DWORD)GetModuleHandleA("CShell.dll");
    DWORD pWeaponMgr = *(DWORD*)(CShell + wpoint);
    
    
    
    if(coil)
    {
    	if (pWeaponMgr)
    		{
    			for(int i=0; i<600; i++) 
    				{	
    					if((*(DWORD*)((*(DWORD*)(CShell+WeaponMgr))+(4*i))) != NULL)
    					*(float*)((*(DWORD*)((*(DWORD*)(CShell+WeaponMgr))+(4*i))) + NoRecoil1) = 100;
    
    					i=0;
    
    	
    					if((*(DWORD*)((*(DWORD*)(CShell+WeaponMgr))+(4*i))) != NULL)
    					*(float*)((*(DWORD*)((*(DWORD*)(CShell+WeaponMgr))+(4*i))) + NoRecoil2) = 100;
    
    					i=0;
    
    	
    					if((*(DWORD*)((*(DWORD*)(CShell+WeaponMgr))+(4*i))) != NULL)
    					*(float*)((*(DWORD*)((*(DWORD*)(CShell+WeaponMgr))+(4*i))) + NoRecoil3) = 100;
    
    					i=0;
    
    	
    					if((*(DWORD*)((*(DWORD*)(CShell+WeaponMgr))+(4*i))) != NULL)
    					*(float*)((*(DWORD*)((*(DWORD*)(CShell+WeaponMgr))+(4*i))) + NoRecoil4) = 100;
    
    					i=0;
    			
    	
    					if((*(DWORD*)((*(DWORD*)(CShell+WeaponMgr))+(4*i))) != NULL)
    					*(float*)((*(DWORD*)((*(DWORD*)(CShell+WeaponMgr))+(4*i))) + NoRecoil5) = 100;
    
    					i=0;
    
    	
    					if((*(DWORD*)((*(DWORD*)(CShell+WeaponMgr))+(4*i))) != NULL)
    					*(float*)((*(DWORD*)((*(DWORD*)(CShell+WeaponMgr))+(4*i))) + NoRecoil6) = 100;
    	
    					i=0;
    
    	
    					if((*(DWORD*)((*(DWORD*)(CShell+WeaponMgr))+(4*i))) != NULL)
    					*(float*)((*(DWORD*)((*(DWORD*)(CShell+WeaponMgr))+(4*i))) + NoRecoil7) = 100;
    				}	
    		}
    }
    Here Is The Log

    Code:
    1>------ Build started: Project: NoRec, Configuration: Debug Win32 ------
    1>Build started 4/10/2013 12:43:50 AM.
    1>PrepareForBuild:
    1>  Creating directory "c:\users\lenovo v470\documents\visual studio 2010\Projects\NoRec\Debug\".
    1>InitializeBuildStatus:
    1>  Creating "Debug\NoRec.unsuccessfulbuild" because "AlwaysCreate" was specified.
    1>ClCompile:
    1>  stdafx.cpp
    1>  NoRec.cpp
    1>c:\users\lenovo v470\documents\visual studio 2010\projects\norec\norec\norec.cpp(69): fatal error C1010: unexpected end of file while looking for precompiled header. Did you forget to add '#include "StdAfx.h"' to your source?
    1>
    1>Build FAILED.
    1>
    1>Time Elapsed 00:00:10.38
    ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
    Error Or What?

    ps. Please Be Patient since im new to this but i have used turboc3 in the past

    update.
    after some code editing this is my new error

    Code:
    Code
    
    #include <windows.h>
    #include "stdafx.h"
    #define wpoint 0xE66094
    #define NoRecoil1 0xEA8
    #define NoRecoil2 0x1178
    #define NoRecoil3 0x1010
    #define NoRecoil4 0x36B8
    #define NoRecoil5 0x34E8
    #define NoRecoil6 0x34D8
    #define NoRecoil7 0x658
    
    bool coil = true; 
    
    
    DWORD CShell     = (DWORD)GetModuleHandleA("CShell.dll");
    DWORD pWeaponMgr = *(DWORD*)(CShell + wpoint);
    
    
    if (coil);
    {
    	if (pWeaponMgr);
    		{
    			for(int i=0; i<600; i++);
    				{	
    					if((*(DWORD*)((*(DWORD*)(CShell+WeaponMgr))+(4*i))) != NULL)
    					*(float*)((*(DWORD*)((*(DWORD*)(CShell+WeaponMgr))+(4*i))) + NoRecoil1) = 100;
    
    					i=0;
    
    	
    					if((*(DWORD*)((*(DWORD*)(CShell+WeaponMgr))+(4*i))) != NULL)
    					*(float*)((*(DWORD*)((*(DWORD*)(CShell+WeaponMgr))+(4*i))) + NoRecoil2) = 100;
    
    					i=0;
    
    	
    					if((*(DWORD*)((*(DWORD*)(CShell+WeaponMgr))+(4*i))) != NULL)
    					*(float*)((*(DWORD*)((*(DWORD*)(CShell+WeaponMgr))+(4*i))) + NoRecoil3) = 100;
    
    					i=0;
    
    	
    					if((*(DWORD*)((*(DWORD*)(CShell+WeaponMgr))+(4*i))) != NULL)
    					*(float*)((*(DWORD*)((*(DWORD*)(CShell+WeaponMgr))+(4*i))) + NoRecoil4) = 100;
    
    					i=0;
    			
    	
    					if((*(DWORD*)((*(DWORD*)(CShell+WeaponMgr))+(4*i))) != NULL)
    					*(float*)((*(DWORD*)((*(DWORD*)(CShell+WeaponMgr))+(4*i))) + NoRecoil5) = 100;
    
    					i=0;
    
    	
    					if((*(DWORD*)((*(DWORD*)(CShell+WeaponMgr))+(4*i))) != NULL)
    					*(float*)((*(DWORD*)((*(DWORD*)(CShell+WeaponMgr))+(4*i))) + NoRecoil6) = 100;
    	
    					i=0;
    
    	
    					if((*(DWORD*)((*(DWORD*)(CShell+WeaponMgr))+(4*i))) != NULL)
    					*(float*)((*(DWORD*)((*(DWORD*)(CShell+WeaponMgr))+(4*i))) + NoRecoil7) = 100;
    				}	
    		}
    }
    
    The Log
    
    1>------ Build started: Project: NoRec, Configuration: Debug Win32 ------
    1>Build started 4/10/2013 1:03:45 AM.
    1>InitializeBuildStatus:
    1>  Touching "Debug\NoRec.unsuccessfulbuild".
    1>ClCompile:
    1>  All outputs are up-to-date.
    1>  NoRec.cpp
    1>c:\users\lenovo v470\documents\visual studio 2010\projects\norec\norec\norec.cpp(20): error C2059: syntax error : 'if'
    1>c:\users\lenovo v470\documents\visual studio 2010\projects\norec\norec\norec.cpp(21): error C2447: '{' : missing function header (old-style formal list?)
    1>
    1>Build FAILED.
    1>
    Last edited by awtstalamaker; 04-09-2013 at 09:04 AM.
    FUCK THOSE VOUCH 2 VOUCH, THEY ARE ALL FAKE AND GAY

    Code:
    Its like asking a friend to like your pic in exchange for liking his pic back. which is very FAKE |  Or 2 dudes sucking each other, Which is GAY

  2. #2
    LucN's Avatar
    Join Date
    Apr 2013
    Gender
    male
    Location
    EAST JJJJJJJJJEEEEEEEEEEEEERUSALEM
    Posts
    51
    Reputation
    10
    Thanks
    216
    Put your codes into a function argument and add a DllMain, i fixed your code for you.
    This addresses are from PH version, right ?

    Code:
    #include <Windows.h>
    
    
    #define WeaponMgr 0xE66094
    
    #define NoRecoil1 0xEA8
    #define NoRecoil2 0x1178
    #define NoRecoil3 0x1010
    #define NoRecoil4 0x36B8
    #define NoRecoil5 0x34E8
    #define NoRecoil6 0x34D8
    #define NoRecoil7 0x658
    
    int NoRecoil  = 1; 
    
    void MemoryFunction ( void )
    {
    	DWORD CShell     = (DWORD)GetModuleHandleA("CShell.dll");
    	DWORD pWeaponMgr = *(DWORD*)(CShell + WeaponMgr);
    	
    	for (int i=0; i<=999; i++)
    	{
    		DWORD Weapon = (*(DWORD*)(pWeaponMgr + (4*i)));
    		if(Weapon)
    		{
    			if ( NoRecoil )
    				for(int y = 0; y<9; y++) 
    				{
    					*(float*)( Weapon + (NoRecoil1 + (4*y))) = 0.0f;
    					*(float*)( Weapon + (NoRecoil2 + (4*y))) = 0.0f;
    					*(float*)( Weapon + (NoRecoil3 + (4*y))) = 0.0f;	
    					*(float*)( Weapon + (NoRecoil4 + (4*y))) = 0.0f;
    			                *(float*)( Weapon + (NoRecoil5 + (4*y))) = 0.0f;
    				        *(float*)( Weapon + (NoRecoil6 + (4*y))) = 0.0f;
    				        *(float*)( Weapon + (NoRecoil7 + (4*y))) = 0.0f;
    				}
    		}
    	}
    
    }
    
    BOOL WINAPI DllMain ( HMODULE hideDLL , DWORD dwReason , LPVOID lpvReason )
    {
    	DisableThreadLibraryCalls(hideDLL);
    
    	if (dwReason == DLL_PROCESS_ATTACH)
    	{
    		CreateThread(0,0,(LPTHREAD_START_ROUTINE)MemoryFunction,0,0,0);
    	}
    	return TRUE;
    }
    Last edited by LucN; 04-09-2013 at 11:05 AM.

  3. #3
    awtstalamaker's Avatar
    Join Date
    Mar 2010
    Gender
    male
    Posts
    130
    Reputation
    10
    Thanks
    54
    My Mood
    Blah
    Thanks For The Replies. And Yes The Addresses Are For CFPH. I Will Take Note Of That DllMain And The Function Argument
    FUCK THOSE VOUCH 2 VOUCH, THEY ARE ALL FAKE AND GAY

    Code:
    Its like asking a friend to like your pic in exchange for liking his pic back. which is very FAKE |  Or 2 dudes sucking each other, Which is GAY

  4. #4
    kinibayVIP44's Avatar
    Join Date
    Apr 2013
    Gender
    male
    Location
    Kinibay
    Posts
    0
    Reputation
    10
    Thanks
    3
    My Mood
    Aggressive

    Wink Yep, Try that mate!

    I see only one error, you are too new to C++ to make hacks properly yet.
    But, I'll help u more, too much more in fact.. lol

    Ok. So, this code will get you Banned, but before u even get banned Crossfire will crash cause of Xtrap.

    You are loading CShell the old, detected way.

    You need to encrypt the string "CShell.dll" in this line of your code:
    Code:
     DWORD CShell = ( DWORD ) GetModuleHandleA("CShell.dll");
    to do this, Click: Project -> Add New Item -> select Header File (.h)

    Name it Encrypt.

    go to encrypt, paste this in ( C + P ready lol )

    Code:
    #ifndef _XOR_H // credits to Stalin for XOR encryption.
    #define _XOR_H
    template <int XORSTART, int BUFLEN, int XREFKILLER>
    
    class XorStr
    {
    private: 
    	XorStr();
    public: 
    	char s[ BUFLEN ];
    
    	XorStr( const char * xs );
    
    	~XorStr()
    	{
    		for ( int i = 0; i < BUFLEN; i++ ) s[ i ]=0; 
    	}
    };
    
    template <int XORSTART, int BUFLEN, int XREFKILLER>
    XorStr<XORSTART,BUFLEN,XREFKILLER>::XorStr( const char * xs )
    {
    	int xvalue = XORSTART;
    	int i = 0;
    
    	for ( ; i < ( BUFLEN - 1 ); i++ ) 
    	{
    		s[ i ] = xs[ i - XREFKILLER ] ^ xvalue;
    		xvalue += 1;
    		xvalue %= 256;
    	}
    
    	s[ BUFLEN - 1 ] = 0;
    }
    #endif
    
    #define CShellEncrypted /*CShell.dll*/XorStr<0x77,11,0x0026791B>("\x34\x2B\x11\x1F\x17\x10\x53\x1A\x13\xEC"+0x0026791B).s
    NOW, Go back to your Main.cpp or DLLmain.cpp or whatever, and add this:
    Code:
    #include Encrypt.h
    Now, you have to change your old Loading CShell method, change it to this:
    Code:
    DWORD CShell = ( DWORD ) GetModuleHandleA(CShellEncrypted);
    And Vuala! IT WORKS! (your loading CShell works, not sure about the rest :P)

    Remember to THANKS if I helped!

    Credits: @LucN ,but I donno if he made that encryption method, I'm not sure.

  5. #5
    LucN's Avatar
    Join Date
    Apr 2013
    Gender
    male
    Location
    EAST JJJJJJJJJEEEEEEEEEEEEERUSALEM
    Posts
    51
    Reputation
    10
    Thanks
    216
    Quote Originally Posted by kinibayVIP44 View Post
    I see only one error, you are too new to C++ to make hacks properly yet.
    But, I'll help u more, too much more in fact.. lol

    Ok. So, this code will get you Banned, but before u even get banned Crossfire will crash cause of Xtrap.

    You are loading CShell the old, detected way.

    You need to encrypt the string "CShell.dll" in this line of your code:
    Code:
     DWORD CShell = ( DWORD ) GetModuleHandleA("CShell.dll");
    to do this, Click: Project -> Add New Item -> select Header File (.h)

    Name it Encrypt.

    go to encrypt, paste this in ( C + P ready lol )

    Code:
    #ifndef _XOR_H // credits to Stalin for XOR encryption.
    #define _XOR_H
    template <int XORSTART, int BUFLEN, int XREFKILLER>
    
    class XorStr
    {
    private: 
    	XorStr();
    public: 
    	char s[ BUFLEN ];
    
    	XorStr( const char * xs );
    
    	~XorStr()
    	{
    		for ( int i = 0; i < BUFLEN; i++ ) s[ i ]=0; 
    	}
    };
    
    template <int XORSTART, int BUFLEN, int XREFKILLER>
    XorStr<XORSTART,BUFLEN,XREFKILLER>::XorStr( const char * xs )
    {
    	int xvalue = XORSTART;
    	int i = 0;
    
    	for ( ; i < ( BUFLEN - 1 ); i++ ) 
    	{
    		s[ i ] = xs[ i - XREFKILLER ] ^ xvalue;
    		xvalue += 1;
    		xvalue %= 256;
    	}
    
    	s[ BUFLEN - 1 ] = 0;
    }
    #endif
    
    #define CShellEncrypted /*CShell.dll*/XorStr<0x77,11,0x0026791B>("\x34\x2B\x11\x1F\x17\x10\x53\x1A\x13\xEC"+0x0026791B).s
    NOW, Go back to your Main.cpp or DLLmain.cpp or whatever, and add this:
    Code:
    #include Encrypt.h
    Now, you have to change your old Loading CShell method, change it to this:
    Code:
    DWORD CShell = ( DWORD ) GetModuleHandleA(CShellEncrypted);
    And Vuala! IT WORKS! (your loading CShell works, not sure about the rest :P)

    Remember to THANKS if I helped!

    Credits: @LucN ,but I donno if he made that encryption method, I'm not sure.
    this is useless for CFPH because XTRAP is older version than EU & NA.

  6. #6
    BACKD00R's Avatar
    Join Date
    Jan 2010
    Gender
    male
    Location
    Brazil
    Posts
    10,711
    Reputation
    1814
    Thanks
    31,902
    My Mood
    Aggressive
    /facepalm


    1>c:\users\lenovo v470\documents\visual studio 2010\projects\norec\norec\norec.cpp(69): fatal error C1010: unexpected end of file while looking for precompiled header. Did you forget to add '#include "StdAfx.h"' to your source?

    The error is self-explaining!



     

    Skype : BACKD00R-MPGH

     

    • Contributor: October, 31th 2011
    • CA BR Minion: January, 03th 2012
    • CF AL Minion: April, 07th 2012
    • CA Minion: April, 15th 2012
    • CF Minion: July, 03th 2012
    • PB Minion: January, 25th 2013
    • AVA Minion : February, 02th 2013
    • Arctic Combat minion: April, 03th 2013
    • Warface Minion: April, 03th 2013

    • Minion + : July 08th 2012
    • Moderator : January 21th 2013
    • Global Moderator : August 1st 2013







  7. #7
    LucN's Avatar
    Join Date
    Apr 2013
    Gender
    male
    Location
    EAST JJJJJJJJJEEEEEEEEEEEEERUSALEM
    Posts
    51
    Reputation
    10
    Thanks
    216
    Quote Originally Posted by BACKD00R View Post
    /facepalm


    1>c:\users\lenovo v470\documents\visual studio 2010\projects\norec\norec\norec.cpp(69): fatal error C1010: unexpected end of file while looking for precompiled header. Did you forget to add '#include "StdAfx.h"' to your source?

    The error is self-explaining!
    even if he did include stdafx.h , he'll have other errors because he didn't add his codes to function argument.

Similar Threads

  1. Where an error in a code?
    By Nikita1482 in forum CrossFire Hack Coding / Programming / Source Code
    Replies: 2
    Last Post: 01-03-2012, 08:08 AM
  2. Prompt an error in a code
    By Nikita1482 in forum CrossFire Hack Coding / Programming / Source Code
    Replies: 2
    Last Post: 12-19-2011, 01:24 PM
  3. [Source Code] My 14 error fixed source code [2 notfixed]
    By TheGoodB0y in forum WarRock Hack Source Code
    Replies: 0
    Last Post: 08-20-2011, 03:45 PM
  4. ERROR, with my code.
    By topblast in forum Combat Arms Coding Help & Discussion
    Replies: 11
    Last Post: 01-12-2011, 06:43 PM
  5. [Help] ERROR: Child block [code:5] or something like that
    By {NavY}SfAssault in forum WarRock - International Hacks
    Replies: 1
    Last Post: 10-10-2009, 03:07 PM