Source code NA Crossfire

Posts 1–10 of 10 · Page 1 of 1
Source code NA Crossfire
This is simple source code.

Code:
#include <windows.h>
#include <iostream>

using namespace std;

void __cdecl PushToConsole(char* szVal ) {
	DWORD dwCShell = (DWORD)GetModuleHandleA("CShell.dll");
	if( dwCShell != NULL )
	{
		DWORD *LTClient = ( DWORD* )( (dwCShell +  0x2AAE80) );
		void* CONoff = ( void* )*( DWORD* )( *LTClient + 0x1F8 );
		_asm
		{
			push szVal;
			call CONoff;
			add esp, 4;
		}
	}
}


DWORD WINAPI hello(LPVOID) {
	while(GetModuleHandleA("CShell.dll") == NULL ) {
	Sleep(100); //100ms
}

	bool PlayerGlow = true;  // auto on
	bool nosky = false; // needs to be activated
	bool Nosmoke = true; //auto on


for(;;) {
	__asm pushad;
			if(GetAsyncKeyState(VK_F9)&1) { //hotkey F9
				PlayerGlow = !PlayerGlow;
			}
			if(GetAsyncKeyState(VK_F10)&1){ //hotkey F10
				nosky = !nosky;
			}
			if(GetAsyncKeyState(VK_F5)&1) { //hotkey F5
				Nosmoke = !Nosmoke;
			}

			if (Nosmoke) {
				PushToConsole("DrawParticles 1"); //since it is auto on If you press F5(its hotkey) then it will have smoke
			} 
			else {
		        PushToConsole("DrawParticles 0");
			}
			if  (PlayerGlow) {
				PushToConsole("ScreenGlowEnable 1"); //since it is auto on If you press F9(its hotkey) then it will not glow
			}
			else {
				PushToConsole("ScreenGlowEnable 0");
			}
			if  (nosky) {
				PushToConsole("DrawSky 0"); //since it isn't auto on If you press F10 then there will  be no sky
			}
			else {
				PushToConsole("DrawSky 1");
			}
			
			__asm popad;
			Sleep(100);
	}
}

BOOL WINAPI DllMain ( HMODULE hDll, DWORD dwReason, LPVOID lpReserved )
{
	DisableThreadLibraryCalls(hDll);
	if ( dwReason == DLL_PROCESS_ATTACH )
	{
		MessageBoxA(0, "Made by Yourname \n HEY HAVE FUN!", "Message Title", 0); // \n adds another line
       CreateThread(NULL, NULL,hello, NULL, NULL, NULL);
	}
	return TRUE;
}
These have the functions:
  • Making Players glow
  • No smoke
  • no sky


In the code if you look for it the hot keys are explained in there.

In the code if you look for it the text in red at top, those are important to be up to date, you can look at Lauwy's tut on how to unpack cshell.dll then look at his other tut on how to find lt pointer if you need help finding that.

The text that is after the "" // "" means that it is a comment when you have to "" // "" then that part after it won't do anything to the code.

So when you edit/ write codes make sure not to forget to leave comments so you don't forget when you go back to it.

Example:
Code:
if(GetAsyncKeyState(VK_F2)&1)  // Check if F2 is pressed...
{                             // to start function/ end function
//Function
}
The text colored lime are the comments and i chose that color because that is the color it should show up as when using c++ or compiler.


Just simplified version of Mark's i guess.
Don't forget source codes aren't meant to just copy & paste then compile into dll :]
Bye!

-Nubzgetkillz
Quote Originally Posted by [Banned]mark0108 View Post
HEHE U Simplified myn
of course so it is easier to learn :]
Great!
I liked of this!
Nice if it's not too much trouble a link to Lauwys tut would be awsm
use google...
Posts 1–10 of 10 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us