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. 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. Ancestral

Beiträge von Ancestral

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!
  • Create a new users command

    • Ancestral
    • 21. Januar 2011 um 02:17

    another question, what is the way to use rconsay?

    PHP
    $str = "message";
    $players[$PA]->say($str);

    I tried

    PHP
    $players[$PA]->rconSay($str);

    but crash the mam :S

    EDIT: I found It!

    Code
    $mod->rconSay($str);
  • Create a new users command

    • Ancestral
    • 20. Januar 2011 um 18:52

    thanks a lot!

  • only registered players?

    • Ancestral
    • 20. Januar 2011 um 03:12

    What happends if I want to check or generate de array with the content of a text file?

    Maybe some expert can help, this is a untested idea. (I´m not a programmer)

    PHP
    <?php
    $mod->registerEvent("playerJoined", "registered_main");
    $mod->setDefaultCV("registered", "enabled", 1);
    $mod->setDefaultCV("registered", "kickreason",  "Not allowed to join");
    $allowed_users_filehandle = fopen(LOGDIR . "/users.log", "a"); // OPENING THE FILE
    
    
    
    
    function registered_main($guid) {
        global $mod;
        global $players;
    global $allowed_users_filehandle;
    
    $users = file_get_contents("./log/users.log") // I dont know if this is the right way to put the content of a file in an array or string.
    
    
    
    
    // Here we can compare the guid with $users
    if (strpos($users, $guid) !== false) {
    	$players[$guid]->kick($mod->getCV("registered", "kickreason"));
     }
    
    
    
    
    ?>
    Alles anzeigen

    If any real programmer can check would be great! :)

  • Create a new users command

    • Ancestral
    • 20. Januar 2011 um 01:45

    update; I tried the example on my server and works fine.

    Another quick question, what is the command for say something to the player?

    Like !myping , and say to the player his ping.

    thanks!

  • Create a new users command

    • Ancestral
    • 20. Januar 2011 um 01:09

    Hi all, I´m new to MAM and I have very little programming skills, anybody knows where I can find information on creating new users commands?

    Example:
    Like !kicklaggers
    to call a funtion wicht kick every player with more than 100 ping.

    I have a php with this

    PHP
    <?php
    $mod->registerCommand("kickthemall", false, "ktm");
    
    
    
    
    function ktm($param) {
                     	kick them all code
    }
    
    
    
    
    ?>
    Alles anzeigen

    Also any guide on creating custom php plugins is welcome.

    thanks!

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