Post: Simple Advertiser + Open Source[100% Understandable]
03-04-2014, 05:29 PM #1
ByteSource
League Champion
(adsbygoogle = window.adsbygoogle || []).push({});
Ghost Advertiser
Haters Going to Hate!


To begin, for you top dogs at coding dont hate because u know very well how easy this is. This isnt for you this is for the people that want to learn coding. Most people have troubles with iPrints because of the location like RPC or Hud etc. so i made this Advertiser CLEARLY so you can understand it.

RPC.iPrintln(client, "MESSAGE HERE"); | displays a message in killfeed for self only
RPC.iPrintln(-1, "MESSAGE HERE"); | displays a message in killfeed for all clients.
RPC.iPrintlnBold(client, "MESSAGE HERE"); | displays a message in Center of screen.
RPC.iPrintlnBold(-1, "MESSAGE HERE"); | displays a message in Center of screen.
Hud.StoreTextElem(100, (int)AllClientHUD, textBox4.Text.......); | typewriter all clients
Hud.StoreTextElem(100, client, textBox#.Text.......); | typewriter self


Tool Picture:
You must login or register to view this content.


Download Source:
You must login or register to view this content.

Virus scan:
No need for open source


My wonderful hater over everyones work because he cant do better than anyone:

Originally posted by InkMods View Post
90% of tools released can do this, another pointless release.

when will you learn that everything you do is already released and is pointless? Enzo
(adsbygoogle = window.adsbygoogle || []).push({});

The following 10 users say thank you to ByteSource for this useful post:

Asian, BroIDontMod, Drughi, xTc, Mango_Knife, ResistTheMoon, WhyMoDz, xROccOx

The following user groaned ByteSource for this awful post:

FarSideX
03-05-2014, 09:53 PM #29
Cmd-X
It's been awhile.
Originally posted by oGTemp0 View Post
Thanks this will come in useful when making my tool Needa


Your sig. :yes:
03-05-2014, 10:02 PM #30
ByteSource
League Champion
Originally posted by FarSideX View Post
Sure can. As this is supposed to be a learning tool I'll explain what I think is wrong with it from that perspective.

Please do not be offended as a lot of criticism is to follow. You are not the only one that makes these errors but passing them on as a learning tool is just wrong IMHO. Hopefully you as well as others can take this as a learning experience.

The classes Hud.cs, PS3.cs and RPC.cs contain absolutely no comments with the exception of Hud.cs that contains the comment "//TypeWriter" twice. The only reason the second occurrence of that comment is made is because it was copy/pasted from the first.

The same classes are also not your programming and are simply plagiarized code. Not only does the style not match your own and simple web search of the code will find the sources you took them from.

I won't comment on the code in those classes simply because it is not your's although you claim that it is. But there is one point I would like to make, when using someone else's source code, even with their permission you must add comments relating to the author of the code. There are some exceptions, eg: the author has stated he does not wish for his name to be there, but a note that is not yours should always be added.

In those classes you changed the namespace name for some unknown to me reason. Completely unnecessary.

What is immediately noticeable when you open the Form1.cs file is the complete lack of error checking. It is no where to be found, completely and utterly absent. For this reason alone this source should not be used to learn from and would get an immediate fail in my class. I will get back to this later.

Your naming convention is confusing at best. Naming controls as if they are custom classes is confusing, for example you rename a button as 'Attach'. There are no rules to naming objects but there are ways that have become accepted as a standard. For readability following them will help others follow your code. Using 'bAttach' or 'buttonAttach' is much more readable. Rather than get too far into that a simple web search should find you lots of examples on this topic.

Starting from the top this:
    using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using DevComponents.DotNetBar.Metro;
using PS3Lib;
Should be this:
    using System;
using DevComponents.DotNetBar.Metro;
using PS3Lib;
Including all those namespaces you don't use serves no purpose and will only confuse beginners about their use. This is also where you should include the namespace names of the included classes rather than changing the namespace name in those classes.
            uint AllClientHUD = 0x7FF;
This int never changes and should be declared static and in your Offsets class, which by the way should also be declared as a static class since it only contains static data. That will prevent if from being unnecessary instantiated multiple times.
            public static Random TeamIdentity = new Random();
public static PS3API PS3 = new PS3API(SelectAPI.TargetManager);
The naming for your Random, see above comments. Why are these declared 'public static'? The random is always passed by value and the PS3API could be passed by reference so they should be private and static is just unnecessary.
            int client;
Declared but never used.
            private void Form1_Load(object sender, EventArgs e)        {


}
Does nothing. Why make an EventHandler that does nothing?
            private void button1_Click(object sender, EventArgs e)
{
Attach.Enabled = false;//Disables Attach button until connect
Enable.Enabled = false;//Disables Enable Huds untill connected and attached
PS3.ConnectTarget(0);//Connects
Connect.Text = "Good";//Changes Connect Button to "Good"!
Attach.Enabled = true;//Enables Attach after connected
Connect.Enabled = false;//Disables Connect after connected.
}
This is your Click EnventHandler for a button you renamed 'Connect' but it is called button1_Click, confused yet?
The problems in this EventHandler are you disable your other buttons here, That should be done in your empty Form_Load EventHandler or in the Form1 constructor because they are enabled unless you connect first. It could also be done in the designer and the designer would add it to the constructor for you.
You have 'Attach' disabled then enabled 4 lines later with nothing between that would change program flow.
PS3Lib.ConnectTarget does not throw exceptions and all exceptions below it are caught (it may throw NullReferenceExceptions I don't remember), it is however a bool that returns its success or not. This bool should be checked before allowing your code to continue as if it was always true.
Placing your control enabling and disabling in a separate private method would also a good idea for readability and debugging purposes.
The commenting is well done but would be more readable if tabbed away from the end of the code line.

            private void button2_Click(object sender, EventArgs e)        {
PS3.AttachProcess();//Attaches Ps3
Attach.Text = "Good";
Attach.Enabled = false;//Diables Attached Button after attached
Enable.Enabled = true;//Enables Enable Huds after attached
RPC.Init();//Added incase if extending the tool for clients visions etc
RPC.Enable_RPC();//added ^
}
This EventHandler contains all the same error as the one above. I would not have commented on it if not for the comments following RPC.Init. You do make use of RPC later so the comment is confusing.
RPC.Init used to return a error message but someone commented it out and now it still returns an int value of 0 every time. Why remove the ability to error check?
            //client = self
A comment about a variable that is never used?

All the other button's click EventHandlers are named for buttons that do not exist with the exception of 'Both'. You named your 'Send All' button 'Both'? More unnecessary confusion.
They contain method calls that are not documented in your code. I got the impression that this was to document their usage but there is no comments about the subject at all.

As for the form design, this is a personal area, and little can be called outright wrong. But, why place the buttons at the bottom of the form? Would it not be more intuitive if placed to the right of the textboxes they relate to?

I hope you take this in the manner in which I posted it. I do not mean to insult your code in this post and hope you can learn at least something from it. You hoped people could learn from your code, maybe they still can.


here let me tell you something simple, if you show someone how to make a tool or any kind of program your way i promise you theyll understand 10% of what you said. My Way is super simple and easy to understand. your just trying to be super pro on people that dont know what there doing. i can make this very very more optimized and just make it 2 steps. but then people wont understand what the hell i did. you are right at like 3 things but yet new coders wont understand u. If you think you can do better at helping someone even more simple then make a program and help them.
03-06-2014, 01:58 AM #31
FarSideX
I’m too L33T
Originally posted by TeamIdentity View Post
here let me tell you something simple, if you show someone how to make a tool or any kind of program your way i promise you theyll understand 10% of what you said. My Way is super simple and easy to understand. your just trying to be super pro on people that dont know what there doing. i can make this very very more optimized and just make it 2 steps. but then people wont understand what the hell i did. you are right at like 3 things but yet new coders wont understand u. If you think you can do better at helping someone even more simple then make a program and help them.


I tried being nice, that didn't work so I won't be any more.

You have missed the point completely. I suspect you may be religious but maybe just stupid. Beside you asked me to show you what was wrong so I did.

Your 'program' and I use the term lightly as it is just other peoples work you claim to be your own, is the exact opposite to what you claim it to be. It is not easy to understand because of your retarded naming convections. It shows very bad programming style, see my above post for an explanation that.

You should not be trying to teach people if you can not understand what I said in the above post. You should learn the very basics of programming first because you clearly have no idea what your are doing.
03-06-2014, 02:12 AM #32
ByteSource
League Champion
Originally posted by FarSideX View Post
I tried being nice, that didn't work so I won't be any more.

You have missed the point completely. I suspect you may be religious but maybe just stupid. Beside you asked me to show you what was wrong so I did.

Your 'program' and I use the term lightly as it is just other peoples work you claim to be your own, is the exact opposite to what you claim it to be. It is not easy to understand because of your retarded naming convections. It shows very bad programming style, see my above post for an explanation that.

You should not be trying to teach people if you can not understand what I said in the above post. You should learn the very basics of programming first because you clearly have no idea what your are doing.


one more time sense your to stupid to read.

If you can do better then shut the fuck! up and make a program your self and release the source so people can understand. kill me.
you think your too good at coding but your not, and i stated i can optimize the whole thing into 2 damn steps but as i seen your too stupid to read and understand. NOW quit waisting my time if your not going to make shit to help people.
03-06-2014, 03:36 AM #33
nickyg1217
Bounty hunter
Originally posted by TeamIdentity View Post
one more time sense your to stupid to read.

If you can do better then shut the fuck! up and make a program your self and release the source so people can understand. kill me.
you think your too good at coding but your not, and i stated i can optimize the whole thing into 2 damn steps but as i seen your too stupid to read and understand. NOW quit waisting my time if your not going to make shit to help people.


I just read through this whole thing and aside from you being just basically an asshole, you sir, might also have autism.
03-06-2014, 07:29 AM #34
ByteSource
League Champion
Originally posted by nickyg1217 View Post
I just read through this whole thing and aside from you being just basically an asshole, you sir, might also have autism.


im not being a asshole, im annoyed of these kids that think there so fucking pro but there not!, if they would be so pro theyll stop complaining about other peoples work and make something better to HELP people. this isnt to help me, i dont need his help i know C. he doesnt need to tutor me.
03-06-2014, 03:36 PM #35
FarSideX
I’m too L33T
Originally posted by TeamIdentity View Post
im not being a asshole, im annoyed of these kids that think there so fucking pro but there not!, if they would be so pro theyll stop complaining about other peoples work and make something better to HELP people. this isnt to help me, i dont need his help i know C. he doesnt need to tutor me.


Yes you are being an asshole. You say you are annoyed by kids thinking they are pro but are not, is that not describing you? I get paid to program so that is the textbook example of someone who is a professional. It is extremely obvious you are a kid by your obvious lack of education, so do not refer to others as 'kid'.
I am helping others by warning them not to follow your example. You do need help as you don't even know the most basic of programming techniques. You are correct that I do not NEED to tutor you, I was being nice by choosing to after you asked me to show you what was wrong with your code.
03-26-2014, 08:13 PM #36
Asian
Banned
Originally posted by FarSideX View Post
I tried being nice, that didn't work so I won't be any more.

You have missed the point completely. I suspect you may be religious but maybe just stupid. Beside you asked me to show you what was wrong so I did.

Your 'program' and I use the term lightly as it is just other peoples work you claim to be your own, is the exact opposite to what you claim it to be. It is not easy to understand because of your retarded naming convections. It shows very bad programming style, see my above post for an explanation that.

You should not be trying to teach people if you can not understand what I said in the above post. You should learn the very basics of programming first because you clearly have no idea what your are doing.

your amazing at spelling. LMAOOOO
03-26-2014, 08:14 PM #37
Asian
Banned
Nice Relece. if i played ghosts i would attempt to try it out but shitty maps + a ban system Not Feeling it lmao :p

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo