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

Solved How to get kill & death

Discussion in 'Development' started by KittyDev, Oct 19, 2017.

  1. KittyDev

    KittyDev Slime

    Messages:
    96
    GitHub:
    FreakingDev
    I want to get the kill and death of a player from KillRate plugin

    PHP:
    $kr$this->getServer()->getPluginManager()->getPlugin("KillRate");
    $score $kr->getScore($player);
    $kill = ?
    $death = ?
     

    Attached Files:

    OnTheVerge likes this.
  2. QuiverlyRivalry

    QuiverlyRivalry Zombie Pigman

    Messages:
    491
    GitHub:
    quiverlyrivalry
    lmao all these cool plugins make meh jelous
     
  3. Kyd

    Kyd Zombie Pigman

    Messages:
    678
    GitHub:
    boi1216
    Try this: (Edited)
    PHP:
    $kr$this->getServer()->getPluginManager()->getPlugin("KillRate");
    $score $kr->dbm->getScores($player);
    foreach(
    $score as $scores){
    $kill $scores['kills'];
    $death $scores['deaths'];
    }
     
    Last edited: Oct 19, 2017
    OnTheVerge likes this.
  4. KittyDev

    KittyDev Slime

    Messages:
    96
    GitHub:
    FreakingDev
    I got this error XD
    Could not pass event 'pocketmine\event\server\DataPacketReceiveEvent' to 'FormAPI v1.0.0': Cannot access protected property aliuly\killrate\Main::$dbm on jojoe77777\FormAPI\FormAPI 2017-10-19 [20:08:57] [Server thread/CRITICAL]: Error: "Cannot access protected property aliuly\killrate\Main::$dbm" (EXCEPTION) in "myzip://PHCUI.zip#PHCUI/src/PHCUI/Main" at line 110
     
  5. jasonwynn10

    jasonwynn10 Moderator Poggit Reviewer

    Messages:
    1,489
    GitHub:
    jasonwynn10
    If you read the error, you should know how to fix it
     
  6. QuiverlyRivalry

    QuiverlyRivalry Zombie Pigman

    Messages:
    491
    GitHub:
    quiverlyrivalry
    im noob at codiny first time excuse if i am wrong do u make it instead of private, public?
     
  7. jasonwynn10

    jasonwynn10 Moderator Poggit Reviewer

    Messages:
    1,489
    GitHub:
    jasonwynn10
    Exactly correct ;)
     
  8. QuiverlyRivalry

    QuiverlyRivalry Zombie Pigman

    Messages:
    491
    GitHub:
    quiverlyrivalry
    yey
     
  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.