AdminMod.de
https://www.adminmod.de/

mirror damage
https://www.adminmod.de/viewtopic.php?t=8754
Seite 1 von 1

Autor:  Sena+or [ 09.08.2004, 09:09 ]
Betreff des Beitrags:  mirror damage

also vor langer langer Zeit (1.3 oder so) hatte ich ein LogD Plugin mit mirror damage (wenn jemand einen aus dem eigenen Team angreift wird der verursachte Schaden im selbst und nicht seinem Opfer abgezogen) hies soweit ich mich erinnern kann DAMP (team healing) http://logd.sourceforge.net/damp/damp.html anscheinend ist das Projekt aber inactive :-( daher meine Frage

gibts dafür ersatz? evtl in Form eins AM Plugins (falls realisierbar)?

war damals ganz nützlich wenn es zu exzessen mit TKs gekommen ist, die ham das dann immer ganz schnell bleiben lassen... ;-)

Update:
bin eventuell gerade über die Lösung gestolpert
Code:
mp_teamplay 175381 // set teamplay to mirror damage
mp_teamplay ist unter den allgemeinen HL-Server CVars gelistet, funktioniert die auch unter CS? Hat Jemand Erfahrung damit? (Bin Grad auswärts und hab erst morgen wieder gelegenheit das zu testen..)

danke im voraus

Autor:  [WING] Black Knight [ 15.08.2004, 19:39 ]
Betreff des Beitrags: 

Meines Wissens nach ist die Variable inaktiv. Was Damp betrifft, würde ich es einfach mal ausprobieren. Und falls es nicht mehr funktionieren sollte, einfach in #adminmod auf Gamesurge gehen und Wraith um eine angepasste Version bitten.

Autor:  Sena+or [ 15.08.2004, 23:26 ]
Betreff des Beitrags: 

danke für die antwort...

die mp_teamplay funktioniert wirklich nicht (getestet) ist inaktiv...

damp für cs 1.4 habe ich mir bereits gezogen, es wird zwar geladen (damp_status funktioniert) allerdings wenn ich das dazugehörige plugin (plugin_tw.sma) kompiliere kommt folgendes...
Code:
D:\Games\Adminmod\scripting\myscripts>compile plugin_tw.sma
Compiling plugin_tw.sma...
Complete.
..\include\admin.inc(213) Warning [219]: local variable "Command" shadows a variable at a preceding level
..\include\admin.inc(214) Warning [219]: local variable "Command" shadows a variable at a preceding level
D:\Games\Adminmod\scripting\myscripts>
hier der plugin-
Code:
/*
* Team Wounder Script.
*  - Uses Damp to cause team wound healing and attacker harming
*
* By Kndroc
*/


#include <core>
#include <console>
#include <string>
#include <admin>
#include <adminlib>

new heal = 0;
new harm = 0;

new STRING_VERSION[MAX_DATA_LENGTH] = "v1.0";
new Command[ MAX_TEXT_LENGTH ];

updateDamp()
{
	new activeHealMod[ MAX_TEXT_LENGTH ];
	new activeHarmMod[ MAX_TEXT_LENGTH ];
	if( heal == 0 )
	{
		activeHealMod = "0.0";
	}
	else
	{
		activeHealMod = "1.0";
	}

	if( harm == 0 )
	{
		activeHarmMod = "0.0";
	}
	else
	{
		activeHarmMod = "-1.0";
	}

	snprintf( Command, MAX_TEXT_LENGTH, "damp_def_rule 0.0 0.0 %s %s 0 0 0 0", activeHarmMod, activeHealMod );
	exec( Command );
}

public admin_tw_heal(HLCommand,HLData,HLUserName,UserIndex)
{
	new bool;
	new Data[MAX_DATA_LENGTH];

	convert_string(HLData,Data,MAX_DATA_LENGTH);
	if(	strcmp(	Data, "1" )	== 0 ) {
	    bool = 1;
	}
	else
	{
	    bool = 0;
	}

	//if the requested status isn't our status then change it
	if( bool != heal )
	{
		heal = bool;
		updateDamp();
	}
	return PLUGIN_CONTINUE;
}

public admin_tw_harm(HLCommand,HLData,HLUserName,UserIndex)
{
	new bool;
	new Data[MAX_DATA_LENGTH];

	convert_string(HLData,Data,MAX_DATA_LENGTH);
	if(	strcmp(	Data, "1" )	== 0 ) {
	    bool = 1;
	}
	else
	{
	    bool = 0;
	}

	//if the requested status isn't our status then change it
	if( bool != harm )
	{
		harm = bool;
		updateDamp();
	}
	return PLUGIN_CONTINUE;
}
public plugin_init()
{
	plugin_registerinfo("Controls Damp Team healing and Team Wounding",".",STRING_VERSION);
	plugin_registercmd("admin_tw_heal", "admin_tw_heal", ACCESS_FRIENDLY_FIRE, "admin_tw_heal <0|1> [Turns off/on team wound healing]");
	plugin_registercmd("admin_tw_harm", "admin_tw_harm", ACCESS_FRIENDLY_FIRE, "admin_tw_harm <0|1> [Turns off/on mirror damage to attacker]");

	return PLUGIN_CONTINUE;
}
ich erhalte zwar eine amx die ich auch richtig registriere in der plugin.ini aber es kommt bei befehlseingabe von z.b. admin_tw_harm 1 "unknown command"...

was ist da falsch?

Autor:  Sir Drink a lot [ 15.08.2004, 23:49 ]
Betreff des Beitrags: 

ersetze Command mit sCommand oder kopiere dieses new Command in die Funktion updateDamp()

naja...der "Unknown Command" kommt nur deswegen, da in den Funktionen PLUGIN_CONTINUE steht anstatt PLUGIN_HANDLED.

Funktioniert es denn nicht?

Autor:  Sena+or [ 16.08.2004, 00:19 ]
Betreff des Beitrags: 

nö, sollte es denn trotz der fehler?

den code hab ich noch nicht geändert, versuch ich morgen, bin heute schon zu müde, gut n8 ...

Autor:  [WING] Black Knight [ 16.08.2004, 15:04 ]
Betreff des Beitrags: 

Das sind Warnungen keine Fehler.

Autor:  Sena+or [ 19.08.2004, 07:37 ]
Betreff des Beitrags: 

nein, es geht leider nicht...

ich werde im IRC mein glück versuchen, danke ihr beiden ;-)

Seite 1 von 1 Alle Zeiten sind UTC+01:00
Powered by phpBB® Forum Software © phpBB Limited
https://www.phpbb.com/