Thread: Adding Items To Bank!

Results 1 to 6 of 6
  1. #1 Adding Items To Bank! 
    Banned

    Join Date
    Nov 2009
    Posts
    1,800
    Thanks given
    7
    Thanks received
    18
    Rep Power
    0
    When players login to my server I want to add items to their bank ready made, instead of their inventory.

    Would anyone know how I would go about doing this?
    Reply With Quote  
     

  2. #2  
    Registered Member copycopy's Avatar
    Join Date
    Aug 2006
    Posts
    185
    Thanks given
    17
    Thanks received
    3
    Rep Power
    14
    instead of addItem("id,amount");
    i think it is addBank("id,amount");

    you would have to mess around with "addBank" and find the right way but it might work tank or rep me if i helpt

    to add this find your starter "if(starter == 0){"

    add it somwhere in their
    Quote Originally Posted by Liam View Post
    We have like 20 staff members, and lots of them are pretty worthless. what the **** is the point of a SB mod?
    agreed there... well kinda
    Reply With Quote  
     

  3. #3  
    Respected Member


    kLeptO's Avatar
    Join Date
    Dec 2006
    Age
    28
    Posts
    2,955
    Thanks given
    1,183
    Thanks received
    754
    Rep Power
    3084
    Usually there is no addBank method.
    You should follow this code:
    Code:
    bankItems[slot] = itemId;
    bankItemsN[slot] = itemAmount;
    Change slot to free bank's slot, itemId with item's id and same with amount.
    If you want to find free bank's slot, use this:
    Code:
    int slot = 0;
    for(int i = 0; i < playerBankSize; i++) {
        if(bankItems[i] < 1) {
            slot = i;
        }
    }
    Reply With Quote  
     

  4. Thankful users:


  5. #4  
    Registered Member copycopy's Avatar
    Join Date
    Aug 2006
    Posts
    185
    Thanks given
    17
    Thanks received
    3
    Rep Power
    14
    way to keep it but i added a method back 2 years ago to add to bank because my starter gives you some in inventory and some in bank being the food.
    Quote Originally Posted by Liam View Post
    We have like 20 staff members, and lots of them are pretty worthless. what the **** is the point of a SB mod?
    agreed there... well kinda
    Reply With Quote  
     

  6. #5  
    Banned

    Join Date
    Nov 2009
    Posts
    1,800
    Thanks given
    7
    Thanks received
    18
    Rep Power
    0
    Quote Originally Posted by »kLeptŘ« View Post
    Usually there is no addBank method.
    You should follow this code:
    Code:
    bankItems[slot] = itemId;
    bankItemsN[slot] = itemAmount;
    Change slot to free bank's slot, itemId with item's id and same with amount.
    If you want to find free bank's slot, use this:
    Code:
    int slot = 0;
    for(int i = 0; i < playerBankSize; i++) {
        if(bankItems[i] < 1) {
            slot = i;
        }
    }
    Thanks mate legend
    Reply With Quote  
     

  7. #6  
    Respected Member


    kLeptO's Avatar
    Join Date
    Dec 2006
    Age
    28
    Posts
    2,955
    Thanks given
    1,183
    Thanks received
    754
    Rep Power
    3084
    Quote Originally Posted by demise View Post
    Thanks mate legend
    You're welcome.
    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

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •