Thread: [PI] Only Money In Inventory?

Results 1 to 4 of 4
  1. #1 [PI] Only Money In Inventory? 
    Website Designer
    TheXenon's Avatar
    Join Date
    Sep 2013
    Posts
    121
    Thanks given
    10
    Thanks received
    23
    Rep Power
    48
    Hello, Rune-Server Helpers ! This is my first time posting in the help section c:
    It is a small probably simple problem but I have never tried this so idk how .

    I need to make a portal teleport you only if you have Money in your inventory.
    Only 1 item in inventory and that is money. Thanks in advance
    Reply With Quote  
     

  2. #2  
    -Founder Off Returnofpk-


    Join Date
    Oct 2012
    Age
    28
    Posts
    655
    Thanks given
    97
    Thanks received
    211
    Rep Power
    303
    Quote Originally Posted by TheXenon View Post
    Hello, Rune-Server Helpers ! This is my first time posting in the help section c:
    It is a small probably simple problem but I have never tried this so idk how .

    I need to make a portal teleport you only if you have Money in your inventory.
    Only 1 item in inventory and that is money. Thanks in advance
    Code:
    case Id:
                if(c.getItems().playerHasItem(995,1)) {
                c.getPA().startTeleport(2905, 9730, 0, "modern");
                } else
                c.sendMessage("you need cash to use this portal");
                break;
    if you use please click thanks
    Attached image
    Reply With Quote  
     

  3. #3  
    Website Designer
    TheXenon's Avatar
    Join Date
    Sep 2013
    Posts
    121
    Thanks given
    10
    Thanks received
    23
    Rep Power
    48
    Quote Originally Posted by sheepmonger View Post
    Code:
    case Id:
                if(c.getItems().playerHasItem(995,1)) {
                c.getPA().startTeleport(2905, 9730, 0, "modern");
                } else
                c.sendMessage("you need cash to use this portal");
                break;
    if you use please click thanks
    How can I make it so you can have ONLY money in your inventory, not any other items?
    Reply With Quote  
     

  4. #4  
    -Founder Off Returnofpk-


    Join Date
    Oct 2012
    Age
    28
    Posts
    655
    Thanks given
    97
    Thanks received
    211
    Rep Power
    303
    Quote Originally Posted by TheXenon View Post
    How can I make it so you can have ONLY money in your inventory, not any other items?
    Code:
    if((getItems().freeSlots() == 27 && playerEquipment[playerHat] == -1) && (playerEquipment[playerCape] == -1) && (playerEquipment[playerAmulet] == -1) && (playerEquipment[playerChest] == -1) && (playerEquipment[playerShield] == -1) && (playerEquipment[playerLegs] == -1) && (playerEquipment[playerHands] == -1) && (playerEquipment[playerFeet] == -1) && (playerEquipment[playerWeapon] == -1)) {
    Attached image
    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. Replies: 8
    Last Post: 09-01-2013, 02:40 AM
  2. Replies: 2
    Last Post: 08-01-2013, 02:25 AM
  3. [PI] Items moving in inventory
    By ruupe in forum Help
    Replies: 3
    Last Post: 11-25-2012, 09:43 PM
  4. Only item in Inventory method [PI]
    By relex lawl in forum Snippets
    Replies: 14
    Last Post: 09-18-2011, 06:09 AM
  5. Replies: 10
    Last Post: 03-02-2011, 08:06 AM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •