Results 1 to 12 of 12
  1. #1
    Jorndel's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    Norway
    Posts
    8,676
    Reputation
    905
    Thanks
    19,113
    My Mood
    Angelic

    How to make Arrays (Sorry if wrong)

    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:
    self.wep = []
    Okey, that is the first line in our thread.
    Then we gone add "sub arrays" that we will add our things to.
    List:
    self.wep[0] = "ak47_mp";
    Whats in read is just so you see what the difference here and the "main array" is.
    then we make a long list of weps. ( or short )
    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 I have a list of 6 Arrays. (Yes the 0 counts as 1 too)

    Now we want to add it to a function/task.
    Then I make a Press action thread to just see that this works:
    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]);
    }
    }
    As you see, I have marked more text.
    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)

     
    Contributor 01.27.2012 - N/A
    Donator 07-17-2012 - Current
    Editor/Manager 12-16-12 - N/A
    Minion 01-10-2013 - 07.17.13
    Former Staff 09-20-2012 - 01-10-2013 / 07-17-2013 - Current
    Cocksucker 20-04-2013 - N/A

  2. #2
    Nachos's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Location
    Between Equator and The North Pole
    Posts
    2,984
    Reputation
    176
    Thanks
    919
    My Mood
    Blah
    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

  3. #3
    Jorndel's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    Norway
    Posts
    8,676
    Reputation
    905
    Thanks
    19,113
    My Mood
    Angelic
    Quote Originally Posted by Nachos View Post
    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...
    haha, well...

    They use arrays too, just not so many

     
    Contributor 01.27.2012 - N/A
    Donator 07-17-2012 - Current
    Editor/Manager 12-16-12 - N/A
    Minion 01-10-2013 - 07.17.13
    Former Staff 09-20-2012 - 01-10-2013 / 07-17-2013 - Current
    Cocksucker 20-04-2013 - N/A

  4. #4
    master131's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    Melbourne, Australia
    Posts
    8,858
    Reputation
    3438
    Thanks
    101,669
    My Mood
    Breezy
    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.

    Code:
    someArray = [];
    someArray[0] = "Hello!";
    self iPrintLnBold(someArray.size); //This will display 1 on the screen because the 0 still counts!
    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[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]

  5. #5
    pyrozombie's Avatar
    Join Date
    Feb 2011
    Gender
    male
    Location
    holland
    Posts
    351
    Reputation
    12
    Thanks
    62
    My Mood
    Cool
    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??

  6. #6
    master131's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    Melbourne, Australia
    Posts
    8,858
    Reputation
    3438
    Thanks
    101,669
    My Mood
    Breezy
    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]

  7. #7
    TechnoX's Avatar
    Join Date
    Jun 2011
    Gender
    male
    Location
    Logitech G510.
    Posts
    154
    Reputation
    11
    Thanks
    3
    My Mood
    Yeehaw
    Takes a year for me to understand this^^ But nice turorial.

  8. #8
    Jorndel's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    Norway
    Posts
    8,676
    Reputation
    905
    Thanks
    19,113
    My Mood
    Angelic
    Quote Originally Posted by TechnoX View Post
    Takes a year for me to understand this^^ But nice turorial.
    If you need help to understand.
    PM me and I can talk to you over:
    Skype, MSN, Steam or TeamViewer

     
    Contributor 01.27.2012 - N/A
    Donator 07-17-2012 - Current
    Editor/Manager 12-16-12 - N/A
    Minion 01-10-2013 - 07.17.13
    Former Staff 09-20-2012 - 01-10-2013 / 07-17-2013 - Current
    Cocksucker 20-04-2013 - N/A

  9. #9
    jorricks3's Avatar
    Join Date
    Jan 2010
    Gender
    male
    Location
    The netherlands, limburg
    Posts
    199
    Reputation
    10
    Thanks
    49
    My Mood
    Drunk
    didn't know it had so much to do with php






  10. #10
    Jorndel's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    Norway
    Posts
    8,676
    Reputation
    905
    Thanks
    19,113
    My Mood
    Angelic
    Quote Originally Posted by jorricks3 View Post
    didn't know it had so much to do with php
    Most programming languages have arrays.....

     
    Contributor 01.27.2012 - N/A
    Donator 07-17-2012 - Current
    Editor/Manager 12-16-12 - N/A
    Minion 01-10-2013 - 07.17.13
    Former Staff 09-20-2012 - 01-10-2013 / 07-17-2013 - Current
    Cocksucker 20-04-2013 - N/A

  11. #11
    Jorndel's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    Norway
    Posts
    8,676
    Reputation
    905
    Thanks
    19,113
    My Mood
    Angelic
    @Moto
    /Move to tutorials (My bad sorry)

     
    Contributor 01.27.2012 - N/A
    Donator 07-17-2012 - Current
    Editor/Manager 12-16-12 - N/A
    Minion 01-10-2013 - 07.17.13
    Former Staff 09-20-2012 - 01-10-2013 / 07-17-2013 - Current
    Cocksucker 20-04-2013 - N/A

  12. #12
    Moto's Avatar
    Join Date
    Dec 2008
    Gender
    male
    Location
    Bay Area, CA
    Posts
    13,055
    Reputation
    707
    Thanks
    14,558
    My Mood
    Blah
    /moved to tutorials section



Tags for this Thread