Thread: Adding Crossbow PI

Results 1 to 4 of 4
  1. #1 Adding Crossbow PI 
    Registered Member
    Join Date
    Jun 2012
    Posts
    223
    Thanks given
    61
    Thanks received
    17
    Rep Power
    25
    Trying to add arma crossbow.. All I did was basically search 9185 throughout my files and copy + pasted (then changed ID) to arma cbow ID

    However idk how to make it so

    Code:
    				c.usingCross = c.playerEquipment[c.playerWeapon] == 9185;
    is multiple IDs. Any ideas cause putting commas and shit don't work.
    Reply With Quote  
     

  2. #2  
    Member of the Imagine Cult

    Join Date
    Feb 2013
    Posts
    519
    Thanks given
    21
    Thanks received
    7
    Rep Power
    59
    Add this variable in the file outside of methods:

    Code:
    public int[] isCrossbow = {9185, 0000, 0000, 0000, 0000};
    Now change your code to this:

    Code:
    for (int i = 0; i < isCrossbow.length; i++)
    c.usingCross = c.playerEquipment[c.playerWeapon] == isCrossbow[i];
    Reply With Quote  
     

  3. #3  
    anInt69

    Max _'s Avatar
    Join Date
    Feb 2012
    Age
    26
    Posts
    1,801
    Thanks given
    426
    Thanks received
    727
    Rep Power
    599
    Whats posted above, is efficient but for future knowledge if you're only differing between two variables:

    || = or
    && = and

    Code:
    c.usingCross = c.playerEquipment[c.playerWeapon] == 9185 || c.playerEquipment[c.playerWeapon] == armaCbowId;
    Reply With Quote  
     

  4. #4  
    Member of the Imagine Cult

    Join Date
    Feb 2013
    Posts
    519
    Thanks given
    21
    Thanks received
    7
    Rep Power
    59
    Quote Originally Posted by MaxiiPad View Post
    Whats posted above, is efficient but for future knowledge if you're only differing between two variables:

    || = or
    && = and

    Code:
    c.usingCross = c.playerEquipment[c.playerWeapon] == 9185 || c.playerEquipment[c.playerWeapon] == armaCbowId;
    Yes ^ he is right If you are only going to define two crossbows, its better to do it his way since it doesn't waste time and space. But if you plan to add more than 1 crossbow, I'd suggest using my way because then it will start to get messy.

    However you do it, let me know if it works
    Reply With Quote  
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. Adding teleports [pi]
    By Mickt3 in forum Help
    Replies: 12
    Last Post: 04-24-2011, 02:49 AM
  2. [PI] Adding Crossbows
    By Etnies in forum Help
    Replies: 2
    Last Post: 11-13-2010, 10:46 PM
  3. [pi]Adding Morrigans [/pi]
    By Echo_ in forum Help
    Replies: 2
    Last Post: 09-26-2010, 12:14 AM
  4. [PI] Need Help Adding Modles [PI]
    By Plx0range0 in forum Help
    Replies: 15
    Last Post: 09-09-2010, 04:45 PM
  5. [New Era] Adding training [Pi Based]
    By Juggalo Family in forum Requests
    Replies: 3
    Last Post: 08-15-2010, 03:07 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •