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

Get number (1 to 100)

Comments in 'Plugin Development' started by MineBuilderFR, Dec 6, 2015.

  1. MineBuilderFR
    Offline

    MineBuilderFR Active Member

    Joined:
    Mar 14, 2015
    Posts:
    56
    Minecraft User:
    MineBuilderFR
    Hi ,
    How i can get number (1 to => 100) , i have search in Php.net , no resulat :/

    $e = count(1 to 100 number);
    Exemple : if($event->getPlayer()->getName() == "$e23lola") {
    Etc..
  2. CraftYourBukkit
    Offline

    CraftYourBukkit Notable Member Plugin Developer

    Joined:
    Jan 20, 2015
    Posts:
    1,022
    Plugins:
    2
    Minecraft User:
    CraftYourBukkit
    PHP:
    for($i 1$i <= 100$i++){
    // Do something
    }
    xBeastMode and MineBuilderFR like this.
  3. MineBuilderFR
    Offline

    MineBuilderFR Active Member

    Joined:
    Mar 14, 2015
    Posts:
    56
    Minecraft User:
    MineBuilderFR
  4. Hotshot_9930
    Offline

    Hotshot_9930 Notable Member Plugin Developer

    Joined:
    May 26, 2014
    Posts:
    665
    Plugins:
    2
    Minecraft User:
    HotshotHD
  5. Primus
    Offline

    Primus Notable Member

    Joined:
    Apr 7, 2015
    Posts:
    1,470
    Minecraft User:
    PrimusLV
    Am i the only one who did not understood it?
  6. xBeastMode
    Offline

    xBeastMode Active Member

    Joined:
    Nov 27, 2015
    Posts:
    292
    CraftYourBukkit likes this.
  7. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    If this is what you are looking for, this is extremely ineffective. Consider using RegExp:
    PHP:
    if(preg_match('/^([0-9]{1,2}|(100))/'$event->getPlayer()->getName())){}

Share This Page

Advertisement