1. GSManager
    1. Funktionen
    2. Unterstützte Spiele
    3. Neuigkeiten
    4. Statistiken
    5. Serverliste
  2. Lexikon
  3. Filebase
  4. Entwicklung
  5. Forum
    1. Dashboard
    2. Unerledigte Themen
  6. Web-Interface
  7. Artikel
  8. Mitglieder
    1. Letzte Aktivitäten
    2. Benutzer online
    3. Team
    4. Mitgliedersuche
  • Anmelden
  • Registrieren
  • Suche
Alles
  • Alles
  • Artikel
  • Seiten
  • Dateien
  • Forum
  • Lexikon
  • Erweiterte Suche
  1. GSManager
  2. Mitglieder
  3. Geventh

Beiträge von Geventh

Das Projekt GSManager (vormals ManuAdminMod) wurde am 01.01.2020 eingestellt - diese Internetpräsenz bleibt verfügbar, die Software wird aber nicht länger gepflegt. Vielen Dank für eure Unterstützung in den mehr als zehn vergangenen Jahren!
  • Problem mit WebStatistik

    • Geventh
    • 17. April 2011 um 19:30

    Hi,
    Die Konstanten sind nicht definiert... :)
    Geventh

  • Doppeltes Problem

    • Geventh
    • 7. April 2011 um 18:40

    Benutzt du Promod live?
    Geventh

  • Mam beendet sich nach 2 Minuten scheinbar von selbst

    • Geventh
    • 24. März 2011 um 16:14

    Am Besten löscht du alle Log-Dateien und startest den Game server neu wie auch MAM.
    Hoffe es klappt dann. 8)

    Geventh

  • Mam beendet sich nach 2 Minuten scheinbar von selbst

    • Geventh
    • 23. März 2011 um 21:52

    Hi,
    Kann es sein das zwei/mehere Server die gleiche Log-Datei benutzen? zB. games_mp1.log
    Geventh

  • MySQL-Statistik-Seite / MySQL-Stats-Page

    • Geventh
    • 18. März 2011 um 08:42

    Die Stats werden ja nur vom Root-Server gelesen und auf der Webpage dargestellt.
    Und wie jetzt: iNoob, wo werden deine Stats abgespeichert? (Gameserver / Webspace)

    Geventh

  • MySQL-Statistik-Seite / MySQL-Stats-Page

    • Geventh
    • 17. März 2011 um 07:10

    Natürlich musst du dann nicht localhost schreiben.
    Normalerweise ist es die ip.
    Dann noch die Daten aus der config.cfg Datei.

    Danke für den Vorschlag Silva202: Gute Idee :)

  • MySQL-Statistik-Seite / MySQL-Stats-Page

    • Geventh
    • 16. März 2011 um 11:59
    Zitat

    Free
    10 gigabytes of storage space included!
    Unlimited Traffic
    PHP 5 / FTP / MySQL 5
    Premium Support & large community

    Also PHP 5 sollte dabei sein...

    Jetzt lädst du alle Dateien auf dein Webspace und bearbeitest die Config.php Datei. Öffne sie mit Editor..

    PHP
    define("DB_SERVER","localhost");            									// e.g.: define("DB_SERVER","localhost"); --> Server-Ip/Domain-Name
    
    define("DB_USER","root");                   									// e.g.: define("DB_USER","root"); --> MySQL-Username 
    
    
    
    
    define("DB_PASSWORD","");          												// e.g.: define("DB_PASSWORD","abc123"); --> MySQL-Password 
    
    define("DB_NAME","mamstats");               									// e.g.: define("DB_NAME","mamstats"); --> MySQL-Database-Name 
    
    define("TBL_NICKS","mam01_nicks");          									// e.g.: define("TBL_NICKS","mam01_nicks"); --> MySQL-Table 'NICKS' 
    
    define("TBL_USER","mam01_user");                                                                             // e.g.: define("TBL_NICKS","mam01_user"); --> MySQL-Table 'USER'
    Alles anzeigen
  • MySQL-Statistik-Seite / MySQL-Stats-Page

    • Geventh
    • 16. März 2011 um 07:26

    Hi,
    Hast du ein Webspace, wo PHP läuft? (Kann auch auf dem Gameserver sein)
    Was hast du alles in der config.cfg Datei unter [statistics] und [statistics_mysql] geschrieben? (Bitte keine Passwörter ^^)
    Funktioniert !stats, gibt es irgendwelche Probleme beim starten des Mods?

    Geventh

  • only registered players?

    • Geventh
    • 13. März 2011 um 00:35

    Sorry I don't understand you....
    Where are you come from?

  • only registered players?

    • Geventh
    • 12. März 2011 um 18:01

    Hi, Try this one:

    PHP
    $mod->registerEvent("playerJoined", "registered_main");
    $mod->setDefaultCV("registered", "enabled", 1);
    $mod->setDefaultCV("registered", "kickreason", "->KICK_REASON<-"); //add KICK Reason here or make an config file
    
    
    
    
    $file = $configdir . "plugins/whitelist.lst"; // path to your file, place it in your configfolder into folder plugins
     
    $results = explode(",", file_get_contents($file));
    $whitelist = array();
    
    
    
    
    foreach($results as $result) {
     $whitelist[] = trim($result);
    }
    
    
    
    
    function registered_main($guid) {
     global $mod, $players,$whitelist;
     if($mod->getCV("registered", "enabled") == 0) {
      return;
     }
     if (!in_array($guid, $whitelist)) {
      $players[$guid]->kick($mod->getCV("registered", "kickreason"));
     }
    }
    Alles anzeigen
  • only registered players?

    • Geventh
    • 22. Februar 2011 um 20:20
    PHP
    $mod->registerEvent("playerJoined", "registered_main");
    $mod->setDefaultCV("registered", "enabled", 1);
    $mod->setDefaultCV("registered", "kickreason", "Molimo registrajte se na www.h8breed.com");
    
    
    
    
    $file = $configdir . "plugins/whitelist.lst"; // path to your file, place it in your configfolder into folder plugins
     
    $results = explode(",", file_get_contents($file));
    $whitelist = array();
    
    
    
    
    foreach($results as $result) {
     $whitelist[] = trim($result);
    }
    
    
    
    
    function registered_main($guid) {
     global $mod, $players;
     $usersreg = array("guid","guid","guid");
     if($mod->getCV("registered", "enabled") == 0) {
      return;
     }
     if (!in_array($guid, $whitelist)) {
      $players[$guid]->kick($mod->getCV("registered", "kickreason"));
     }
    }
    Alles anzeigen
  • only registered players?

    • Geventh
    • 22. Februar 2011 um 16:45

    And who add the GUIDs?
    The mod? Then how?
    You yourself?

  • !online customizable?

    • Geventh
    • 22. Februar 2011 um 16:43

    You have to restart the mod when you change/add php code!!

  • !online customizable?

    • Geventh
    • 22. Februar 2011 um 16:13

    Just replace this code:

    PHP
    public function online($guid, $parameters) {
            $admins = $this->mod->getAdmins();
            $online = array();
            $results = explode("," , $this->mod->getCV("main", "onlineshowngroups"));
           $onlineshowngroups = array();
           foreach($results as $result) {
               $onlineshowngroups[] = trim($result);
           }
    
    
    
    
            foreach ($admins as $adminguid => $admin) {
                if (array_key_exists($adminguid, $this->players) && in_array($this->players[$adminguid]->getGroup(), $onlineshowngroups)) {
                    $online[] = array(
                       "nick" => $this->players[$adminguid]->getName(),
                       "group" => $this->players[$adminguid]->getGroup()
                    );
                }
            }
            $str = $this->mod->getLngString("onlineadmins") . " ";
            if (count($online) > 0) {
                foreach ($online as $admin) {
                    $str .= "^2" . $admin["nick"] . " ^1(" . $this->mod->getLongGroupName($admin["group"]) . ")^7, ";
                }
                $str = substr($str, 0, -4);
            }
            else {
                $str .= $this->mod->getLngString("onlineAdminsNone");
            }
            $this->players[$guid]->say($str);
        }
    Alles anzeigen
  • only registered players?

    • Geventh
    • 22. Februar 2011 um 15:55

    Hi,
    What do you exactly want to log?

    Geveth

  • Timed events

    • Geventh
    • 22. Februar 2011 um 12:49
    PHP
    //Don't forget the '$' sign for variables...
         $Difference = $CurrentTime - $JoinTime;
        // and you have to define $playerleft, work with array() and with another function for quited players...
  • only registered players?

    • Geventh
    • 22. Februar 2011 um 12:12

    Hi,
    Cleaned version:

    PHP
    $mod->registerEvent("playerJoined", "registered_main");
    $mod->setDefaultCV("registered", "enabled", 1);
    $mod->setDefaultCV("registered", "kickreason", "Molimo registrajte se na www.h8breed.com");
    
    
    
    
    function registered_main($guid) {
     global $mod, $players;
     $usersreg = array("guid","guid","guid");
     if($mod->getCV("registered", "enabled") == 0) {
      return;
     }
     if (!in_array($guid, $usersreg)) {
      $players[$guid]->kick($mod->getCV("registered", "kickreason"));
     }
    }
    Alles anzeigen
  • !online customizable?

    • Geventh
    • 22. Februar 2011 um 06:49

    Lol...
    Can you show me a screenshot or the logs?
    Perhabs some stupid mistakes from my side....

    Geventh

  • !online customizable?

    • Geventh
    • 21. Februar 2011 um 17:12

    hmm you have added all groups?
    You should only add those groups you wish to see in the list.
    Can you show me a screenshot?
    The changelog is only in german at the moment: click here

    edit my fault:

    PHP
    public function online($guid, $parameters) {
           $admins = $this->mod->getAdmins();
           $online = array();
           //add those lines -->
           $results = explode("," , $this->mod->getCV("main", "onlineshowngroups"));
           $onlineshowngroups = array();
           foreach($results as $result) {
               $onlineshowngroups[] = trim($result);
           }
           // <--
           foreach ($admins as $adminguid => $admin) {
              $playergroup = $this->players[$adminguid]->getGroup(); // add this line here
               if (array_key_exists($adminguid, $this->players) && in_array($playergroup, $onlineshowngroups)) { // change this line
                   $online[] = array(
                      "nick" => $this->players[$adminguid]->getName(),
                      "group" => $playergroup // change this line
                   );
               }
           }
           $str = $this->mod->getLngString("onlineadmins") . " ";
           if (count($online) > 0) {
               foreach ($online as $admin) {
                   $str .= "^2" . $admin["nick"] . " ^1(" . $this->mod->getLongGroupName($admin["group"]) . ")^7, ";
               }
               $str = substr($str, 0, -4);
           }
           else {
               $str .= $this->mod->getLngString("onlineAdminsNone");
           }
           $this->players[$guid]->say($str);
    }
    Alles anzeigen

    Geventh

  • !online customizable?

    • Geventh
    • 20. Februar 2011 um 16:44

    Ok, In v0.12 this public function will look different, so beware of that.

    It seems to look like what you wished.
    I think you have to edit the config file where you have to put the groups in.

    Changelog from v12.0 BETA:

    PHP
    --> Improved: !online shows only admins which are members from group [main]onlineshowngroups

    The code may look like that:

    In the config.cfg file -> under section [main] (first section) --> add at the end the line:

    PHP
    onlineshowngroups = "master,admin"

    The PHP code:

    PHP
    public function online($guid, $parameters) {
           $admins = $this->mod->getAdmins();
           $online = array();
           //add those lines -->
           $results = explode("," , $this->mod->getCV("main", "onlineshowngroups"));
           $onlineshowngroups = array();
           foreach($results as $result) {
               $onlineshowngroups[] = trim($result);
           }
           $playergroup = $this->players[$adminguid]->getGroup();
           // <--
           foreach ($admins as $adminguid => $admin) {
               if (array_key_exists($adminguid, $this->players) && in_array($playergroup, $onlineshowngroups)) { // change this line
                   $online[] = array(
                      "nick" => $this->players[$adminguid]->getName(),
                      "group" => $playergroup // change this line
                   );
               }
           }
           $str = $this->mod->getLngString("onlineadmins") . " ";
           if (count($online) > 0) {
               foreach ($online as $admin) {
                   $str .= "^2" . $admin["nick"] . " ^1(" . $this->mod->getLongGroupName($admin["group"]) . ")^7, ";
               }
               $str = substr($str, 0, -4);
           }
           else {
               $str .= $this->mod->getLngString("onlineAdminsNone");
           }
           $this->players[$guid]->say($str);
    }
    Alles anzeigen

    Can you try that out?

  1. Mitarbeiter
  2. Datenschutzerklärung
  3. Nutzungsbedingungen
  4. Impressum
  5. Kontakt
Community-Software: WoltLab Suite™