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

Player join equip armor code

Comments in 'Plugin Development' started by BeastBajan15, Feb 17, 2014.

  1. BeastBajan15
    Offline

    BeastBajan15 Active Member

    Joined:
    Feb 16, 2014
    Posts:
    41
    Minecraft User:
    ZexyZek
    Can any of you guys know a code when a player(new) has wearing armor already.
    Without using;
    Code:
    $this->api->console->run("give (id) (player));
    Sorry for bad english, Im swedish.[/B]
  2. iksaku
    Offline

    iksaku Notable Member Plugin Developer

    Joined:
    Sep 2, 2013
    Posts:
    1,130
    Plugins:
    4
    Minecraft User:
    iksaku
    I don't know if PocketMine is able to detect if a player is new on the server or not :/
  3. BeastBajan15
    Offline

    BeastBajan15 Active Member

    Joined:
    Feb 16, 2014
    Posts:
    41
    Minecraft User:
    ZexyZek
    No when they join for the first time or when they just join
  4. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    You can create a file for each player in the plugin directory, and if the player is new, the file won't exist.
    Look at how SimpleAuth detects the player's registered/not status.
  5. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Even you don't understand SimpleAuth, you can look at its method of saving files.
  6. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    And look at InfoEssentials for how to equip armor.
    BeastBajan15 likes this.
  7. I_Is_Payton_
    Offline

    I_Is_Payton_ Active Member Plugin Developer

    Joined:
    Jan 18, 2014
    Posts:
    76
    Plugins:
    1
    Minecraft User:
    I_Is_Payton_
    PHP:
    $player $packet->username;
    if (
    file_exists(/players/$player)) {
    //Your code...
    }
  8. BeastBajan15
    Offline

    BeastBajan15 Active Member

    Joined:
    Feb 16, 2014
    Posts:
    41
    Minecraft User:
    ZexyZek
    no i got it.





    Staff please lock this. its solve =)

Share This Page

Advertisement