Nice tut. I have actually wondered how to make a menu like that easy. But now i know. I actually thought you needed more code but IW really helped us with all those unused functions...
Well, now I want to show you how to make Arrays, even.. I am not sure if thats what we like to call them.
___________
Here we go.
First of all, we need to choose what it's gone be.
I will choose weapons for now. ( cuse most used and easy too )
First we start our line with:
Okey, that is the first line in our thread.self.wep = []
Then we gone add "sub arrays" that we will add our things to.
List:
Whats in read is just so you see what the difference here and the "main array" is.self.wep[0] = "ak47_mp";
then we make a long list of weps. ( or short )
Now I have a list of 6 Arrays. (Yes the 0 counts as 1 too)self.wep[0] = "ak47_mp";
self.wep[1] = "ump45_mp";
self.wep[2] = "usp_mp";
self.wep[3] = "tavor_mp";
self.wep[4] = "tmp_mp";
self.wep[5] = "rpg_mp";
Now we want to add it to a function/task.
Then I make a Press action thread to just see that this works:
As you see, I have marked more text.weproll()
{
self endon("death");
self endon("disconnect");
for(i=0; i<=5; i++)
{
self notifyOnPlayerCommand("N", "+actionslot 1");
self waittill("N");
self giveweapon(self.wep[i]);
self switchtoweapon(self.wep[i]);
}
}
The for(i=0; i<=5; i++) this will do so that the list will go up so we get our list to work as we want it to.
So when i = 0; menas that it will be Array 0.
And the i<=5; means that it will stop when it reach 5. (In this case it doesn't really mater that much but. We mostly like avoid lagg)
And the i++ means that we increase i that's 0 with 1 every time we press N.
Now I hope you learned how to make the Arrays.
You can also use this for threads and so on. (maps, models, visions, and more)
Nice tut. I have actually wondered how to make a menu like that easy. But now i know. I actually thought you needed more code but IW really helped us with all those unused functions...
The lines in my Steam are i's
It's not called 'sub-arrays', the numbers inside the square braces are called the indexes. If you do not know how many items are in the array you can use the .size property/variable.
If you want to add more things to the array but don't know what number to use, you can do this:Code:someArray = []; someArray[0] = "Hello!"; self iPrintLnBold(someArray.size); //This will display 1 on the screen because the 0 still counts!
Code:someArray = []; someArray[someArray.size] = 1; //At this point, someArray.size equals to 0 someArray[someArray.size] = 2; //At this point, someArray.size equals to 1 //At this point, someArray.size equals to 2
Donate:
BTC: 1GEny3y5tsYfw8E8A45upK6PKVAEcUDNv9
Handy Tools/Hacks:
Extreme Injector v3.7.3
A powerful and advanced injector in a simple GUI.
Can scramble DLLs on injection making them harder to detect and even make detected hacks work again!
Minion Since: 13th January 2011
Moderator Since: 6th May 2011
Global Moderator Since: 29th April 2012
Super User/Unknown Since: 23rd July 2013
'Game Hacking' Team Since: 30th July 2013
--My Art--
[Roxas - Pixel Art, WIP]
[Natsu - Drawn]
[Natsu - Coloured]
All drawings are coloured using Photoshop.
--Gifts--
[Kyle]
can you maybe show us a fully completed one?
because i don't really know were to put the
self.wep[0] = "ak47_mp";
self.wep[1] = "ump45_mp";
self.wep[2] = "usp_mp";
self.wep[3] = "tavor_mp";
self.wep[4] = "tmp_mp";
self.wep[5] = "rpg_mp";
in the thread itself??
Well no shit sherlock.
Donate:
BTC: 1GEny3y5tsYfw8E8A45upK6PKVAEcUDNv9
Handy Tools/Hacks:
Extreme Injector v3.7.3
A powerful and advanced injector in a simple GUI.
Can scramble DLLs on injection making them harder to detect and even make detected hacks work again!
Minion Since: 13th January 2011
Moderator Since: 6th May 2011
Global Moderator Since: 29th April 2012
Super User/Unknown Since: 23rd July 2013
'Game Hacking' Team Since: 30th July 2013
--My Art--
[Roxas - Pixel Art, WIP]
[Natsu - Drawn]
[Natsu - Coloured]
All drawings are coloured using Photoshop.
--Gifts--
[Kyle]
Takes a year for me to understand this^^ But nice turorial.
/moved to tutorials section