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?