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

How To Make finish game reward ?

Comments in 'Plugin Development' started by TutoGamerWalid, Dec 15, 2015.

  1. TutoGamerWalid
    Offline

    TutoGamerWalid Active Member

    Joined:
    Jun 11, 2015
    Posts:
    69
    Minecraft User:
    TutoGamerWalid
    I would like for my plugin like when the player has to kill everyone he earns money he makes is teleported to spawn code ?
    Last edited: Dec 15, 2015
  2. MineBuilderFR
    Offline

    MineBuilderFR Active Member

    Joined:
    Mar 14, 2015
    Posts:
    56
    Minecraft User:
    MineBuilderFR
    Use searching bar :
    -How to teleport player.
    - GetPlayers in world .

    This is not complicated..
    give you the full codes will not serve you learn pocketmine
    Last edited: Dec 15, 2015
  3. TutoGamerWalid
    Offline

    TutoGamerWalid Active Member

    Joined:
    Jun 11, 2015
    Posts:
    69
    Minecraft User:
    TutoGamerWalid
    I know For teleport easy looks x')
    PHP:
    $this->getServer()->getPlayer()->teleport(new Vector3($this->cfg->get("player_enter_x"), $this->plugin->cfg->get("player_enter_y"), $this->plugin->cfg->get("player_enter_z")));
  4. TutoGamerWalid
    Offline

    TutoGamerWalid Active Member

    Joined:
    Jun 11, 2015
    Posts:
    69
    Minecraft User:
    TutoGamerWalid
    I want the hard share 20 minutes the player who kills everyone it makes money is returned to spawn
  5. TutoGamerWalid
    Offline

    TutoGamerWalid Active Member

    Joined:
    Jun 11, 2015
    Posts:
    69
    Minecraft User:
    TutoGamerWalid
    I request the code because I had a concern I have is the code to request to have a crash on my server
    *facepalm*
  6. Nawaf_Craft1b
    Offline

    Nawaf_Craft1b Active Member Plugin Developer

    Joined:
    May 8, 2015
    Posts:
    232
    Plugins:
    1
    Minecraft User:
    Nawaf_Craft1b
    PHP:
    $p->teleport($this->getServer()->getDefaultLevel()->getSafeSpawn());
    if you want code tp in spawn ?
    $p->teleport($this->getServer()->getDefaultLevel()->getSafeSpawn());
  7. TutoGamerWalid
    Offline

    TutoGamerWalid Active Member

    Joined:
    Jun 11, 2015
    Posts:
    69
    Minecraft User:
    TutoGamerWalid
    Thank
  8. AndrewBit
    Offline

    AndrewBit Notable Member

    Joined:
    Jun 18, 2015
    Posts:
    435
    Minecraft User:
    AndrewBit4
    PHP:
    #teleport
    $this->getServer()->getPlayer()->teleport(new Vector3(x,y,z));
    #get players
    $this->getServer()->getLevelByName("name")->getPlayers();
    If you give us more info, we'll help you as well :)
  9. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    WTF
    [​IMG]
    Why would you even expect to do $this->getServer()->getPlayer() directly with no arguments? And if you are teleporting the player after he killed someone, why would you even try to search the player using his name? And nobody mentioned about money?
    Vaivez66 and minebuilder0110 like this.

Share This Page

Advertisement