1. The forums will be archived and moved to a read only mode in about 2 weeks (mid march).

item count...

Discussion in 'Plugin Help' started by Alex, Oct 24, 2017.

  1. Alex

    Alex Spider Jockey

    Messages:
    28
    GitHub:
    Bichwha
    public function confirmBuy($sender){

    $money = EconomyAPI::getInstance()->myMoney($sender);

    if($money > $this->paymentPrice){
    EconomyAPI::getInstance()->reduceMoney($sender->getName(), $this->paymentPrice, true);
    $sender->getInventory()->addItem(Item::get($this->itemId, $this->itemMeta, $this->itemCount, 1));
    $sender->sendMessage("You have bought " . $this->itemName);

    So my question is how do i give someone in their inventory an item with count beucase everytime i click on a simple form button it only gives me 1 item i need answer quick please
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.