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

How can I make a explosion sound to certain players?

Comments in 'Plugin Development' started by Legomite, Oct 13, 2013.

  1. Legomite
    Offline

    Legomite Active Member Plugin Developer

    Joined:
    Sep 8, 2013
    Posts:
    470
    Plugins:
    2
    Minecraft User:
    Legomite
    Hey guys ever since I discovered you can play the explosion sound how do you play the sound to a certain player?
  2. wies
    Offline

    wies Notable Member

    Joined:
    Aug 23, 2013
    Posts:
    390
    PHP:
    $player->dataPacket(MC_EXPLOSION, array(
               
    "x" => $x,
               
    "y" => $y,
               
    "z" => $z,
               
    "radius" => $size,
               
    "records" => array()
    ));
  3. Legomite
    Offline

    Legomite Active Member Plugin Developer

    Joined:
    Sep 8, 2013
    Posts:
    470
    Plugins:
    2
    Minecraft User:
    Legomite
    So like this?

    Case "explode":
    $player->dataPacket(MC_EXPLOSION, array(
    "x" => $x,
    "y" => $y,
    "z" => $z,
    "radius" => $size,
    "records" => array()
    ));
  4. VanishedKevin
    Offline

    VanishedKevin Banned

    Joined:
    Aug 27, 2013
    Posts:
    279
    Minecraft User:
    VanishedKevin
    Just tell him to see my plugins. :)
  5. wies
    Offline

    wies Notable Member

    Joined:
    Aug 23, 2013
    Posts:
    390
    You can see an example in his redstone plugin :p
  6. Legomite
    Offline

    Legomite Active Member Plugin Developer

    Joined:
    Sep 8, 2013
    Posts:
    470
    Plugins:
    2
    Minecraft User:
    Legomite
    Well that's what I did but got a error.
  7. wies
    Offline

    wies Notable Member

    Joined:
    Aug 23, 2013
    Posts:
    390
    Can you give the code that you used, so I can check what you did wrong?
  8. Legomite
    Offline

    Legomite Active Member Plugin Developer

    Joined:
    Sep 8, 2013
    Posts:
    470
    Plugins:
    2
    Minecraft User:
    Legomite
    what I mean is play a sound near a targeted player. I cant get the code right.
  9. Glitchmaster_PE
    Offline

    Glitchmaster_PE Notable Member Plugin Developer

    Joined:
    Aug 31, 2013
    Posts:
    834
    Plugins:
    8
    Minecraft User:
    Glitchmaster_PE
    Remember, you need to assign $x, $y, $z, and $size before you run $player->dataPacket(etc.)
  10. Legomite
    Offline

    Legomite Active Member Plugin Developer

    Joined:
    Sep 8, 2013
    Posts:
    470
    Plugins:
    2
    Minecraft User:
    Legomite
    ohh.btw how you doing on the achievements plugin?
  11. Glitchmaster_PE
    Offline

    Glitchmaster_PE Notable Member Plugin Developer

    Joined:
    Aug 31, 2013
    Posts:
    834
    Plugins:
    8
    Minecraft User:
    Glitchmaster_PE
    It's going to take some time, @wies says it is not easy to judge when a person crafts something and send an achievement to them without editing the src. I may just do the achievements for like getting wood, mining stone, etc. The other stuff is to come...
  12. Legomite
    Offline

    Legomite Active Member Plugin Developer

    Joined:
    Sep 8, 2013
    Posts:
    470
    Plugins:
    2
    Minecraft User:
    Legomite
    okay.:):):)
  13. VanishedKevin
    Offline

    VanishedKevin Banned

    Joined:
    Aug 27, 2013
    Posts:
    279
    Minecraft User:
    VanishedKevin
    You can, but it needs to change SRC code. I am good at changing SRC. :p

Share This Page

Advertisement