also folgendes ich habe im adminmod.org forum folgendes plugin gefunden das slayt alle nach dem 3ten teamattack bei dem erfinder des plugins läuft es angeblich bei jemand anderem und bei mir funzt es allerdings nich da kommt irgendwas von error 10 glaub ich kann sich mal jemand das teil ankucken ?
Ich suche schon etwas länger nach so einem plugin
Code:
// trak3r@hotmail.com -- http://zeal.dyndns.org
#include <core>
#include <console>
#include <string>
#include <admin>
#include <adminlib>
#define ACCESS_CONSOLE 131072
#define INNOCENT 0
new infractions[MAX_PLAYERS] = { INNOCENT, ... };
public logd_injure(HLCommand,HLData,HLUserName,UserIndex)
{
new index_attacker;
new index_victim;
new session;
new wonid;
new team_attacker;
new team_victim;
new dead;
new index_attacker_string[3];
new index_victim_string[3];
new param[MAX_DATA_LENGTH];
new name[MAX_NAME_LENGTH];
convert_string( HLData, param, MAX_DATA_LENGTH );
strsplit(param," ",index_attacker_string,3,index_victim_string,3);
index_attacker = strtonum( index_attacker_string );
index_victim = strtonum( index_victim_string );
if(playerinfo(index_victim,name,MAX_NAME_LENGTH,session,wonid,team_victim,dead))
{
if(playerinfo(index_attacker,name,MAX_NAME_LENGTH,session,wonid,team_attacker,dead))
{
if(team_victim == team_attacker)
{
infractions[index_attacker] += 1;
if( 2 < infractions[index_attacker])
{
infractions[index_attacker] = INNOCENT;
slay(name);
new msg[MAX_TEXT_LENGTH];
snprintf(msg,MAX_TEXT_LENGTH,"%s hat leider das falsche Team angegriffen.", name);
say(msg);
}
}
}
}
return PLUGIN_CONTINUE;
}
public logd_trigger(HLCommand,HLData,HLUserName,UserIndex )
{
new param[MAX_DATA_LENGTH];
convert_string(HLData,param,MAX_DATA_LENGTH);
if( 0 == strcmp("Round_Start",param))
{
new i;
for(i = 1; i <= MAX_PLAYERS; i++ )
{
infractions[i] = INNOCENT;
}
}
return PLUGIN_CONTINUE;
}
public plugin_init()
{
plugin_registerinfo( "Plugin_LogD_FriendlyFireSlay", "Morons that shoot their teammates die.", "1.9" );
plugin_registercmd( "logd_injure", "logd_injure", ACCESS_CONSOLE, "" );
plugin_registercmd( "logd_trigger", "logd_trigger", ACCESS_CONSOLE, "" );
exec( "logd_reg 58 admin_command logd_injure" );
exec( "logd_reg 62 admin_command logd_trigger" );
return PLUGIN_CONTINUE;
}