Noob protection not working

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • Noob protection not working

      Hello, I have a problem with noobprotection. I set the noobprotection for 100 points. Unfortunately, it does not work. You can attack players who have 1 point. Do you know the solution to the problem? I am using 2moons version 1.8. Error log is clean








      Source Code: generalfunctions.php

      1. function CheckNoobProtec($OwnerPlayer, $TargetPlayer, $Player)
      2. {
      3. $config = Config::get();
      4. if(
      5. $config->noobprotection == 0
      6. || $config->noobprotectiontime == 0
      7. || $config->noobprotectionmulti == 0
      8. || $Player['banaday'] > TIMESTAMP
      9. || $Player['onlinetime'] < TIMESTAMP - INACTIVE
      10. ) {
      11. return array('NoobPlayer' => false, 'StrongPlayer' => false);
      12. }
      13. return array(
      14. 'NoobPlayer' => (
      15. /* WAHR:
      16. Wenn Spieler mehr als 25000 Punkte hat UND
      17. Wenn ZielSpieler weniger als 80% der Punkte des Spieler hat.
      18. ODER weniger als 5.000 hat.
      19. */
      20. // Addional Comment: Letzteres ist eigentlich sinnfrei, bitte testen.a
      21. ($TargetPlayer['total_points'] <= $config->noobprotectiontime) && // Default: 25.000
      22. ($OwnerPlayer['total_points'] > $TargetPlayer['total_points'] * $config->noobprotectionmulti)
      23. ),
      24. 'StrongPlayer' => (
      25. /* WAHR:
      26. Wenn Spieler weniger als 5000 Punkte hat UND
      27. Mehr als das funfache der eigende Punkte hat
      28. */
      29. ($OwnerPlayer['total_points'] < $config->noobprotectiontime) && // Default: 5.000
      30. ($OwnerPlayer['total_points'] * $config->noobprotectionmulti < $TargetPlayer['total_points'])
      31. ),
      32. );
      33. }
      Display All

      The post was edited 1 time, last by kolopik ().

    • My errors:

      [09-Dec-2018 13:36:50 Europe/Warsaw] PHP Warning: require(/usr/home/xxx/domains/domain.net/public_html/includes/GeneralFunctions.php): failed to open stream: No such file or directory in /usr/home/xxx/domains/domain.net/public_html/includes/common.php on line 47
      [09-Dec-2018 13:36:50 Europe/Warsaw] PHP Fatal error: Class 'Config' not found in /usr/home/xxx/domains/domain.net/public_html/includes/GeneralFunctions.php on line 489
      [09-Dec-2018 13:37:31 Europe/Warsaw] PHP Fatal error: Cannot redeclare class FlyingFleetHandler in /usr/home/xxx/domains/domain.net/public_html/includes/classes/class.FlyingFleetHandler.php on line 18

      The post was edited 1 time, last by kolopik ().

    • Qwa wrote:

      have you deleted common.php file?

      no he did removed this file

      /usr/home/kacperinjo/domains/domain.net/public_html/includes/GeneralFunctions.php