Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > General Coding
You last visited: Today at 11:26

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



is my code ok?

Discussion on is my code ok? within the General Coding forum part of the Coders Den category.

Reply
 
Old   #1
 
Sloob's Avatar
 
elite*gold: 0
Join Date: Dec 2010
Posts: 6
Received Thanks: 1
Wink is my code ok?

hello people from the internet!
i wrote a code (My very first) its a warrock nomenu *Hack* that i use when im not *Hacking*... nothing deadly... just NFD,5th, and visual premium.

i know it work since i use it all the time but im new in coding and i would like to know if the syntax is good.

Please be friendly



EDIT: some contnent are copy and pasted from tutorials (it was my verry first time coding with c++ so i followed some tutorials)
Sloob is offline  
Old 11/15/2011, 20:12   #2
 
elite*gold: 9
Join Date: Dec 2009
Posts: 1,071
Received Thanks: 819
Quote:
Code:
void HackThread()
Code:
CreateThread(0, 0, (LPTHREAD_START_ROUTINE)HackThread, 0, 0, 0);
Mr.Smith wird sich aufregen

Warum ist bis auf die DllMain nichts eingerückt? Ansonsten siehsts ganz ok aus würd ich sagen...
.Infinite is offline  
Thanks
1 User
Old 11/15/2011, 20:14   #3
 
Sloob's Avatar
 
elite*gold: 0
Join Date: Dec 2010
Posts: 6
Received Thanks: 1
yes sorry i said i wrote my first code but i meant i kinda leeched it (i followed guides) since its my very first code i used some tutorial contnent i should give the credit to the actual writer of the tutorial excuse me
Sloob is offline  
Old 11/15/2011, 20:26   #4
 
elite*gold: 9
Join Date: Dec 2009
Posts: 1,071
Received Thanks: 819
My bad, i forgot you were writing in english... Although you apparently understood my reply.

More important is that you understand what your code is doing. If you have done that you are able to write hacks for almost any game you want. But from this

Quote:
its my very first code
I follow you did not.

You should better start off by learning the basics instead of copying code you don't understand!

This is a good introduction to start with:
.Infinite is offline  
Old 11/15/2011, 20:37   #5
 
Sloob's Avatar
 
elite*gold: 0
Join Date: Dec 2010
Posts: 6
Received Thanks: 1
Quote:
Although you apparently understood my reply.
Google traduction :P

i know the basic of c/c++ all the tutorial that i found was either copy and past or or some are of style : your already a coder so i dont explain anything.

so i took a copy and paste and i tried to understand it.... i think i have succeeded because the actual copy and paste *Tutorial* was about unl stamina superjump and NFD and i ended up *writing* a 5th slot,NFD and visual premium but as i said i am only starting c++ but i just want to say that i have a mini base of knowledge :P

so yeah... i understand the part where you put your hack
Exemple
Quote:
void allSlot()
{
DWORD dwSrvrPtr=*(DWORD*)ADR_ServerPoint;
if(dwSrvrPtr!=0)
{
*(long*)(dwSrvrPtr+OFS_5th) = 1;
}
}
but not the Hackthread or the bool, but imo any knowledge in any domain cannot hurt! so even if for now i dont realy understand 100% of what i do later im sure it will help me

BTW excuse my realy bad english.. i am french :S
Sloob is offline  
Old 11/15/2011, 20:48   #6
 
XxharCs's Avatar
 
elite*gold: 34
Join Date: Apr 2011
Posts: 1,475
Received Thanks: 1,227
Quote:
Code:
Code:
void HackThread()
Code:
CreateThread(0, 0, (LPTHREAD_START_ROUTINE)HackThread, 0, 0, 0);
Mr.Smith wird sich aufregen

Warum ist bis auf die DllMain nichts eingerückt? Ansonsten siehsts ganz ok aus würd ich sagen...
^this

@TE
this is not nice lol
Code:
void HackThread()
Code:
CreateThread(0, 0, (LPTHREAD_START_ROUTINE)HackThread, 0, 0, 0);
ur hackthread should be DWORD and should have params
do it so:
Code:
DWORD WINAPI HackThread(LPVOID unused)
Code:
CreateThread(0, 0, &HackThread , 0, 0, 0);
XxharCs is offline  
Old 11/15/2011, 20:50   #7
 
Sloob's Avatar
 
elite*gold: 0
Join Date: Dec 2010
Posts: 6
Received Thanks: 1
Thanks i will give it a try

Sloob is offline  
Old 11/15/2011, 21:22   #8
 
XxharCs's Avatar
 
elite*gold: 34
Join Date: Apr 2011
Posts: 1,475
Received Thanks: 1,227
Quote:
Originally Posted by ******/strong> View Post
Thanks i will give it a try

are u sure that ur addys are working ?
XxharCs is offline  
Old 11/15/2011, 21:24   #9
 
Sloob's Avatar
 
elite*gold: 0
Join Date: Dec 2010
Posts: 6
Received Thanks: 1
not tried today but yesterday they was
EDIT: yep they work
Sloob is offline  
Old 11/16/2011, 14:10   #10
 
Dr. Coxxy's Avatar
 
elite*gold: 0
Join Date: Feb 2011
Posts: 1,206
Received Thanks: 736
its ok.

4 things annoy me:

1. the apple logo as your avatar. (winfag here)^^

2.
what about errors?
createthread can fail etc.
add a logfunction, or debugoutput.
is quite easy and helps alot on finding bugs especially for a beginner.

3.
indentations?
make your code like this:
Code:
for (int i = 0; i < 10; i++)
{
	if (i < 5)
	{
		printf("hi");
	}
	else
	{
		printf("bye");
	}
}
4.
use proper function names and/or use comments
NFD();

what i like:

1.
you use brackets well and are not doing **** like this:
Code:
void myFunction(bool somebool) {
	if (somebool)
		printf("i am a noob");
}
whats bad about this code you ask?
using the '{' right after your function name just sucks and makes your code crabbed while using it in a single line is easy to see which brackets are together.
just not worth sparing this single line...

Code:
if (...)
    singleline command here
you may heard that a project is NEVER really finished.
just type the {} always then you dont have to set them later.
also makes your code easier to read and prevents some logical mistakes.

not bad, but as infinite already said, start with the basics and not some c+p barely understood code.

same with your first mistake with 'void thread(...'.
just take a look in the msdn they describe most things very well there.
Dr. Coxxy is offline  
Thanks
1 User
Old 11/16/2011, 18:30   #11
 
Sloob's Avatar
 
elite*gold: 0
Join Date: Dec 2010
Posts: 6
Received Thanks: 1
Thanks for your answer!

First sorry if my avatar annoy you but i will keep it...

Quote:
add a logfunction, or debugoutput.
is quite easy and helps alot on finding bugs especially for a beginner.
Thanks for this!

3. Thanks for the tip it realy help

4.
Quote:
use proper function names and/or use comments
NFD();
since it was my first code and i was the only one working on it, finding a easy to understand name was the least of my priority but from now on i will try to find more easy names xD

Thanks and as you and infinity said i will study the basics of c++, i just realy wanted to see if i like coding (im going to college) so i dont want to spend the rest of my life (or scolarship) on something that i hates! (i know this is only like 1% of a programer job but i can say i like this 1%)

Thanks again for your advices!
Sloob is offline  
Reply


Similar Threads Similar Threads
[Biete]1x Allstar Akali Code 2x Riot Nasus Code 7x PAX JAX Code
09/26/2011 - League of Legends Trading - 7 Replies
Hi, ich habe die Codes gewonnen und möchte sie nun verkaufen da ich kein LoL mehr Spiele. Skype: nashvil. mit dem Punkt! Ich erhalte die Paysafecards zuerst! Egal wieviele TBM ihr habt!
Biete AW50F Code + Javelin Code + Kamazaki Code an
08/18/2011 - WarRock Trading - 6 Replies
Biete AW50F Code + Javelin Code + Kamazaki Code an Was biete Ich _________________________________________________ _ _________________ ----- AW50F CODE ----- Javelin Code
Waffen Code´s - Premium Code´s - Dinar Code´s [VERKAUFBAR] ! ! !
03/10/2011 - WarRock Trading - 9 Replies
Waffen Code´s - Premium Code´s - Dinar Code´s ! ! ! Hallo Leute , ich verkaufe Code´s . Die Code´s werde ich jetzt darunter hinschreiben und ihr könnt euch bei mir melden 50 % Günstiger Als WarRock Marketplace . 1.Waffen Code´s >>> G36 Code Xm8 Code Javelin Code



All times are GMT +2. The time now is 11:26.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.