Advertisement
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

About Economy Api

Comments in 'Plugin Development' started by asters, Jan 25, 2016.

  1. asters
    Offline

    asters Active Member

    Joined:
    Jul 2, 2015
    Posts:
    52
    Minecraft User:
    aster
    Hi! I wanna add economy to a plugin, almost done, but i need help with something!!!
    How can i do this: "$money=jack money"
    I did in different methods but, since im newbye i dont know much and make countless mistake!!

    All i need is to get a player money in a variable!!
    And to be like this $money= jack's money output to be his money!!
    i need to put a codition if money < 1000 { function}
  2. KubixQ
    Offline

    KubixQ Active Member

    Joined:
    Sep 13, 2015
    Posts:
    85
    Minecraft User:
    KubixQ
    PHP:
    EconomyAPI::getInstance()->getMoney($player_instance_or_name$money_amount);
    PHP:
    $money EconomyAPI::getInstance()->getMoney($player_instance_or_name$money_amount);
  3. asters
    Offline

    asters Active Member

    Joined:
    Jul 2, 2015
    Posts:
    52
    Minecraft User:
    aster
    Error: Call to undefined method onebone\economyapi\EconomyAPI::getMoney()

    Can someone give me just that code? Thats all i need !!!
  4. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Remember to add EconomyAPI to your plugin's dependencies.
  5. asters
    Offline

    asters Active Member

    Joined:
    Jul 2, 2015
    Posts:
    52
    Minecraft User:
    aster
    Oh, ofcourse i did :), addmomey and takemoney work, but i cant see a player money, dont know why :(, i only need the code to see money of a player name, example $money=player jack money!!! i will check other plugins to see how they did
  6. minebuilder0110
    Offline

    minebuilder0110 Notable Member

    Joined:
    Dec 8, 2014
    Posts:
    485
    Minecraft User:
    Apparitional
    There is no such function called getMoney(). It is myMoney().
  7. asters
    Offline

    asters Active Member

    Joined:
    Jul 2, 2015
    Posts:
    52
    Minecraft User:
    aster
    Ya, mymoney, why i forgot?? =)) Thx for help, im good now :)
    Hope i finish soon!!!

Share This Page

Advertisement