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
Display All
Source Code: generalfunctions.php
- function CheckNoobProtec($OwnerPlayer, $TargetPlayer, $Player)
- {
- $config = Config::get();
- if(
- $config->noobprotection == 0
- || $config->noobprotectiontime == 0
- || $config->noobprotectionmulti == 0
- || $Player['banaday'] > TIMESTAMP
- || $Player['onlinetime'] < TIMESTAMP - INACTIVE
- ) {
- return array('NoobPlayer' => false, 'StrongPlayer' => false);
- }
- return array(
- 'NoobPlayer' => (
- /* WAHR:
- Wenn Spieler mehr als 25000 Punkte hat UND
- Wenn ZielSpieler weniger als 80% der Punkte des Spieler hat.
- ODER weniger als 5.000 hat.
- */
- // Addional Comment: Letzteres ist eigentlich sinnfrei, bitte testen.a
- ($TargetPlayer['total_points'] <= $config->noobprotectiontime) && // Default: 25.000
- ($OwnerPlayer['total_points'] > $TargetPlayer['total_points'] * $config->noobprotectionmulti)
- ),
- 'StrongPlayer' => (
- /* WAHR:
- Wenn Spieler weniger als 5000 Punkte hat UND
- Mehr als das funfache der eigende Punkte hat
- */
- ($OwnerPlayer['total_points'] < $config->noobprotectiontime) && // Default: 5.000
- ($OwnerPlayer['total_points'] * $config->noobprotectionmulti < $TargetPlayer['total_points'])
- ),
- );
- }
The post was edited 1 time, last by kolopik ().