This is the example you made for me flame! Hey, we still need to finish our chams lesson >
in the Swich function you input the variable as the first and only parameter, and then uses cases between the brackets example.
Now lets make its a little bit more complicated for you have some code to observe.Code:Swich(1) { case 1: //Your Code here break; }
Possible Outputs:Code:int SelectHack = 0; char* MyVar = ""; Swich(SelectHack) { case 1: MyVar = "A"; break; // This stops a case, for you can begin the next or stop your cases. its basically the end bracket for a case , with ":" being the start bracket case 2: MyVar = "B"; break; case 3: MyVar = "C"; break; case 4: MyVar = "D"; break; case 5: MyVar = "E"; break; }
SelectHack = 1
MyVar = "A";
SelectHack = 2
MyVar = "B";
SelectHack = 3
MyVar = "C";
SelectHack = 4
MyVar = "D";
SelectHack = 5
MyVar = "E";
Last edited by CoderNever; 08-07-2011 at 07:41 PM.
This is the example you made for me flame! Hey, we still need to finish our chams lesson >
it still doesn't work it says
1>------ Build started: Project: Project, Configuration: Debug Win32 ------
1> stdafx.cpp
1> dllmain.cpp
1> Project.cpp
1>c:\users\every one's account\documents\visual studio 2010\projects\project\project\project.cpp(28): error C2065: 'HackOn' : undeclared identifier
1>c:\users\every one's account\documents\visual studio 2010\projects\project\project\project.cpp(30): error C2065: 'HackOn' : undeclared identifier
1>c:\users\every one's account\documents\visual studio 2010\projects\project\project\project.cpp(30): error C2065: 'HackOn' : undeclared identifier
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
if you knew c++ , you would be able to fix it by yourself, the Compiler has already said everything.
Error : "HackON" Indentifier undeclared.
basicly the break keyword, will stop if it's true.
example
case i receive a gift then: hello i received my gift
then causing the end of loop we have and great job @Codenever
Last edited by DecoderBack; 08-10-2011 at 11:59 AM.
C#(.net)/C++ Coder
Assembly coder [Current learning more]
dude why does it always said 0 succed and 1 fail is it still work
Nice source thanks.
Can someone teach me how to code hacks I really want to learn but it's so confusing
Well i try to edit this into my owned hack but i keep getting
Please help1>c:\users\admin\desktop\c++ projects\yo\yo\yo.cpp(75): error C2601: 'Lesson' : local function definitions are illegalDWORD WINAPI Lesson (LPVOID)
// This is just a dummy function that will be the code activate the main thread
{
Main();
//Call the thread called Main
return 1;
//Finish of the thread.
}
BOOL WINAPI DllMain ( HMODULE hDll, DWORD dwReason, LPVOID lpReserved )
// DllMain is an optional function for you to declare.
// It serves as the entry point for any DLL
{
DisableThreadLibraryCalls(hDll);
// Make a call to DisableThreadLibraryCalls with the hModule variable
// as its argument; Doing this is an optimization trick to prevent
// needless thread attach/detach messages from triggering further calls
// to our DllMain function.
if ( dwReason == DLL_PROCESS_ATTACH )
{
//When this dll is injected into the process. this is what the dll is supposed to do.
// Null, in C Plus Plus, nothing. It is defined as 0
CreateThread(NULL, NULL, Lesson, NULL, NULL, NULL);
//It creates the thread called "Lesson" which is defined a few lines up. DWORD WINAPI Lesson (LPVOID)
}
return TRUE;
// Although the return value doesn't actually matter. You return the value TRUE or FALSE indicatinng success or failure.
}
1> c:\users\admin\desktop\c++ projects\yo\yo\yo.cpp(15): this line contains a '{' which has not yet been matched
1>c:\users\admin\desktop\c++ projects\yo\yo\yo.cpp(85): error C2601: 'DllMain' : local function definitions are illegal
1> c:\users\admin\desktop\c++ projects\yo\yo\yo.cpp(15): this line contains a '{' which has not yet been matched
1>c:\users\admin\desktop\c++ projects\yo\yo\yo.cpp(103): fatal error C1075: end of file found before the left brace '{' at 'c:\users\admin\desktop\c++ projects\yo\yo\yo.cpp(15)' was matched
For 2nd and 4th you need to add a } at the end of whatever is in the {.
i am not at home right now , so i can't test anything but try this. below and fix the rest by yourself .
[html]
#include<windows.h> // add this to yoursource code if you forgot
[/html]
[html]
DWORD WINAPI Lesson (LPVOID)
// This is just a dummy function that will be the code activate the main thread
{
Main();
//Call the thread called Main
return 1;
//Finish of the thread.
}
BOOL WINAPI DllMain ( HMODULE hDll, DWORD dwReason, LPVOID lpReserved )
{
DisableThreadLibraryCalls(hDll);
}
if ( dwReason == DLL_PROCESS_ATTACH )
{
CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE)Lesson, NULL, NULL, NULL);
}
return TRUE;
}
[/html]
Last edited by DecoderBack; 08-19-2011 at 08:24 PM.
C#(.net)/C++ Coder
Assembly coder [Current learning more]
@flameswor10 I'm sorry but im new to this site, and i got no idea how hacks work. I'm going to buy Visual C++ Express this week. But Could you please explain to me how hacking works and how to put codes and stuff? I'm really interested in making hacks for MPGH.
-The Joker.
ikr... if someone was to write it all in a post.. it would be a code
just use Learn C++
hey its not working for me. i do as you say but after i hit finish i come to this screen.
ok i need some help i tried to upload a photo and it because a link below. how i fix it?
FIXED IT. but i still can't get the program to work right
Last edited by maxxe23; 08-28-2011 at 04:20 PM. Reason: made mistake, fixed