PDA

View Full Version : "Add Model" Button!



~ fail coder ~
June 23rd, 2010, 11:28
Hey, Well, I just found this out of my client :P
So no credits to me :D

NOTE: This is sort of big (Not that big) Only because I explained it well.
It's short :P

This is what you do!
Declare this in client.java
[Just incase you don't know what declare is - it means add!]



public void models(){
for(int anIntX = 0; anIntX < 40000; anIntX++) {
byte[] abyte0 = GetModel(anIntX);
if(abyte0 != null && abyte0.length > 0){
aClass14Array970[1].method234(abyte0.length, abyte0, (byte)2, anIntX);
method77("Model added successfully!", 0, "", aBoolean991);
}
}
}


Under...


public class client extends Applet_Sub1

Now, we've done client.java side of this, now to add gui.java side to this!

In Gui.java search for

"File"
That's only if you have the option on your frame thing :P
If you don't search for

gamePanel.setPreferredSize(new Dimension(765, 503));
Now, under that declare this!



JButton modelMenu = new JButton("Add Models");
modelMenu.setActionCommand("add models");
modelMenu.addActionListener(this);
Now, under

menuBar.add(fileMenu);
Add this code!

menuBar.add(modelMenu);
Then again if you don't have the filemenu thing, add it under

modelMenu.addActionListener(this);

Okay, Now under...


if(setname.startsWith("pink")){
Setcolour(1,0xFF00FF,"Colour set to pink", "@cr3@");
setname = null;
}

Add This...

if (cmd.equalsIgnoreCase("add models")){
models();
}

Okay!
Now, Save, Compile, Run.
This adds all models in you're model folder, so you don't have to keep typing "Add model ####"
Hope you enjoy! Thanks guys!

Dyon123
June 23rd, 2010, 16:16
Wrong section...
This need to be at Client hacking, not Models...
But, Its still nice

Fenway`
June 23rd, 2010, 19:06
i think most clients have this now anyways but its still worth posting

~ fail coder ~
June 24th, 2010, 07:03
Not really, because this is based on models. It's for models, so I don't think it would be wrong section anyway.

~ fail coder ~
June 24th, 2010, 07:46
I've only seen 2 clients with it :O

~ZaRoS
June 24th, 2010, 13:24
Mmm, never was good with JFrames, but if I ever get one, using this for sure, thanks coder.

~ fail coder ~
June 25th, 2010, 06:01
You could add it into the "File" thing instead, and delete it off the JFrame, just a couple of simple ajustments.

~ZaRoS
June 25th, 2010, 06:03
Mmm, true, but my client's not refactored.
As for the links, sorry, off topic, you forgot my masks ones, and I just gave that dude the deku mask.

~ fail coder ~
June 25th, 2010, 06:05
Okay, and also, this is for non-renamed. lol

EDIT: Btw, you gave him the deku mask?
Make a thread if you did lol

EDIT: Finished adding you're masks :P

~ZaRoS
June 25th, 2010, 06:09
Mm, well, I use preloadinggg, so, that's why I'm going to use this on a jframed client.
I gave the guy that was requesting it the model in my post.
But that's fine, don't add it then, I don't feel like making a thread xD

pivotgamer84
June 25th, 2010, 19:59
fail coder, please stop double posting. Edit your old post.

Anyways, this looks ok, but I do 508 only. This seems to be of no use to me because I don't add a GUI to the client because it slows it down and is pretty pointless.

~ fail coder ~
June 25th, 2010, 22:11
I'm giving info while i'm bumping. that's why I double posted.

ownerrich
October 30th, 2010, 19:33
dude thank you so much this helped me alot!!

Zevole
October 31st, 2010, 07:47
work for Pi's clients?