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
Dieses Thema
  • Alles
  • Dieses Thema
  • Dieses Forum
  • Artikel
  • Seiten
  • Dateien
  • Forum
  • Lexikon
  • Erweiterte Suche
  1. GSManager
  2. Forum
  3. Allgemeines
  4. Vorschläge

fun message when a headshot was made

  • MvdS74
  • 2. Juli 2009 um 18:02
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!
1. offizieller Beitrag
  • MvdS74
    Anfänger
    Punkte
    50
    Beiträge
    7
    • 2. Juli 2009 um 18:02
    • #1

    Can you include fun messages for when someone makes a headshot? And if someone falls to their death?

    Both are things that are logged so it should be possible right?

  • jchamb2010
    Anfänger
    Punkte
    175
    Beiträge
    29
    • 3. Juli 2009 um 22:13
    • #2

    Yes I've actually done this with Nutshots, I don't see why you couldn't do it for Headshots, or Falling...

    However I do not mod mods very well, especially ones that are made sorta confusing (I've only been using this for like 3 days now, so it could just be me), but I'll attatch the file, and explain what to change if you want either of these, or both to happen, however I have yet to figure out how to be able to add things to the config, so your going to have to edit class files, If you are not comfortable doing this I suggest you stop reading :)

    FOR HEADSHOT MESSAGE

    Open adminmod/classes/mod.class.php
    FIND: Around Line 680

    PHP
    if ($killer_guid != "" && !array_key_exists($killer_guid, $this->players)) {
    			$this->logging->write(MOD_WARNING, "DEATH by player '$killer_name' who is actually not on the server: PID: $killer_pid, GUID: $killer_guid");
    			return;
    		}


    ADD BELOW

    PHP
    $killfind = array("<KILLER_NAME>",
    						  "<VICTIM_NAME>",);
    		$killreplace = array($killer_name,
    							 $victim_name,);
    	    if($image == "MOD_HEAD_SHOT"){
    			$message = "Change this to your will"; //You may use variables <KILLER_NAME> and <VICTIM_NAME>
    			$parsed = str_replace($killfind,$killreplace,$message);
    			$mod->rconSay($parsed);
    		}


    Save + Upload adminmod/classes/mod.class.php


    This will send a the message that is set by the variable $message (which should be in bold above) when a person gets a head shot, you may edit this however you want, but you can not use double quotes (") anywhere in the message, and you must surround the message with double quotes ("). You may use the variables <KILLER_NAME> to show the killers name, and <VICTIM_NAME> to show the victim's name.

    FOR FALLING MESSAGE

    Open adminmod/classes/mod.class.php
    FIND: Around Line 680

    PHP
    if ($killer_guid != "" && !array_key_exists($killer_guid, $this->players)) {
    			$this->logging->write(MOD_WARNING, "DEATH by player '$killer_name' who is actually not on the server: PID: $killer_pid, GUID: $killer_guid");
    			return;
    		}

    ADD BELOW

    PHP
    $killfind = array("<VICTIM_NAME>",);
    		$killreplace = array($victim_name,);
    	    if($image == "MOD_FALLING"){
    			$message = "Change this to your will"; //You may use variable <VICTIM_NAME>
    			$parsed = str_replace($killfind,$killreplace,$message);
    			$mod->rconSay($parsed);
    		}


    Save + Upload adminmod/classes/mod.class.php

    This will send a the message that is set by the variable $message (which should be in bold above) when a person gets a falls to their death, you may edit this however you want, but you can not use double quotes (") anywhere in the message, and you must surround the message with double quotes ("). You may use the variable <VICTIM_NAME> to show the victim's name, however because there is no killer, you may NOT use <KILLER_NAME>.

    Hope this helps,
    Jchamb2010

  • Dennis
    Administrator
    Reaktionen
    148
    Punkte
    37.933
    Trophäen
    7
    Artikel
    4
    Dateien
    2
    Beiträge
    7.453
    • 4. Juli 2009 um 13:14
    • Offizieller Beitrag
    • #3

    Changing Core Files could end up in missing support here.
    Better make a solution with plugin files.

    • Nächster offizieller Beitrag
  • Dieses Thema enthält 5 weitere Beiträge, die nur für registrierte Benutzer sichtbar sind.
  1. Mitarbeiter
  2. Datenschutzerklärung
  3. Nutzungsbedingungen
  4. Impressum
  5. Kontakt
Community-Software: WoltLab Suite™