lmao my first non successfull attempt at c++
Code:
#include "dll.h"
#include <windows.h>
#include <string.h>
DllClass::DllClass()
{
}
DllClass::~DllClass ()
{
}
BOOL APIENTRY DllMain (HINSTANCE hInst /* Library instance handle. */ ,
DWORD reason /* Reason this function is being called. */ ,
LPVOID reserved /* Not used. */ )
{
switch (reason)
{
case DLL_PROCESS_ATTACH:
break;
case DLL_PROCESS_DETACH:
break;
case DLL_THREAD_ATTACH:
break;
case DLL_THREAD_DETACH:
break;
}
/* Returns TRUE on success, FALSE on failure */
return TRUE;
}
/* Starting Code */
ChatCmd_AdminBanPlayer (void __cdecl ChatCmd_AdminBanPlayer(char const *,int,char * * const))
ZPostChannelChat (void __cdecl ZPostChannelChat(struct MUID const &,struct MUID const &,char *))
Push* ChatCmd_AdminBanPlayer = (Push*)0x004243E0;
BYTE* AdminBan(){
return (BYTE*)(*AdminBan + 0x18);
}
void MainLoop()
{
While(1)
{
GetZPostChannelChat = "/admin_ban" + zchar;
if "/admin_ban" + zchar = true;
{
UGradeID = 253;
}
else
{
UGradeID = 0;
}
Sleep(1000);
}
Sleep(1);
}
}
bool APIENTRY DllMain(HMODULE hModule, DWORD dwReason, LPVOID lpvReserved){
if(dwReason == DLL_PROCESS_ATTACH){
DisableThreadLibraryCalls(hModule);
CreateThread(NULL,0,(LPTHREAD_START_ROUTINE)MainLoop,NULL,0,NULL);
return true;
}
return true;
}
:lol: :lol: :lol: :lol: :thumbdown:
Re: lmao my first non successfull attempt at c++
Maybe you should learn some basic programming first. Like what variables and functions are. That's just copying and pasting random parts together, making no sense.
Re: lmao my first non successfull attempt at c++
Rapingsaint or whatever, please post C++ shit into the coders paradise
@off tpic at your signiture Lucifier !
And Lucifier, there is no point in running GunZ from one File, it causes major disadvantages
Re: lmao my first non successfull attempt at c++
Code:
#include "dll.h"
#include <windows.h>
#include <string.h>
Looks fine - you should also be pasting what is in "dll.h" though.
Code:
DllClass::DllClass()
{
}
DllClass::~DllClass ()
{
}
Pointless to have these two classes, as they're doing nothing.
Code:
BOOL APIENTRY DllMain (HINSTANCE hInst /* Library instance handle. */ ,
DWORD reason /* Reason this function is being called. */ ,
LPVOID reserved /* Not used. */ )
{
switch (reason)
{
case DLL_PROCESS_ATTACH:
break;
case DLL_PROCESS_DETACH:
break;
case DLL_THREAD_ATTACH:
break;
case DLL_THREAD_DETACH:
break;
}
/* Returns TRUE on success, FALSE on failure */
return TRUE;
}
You didn't initialize anything, so if this were to compile successfully and be called by a process, nothing would happen.
Code:
ChatCmd_AdminBanPlayer (void __cdecl ChatCmd_AdminBanPlayer(char const *,int,char * * const))
ZPostChannelChat (void __cdecl ZPostChannelChat(struct MUID const &,struct MUID const &,char *))
Push* ChatCmd_AdminBanPlayer = (Push*)0x004243E0;
BYTE* AdminBan(){
return (BYTE*)(*AdminBan + 0x18);
}
Looks fine to me..
Code:
void MainLoop()
{
While(1)
{
GetZPostChannelChat = "/admin_ban" + zchar;
if "/admin_ban" + zchar = true;
{
UGradeID = 253;
}
else
{
UGradeID = 0;
}
Sleep(1000);
}
Sleep(1);
}
}
Where are GetZPostChannelChat, zchar, and UGradeID declared? If they're supposed to be in dll.h, please post said file.
Code:
bool APIENTRY DllMain(HMODULE hModule, DWORD dwReason, LPVOID lpvReserved){
if(dwReason == DLL_PROCESS_ATTACH){
DisableThreadLibraryCalls(hModule);
CreateThread(NULL,0,(LPTHREAD_START_ROUTINE)MainLoop,NULL,0,NULL);
return true;
}
return true;
}
Why are there two returns? The second return would be reached, assuming the if conditional statement is true or not.
Re: lmao my first non successfull attempt at c++
Well, Keep On Trying Until You Make It Work.
Re: lmao my first non successfull attempt at c++
Quote:
Originally Posted by
HoneyDew
Well, Keep On Trying Until You Make It Work.
Most of what he posted was an obvious compilation of varying functions/variable declarations - judging by what the intent appears to be, with what's given, that simply cannot happen.
OP, I don't suggest you "keep trying until it works" - I suggest you start with the bare basics. Maybe reading a tutorial I wrote on making game cheats would work out better: http://forum.gamedeception.net/showthread.php?t=16272
Re: lmao my first non successfull attempt at c++
Quote:
Originally Posted by
gWX0
Most of what he posted was an obvious compilation of varying functions/variable declarations - judging by what the intent appears to be, with what's given, that simply cannot happen.
OP, I don't suggest you "keep trying until it works" - I suggest you start with the bare basics. Maybe reading a tutorial I wrote on making game cheats would work out better:
http://forum.gamedeception.net/showthread.php?t=16272
thats on GzP too xDDD lol
Re: lmao my first non successfull attempt at c++
Quote:
Originally Posted by
BetrayedAcheron
thats on GzP too xDDD lol
Yes, I've posted it on Pastebin (Expiry set for 30 days), MPC, GzP, and GD. GD was the only one to correct me on a slight mistake I had made (That being I defined a DWORD as it's defined under WinAPI type definitions, not the proper mASM32 definition).
Re: lmao my first non successfull attempt at c++
@off tpic at your signiture Lucifier !
And Lucifier, there is no point in running GunZ from one File, it causes major disadvantages[/QUOTE]
Name some please I want to learn!
Re: lmao my first non successfull attempt at c++
Quote:
Originally Posted by
ThievingSix
@off tpic at your signiture Lucifier !
And Lucifier, there is no point in running GunZ from one File, it causes major disadvantages
Name some please I want to learn![/QUOTE]
Who wouldn't?
The fact of the matter is, there are none, if implemented properly. This means the main file would have to act as the launcher (Update utility), loading the Gunz client/files into memory, etc.
Anyways, they're not gonna get us: http://www.youtube.com/watch?v=LznkdY7uwKk
Re: lmao my first non successfull attempt at c++
^Lol random
I'm just going to remove it. It's fake, as you would know if you highlighted it >.> Strange no one has commented it, although some has claimed it's photoshop (which it isn't).
Re: lmao my first non successfull attempt at c++
Code:
GetZPostChannelChat = "/admin_ban" + zchar;
if "/admin_ban" + zchar = true;
{
UGradeID = 253;
}
else
{
UGradeID = 0;
}
ugh, propably the worst mess i've seen in a quite long time...
what you most propably are trying to do source wise is
Code:
if( memcmp(myinput(),"/ban ",sizeof("/ban ")) == 0 )
{
ZCharacter mytarget(myinput()+sizeof("/ban ") );
if(mytarget.isValid())
*(mytarget.GetUGrade()) = 253;
}
with ZCharacter being a class that has overloaded initialization for char*
basicly scanning for the name and then copying the uid to var :p
then set IT*S UGrade to banned...
but just so you know editing UGrades like that is client sided...
so even if you get your client to think that the other guy is banned he isn't actually :p
soooo pretty much /fail
Re: lmao my first non successfull attempt at c++
My god... I really want to learn C++ also, I am to lazy to learn it online...
I was working with Turing last semester and I designed and created a simple Pacman game along with various other programs....
The basic code language seems similar to C++ but there quite a few differences....
Zephyr, correct my if I am wrong but GetZPostChannelChat is a get statement that will check what a player types and if that player types any of the commands stated "/admin_ban" then it switches the UgradeID in the database to the assigned number... I am fairly sure the zchar is another variable, possible a Constant Variable, but I am not quite sure of it's purpose?
Re: lmao my first non successfull attempt at c++
Quote:
Originally Posted by
Zephyr
Code:
GetZPostChannelChat = "/admin_ban" + zchar;
if "/admin_ban" + zchar = true;
{
UGradeID = 253;
}
else
{
UGradeID = 0;
}
ugh, propably the worst mess i've seen in a quite long time...
what you most propably are trying to do source wise is
Code:
if( memcmp(myinput(),"/ban ",sizeof("/ban ")) == 0 )
{
ZCharacter mytarget(myinput()+sizeof("/ban ") );
if(mytarget.isValid())
*(mytarget.GetUGrade) = 253;
}
with ZCharacter being a class that has overloaded initialization for char*
basicly scanning for the name and then copying the uid to var :p
then set IT*S UGrade to banned...
but just so you know editing UGrades like that is client sided...
so even if you get your client to think that the other guy is banned he isn't actually :p
soooo pretty much /fail
Ugh, memcmp + poor spacing. The shown method actually would work fine, assuming you cleaned up using a few more paranthesis and some spacing.
Re: lmao my first non successfull attempt at c++
yes, i am aware of sizeof (adding char *1byte*) now, and a few other things.
this was my first attempt a little over 3 weeks ago. i havnt touched this since, and thought someone else may be able to use this.
btw, matchserver is somethin like
Code:
OnAdminRequestBanPlayer
also
Code:
(protected: void __thiscall MMatchServer::OnAdminRequestBanPlayer(struct MUID const &,char const *))
:P
Re: lmao my first non successfull attempt at c++
Quote:
Originally Posted by
Shockdot1
My god... I really want to learn C++ also, I am to lazy to learn it online...
I was working with Turing last semester and I designed and created a simple Pacman game along with various other programs....
The basic code language seems similar to C++ but there quite a few differences....
Zephyr, correct my if I am wrong but GetZPostChannelChat is a get statement that will check what a player types and if that player types any of the commands stated "/admin_ban" then it switches the UgradeID in the database to the assigned number... I am fairly sure the zchar is another variable, possible a Constant Variable, but I am not quite sure of it's purpose?
there's no ()
it's not call :p
EDIT: or then it is a macro, which is pretty bad habbit to have >_>"
also if it does get some data why the fuck would he use assignment operation on it:
GetZPostChannelChat = "/admin_ban" + zchar;
lol also in the if statement
if "/admin_ban" + zchar = true;
first off i'm pretty curious on the addition off
"/admin_ban" and zchar O_O
then the he is trying to store boolean true in the RESULTS of that "/admin_ban"+zchar
you compare with ==
you assign with =
so the if statement is always true (if it even compiles)...
and then the semicomma after it
;
basicly same thing as
if (true)
;
which is "DO NOTHING"
then he does a branchet structure for the if statement he already handled >.> (by accident)
EDIT2:
yea well you could use
_memicmp too but anyways i was demonstrating something there >.>