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

Solved Scatter

Discussion in 'Development' started by _XHazardX_, Oct 7, 2017.

  1. _XHazardX_

    _XHazardX_ Spider Jockey

    Messages:
    33
    GitHub:
    XHazardX420
    Hello I was looking for some help I want to make a thing where when I execute /uhc start it tps everyone to a random location (1000x1000) in default world "world" and they cant take fall dmg for 20 secs when I execute that cmd.
     
  2. Thunder33345

    Thunder33345 Moderator Staff Member

    Messages:
    2,137
    GitHub:
    Thunder33345
    this is development section not plugin request
    please show some previous attempt
     
  3. _XHazardX_

    _XHazardX_ Spider Jockey

    Messages:
    33
    GitHub:
    XHazardX420
    O yea sorry about that
     
  4. Daniel23

    Daniel23 Witch

    Messages:
    65
    GitHub:
    daniel23
    Like this?
    Code:
            $x = mt_rand(-500, 1000);
        $y = mt_rand(70, 120);
        $z = mt_rand(-500, 1000);
    $player->teleport(new Vector3 ($x, $y, $z));
     
  5. _XHazardX_

    _XHazardX_ Spider Jockey

    Messages:
    33
    GitHub:
    XHazardX420
    ye thanks
     
  6. Thunder33345

    Thunder33345 Moderator Staff Member

    Messages:
    2,137
    GitHub:
    Thunder33345
    BUT you also need to check if it's near another player
     
  7. _XHazardX_

    _XHazardX_ Spider Jockey

    Messages:
    33
    GitHub:
    XHazardX420
    Ye but we turn off pvp for about 10 mins.
     
  8. Levi

    Levi Skeleton

    Messages:
    955
    GitHub:
    captainleviftw
    pretty sure you'll have to use task for that
     
  9. _XHazardX_

    _XHazardX_ Spider Jockey

    Messages:
    33
    GitHub:
    XHazardX420
    Not looking for
    Is it possible to make it so they only spawn 100 blocks up?
     
  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.