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

Hunger Games Death Match

Comments in 'Plugin Development' started by JassperBeastHD, Nov 18, 2013.

  1. JassperBeastHD
    Offline

    JassperBeastHD Banned

    Joined:
    Aug 27, 2013
    Posts:
    436
    Minecraft User:
    JassperBeastHD
    Does this work look for "change code"
    PHP:
    $message"";
                foreach (
    $this->players as $user => $player) {
                    
    $message .= $user." ";
                }
                
    $this->broadcast(" ");
                
    $this->broadcast(FORMAT_YELLOW."================================================");
                
    $this->broadcast(" ");
                
    $this->broadcast(FORMAT_YELLOW."[Crafted SG] This game is going to Death Match!");
                
    $this->broadcast(FORMAT_YELLOW."[Crafted SG] Survivors:");
                
    $this->broadcast(FORMAT_YELLOW.$message);
                
    $this->broadcast(" ");
                
    $this->broadcast(FORMAT_YELLOW."================================================");
            }
            
    $this->schedule(4"broadcast""[Crafted SG] All players will be in  death match!.");
            
    $this->schedule(10"gameReady"$this->field["stage"]);
            
    $this->record($winner$this->score);
            
    $players $this->api->player->getAll();
            if (
    count($players) == 0)    return;
            foreach (
    $players as $player) {
                
    $this->console->run("tp $player 131 42 132");  <-----change code
            
    }
        }

        public function 
    gameSuspend() {
            
    $this->status "finish";
            
    $this->schedule(10"gameReady", array());

        }
  2. Falk
    Offline

    Falk Staff Member Global Moderator

    Joined:
    Sep 2, 2013
    Posts:
    1,710
    Plugins:
    22
    Minecraft User:
    Falkirknh
    I thought that colour only worked in the console. And I don't believe that will work, try changing it to $player->teleport(new Vector3(131, 42, 132));
  3. Falk
    Offline

    Falk Staff Member Global Moderator

    Joined:
    Sep 2, 2013
    Posts:
    1,710
    Plugins:
    22
    Minecraft User:
    Falkirknh
    I am not sure if getAll() gives the player objects though, you may have to add $player = $this->api->player->get($player); right before the teleport, if this is the case
  4. 99leonchang
    Offline

    99leonchang Staff Member Sectional Moderator

    Joined:
    Aug 23, 2013
    Posts:
    165
    Plugins:
    2
    Minecraft User:
    99leonchang
    I think it gets the player objects, but im not all that sure
  5. JassperBeastHD
    Offline

    JassperBeastHD Banned

    Joined:
    Aug 27, 2013
    Posts:
    436
    Minecraft User:
    JassperBeastHD
    I want it to teleport all player(remaining player) to the coordinate
  6. JassperBeastHD
    Offline

    JassperBeastHD Banned

    Joined:
    Aug 27, 2013
    Posts:
    436
    Minecraft User:
    JassperBeastHD
    How do you get all player then?
  7. Syriamanal
    Offline

    Syriamanal Ban Evader Banned

    Joined:
    Oct 2, 2013
    Posts:
    221
    Minecraft User:
    Syriamanal
    PHP:
    $this->console->run("tp @all $player 131 42 132");  <-----change code
    Like this
  8. JassperBeastHD
    Offline

    JassperBeastHD Banned

    Joined:
    Aug 27, 2013
    Posts:
    436
    Minecraft User:
    JassperBeastHD
    What_?

Share This Page

Advertisement