hmm aha naja egal ich hab n anderes problem unzwar in 4 Std fahr ich los zur lan
und der server läuft noch nich so wie er soll
habe hier mal das killstreak plugin das mit dem reseten bei restart round funzt noch nich:
Code:
/*
* Bud-froggy Productions® -- July 26nd, 2001
* Killing Streak Announcer®
*
* Announces Kill streaks
* Place in logd_kill
* new features added by SDal
*/
#include <core>
#include <console>
#include <string>
#include <admin>
#include <adminlib>
new STRING_VERSION[MAX_DATA_LENGTH] = "1.6";
#define Level1 4 //Multikill
#define Level2 6 //Ultrakill
#define Level3 8 //Killingspree
#define Level4 10 //Monsterkill
#define Level5 15 //Monsterkill
#define Level6 20 //Godlike
#define Level7 30 //Godlike
#define ACCESS_CONSOLE 131072
#define CLEAN_SLATE 0
new FragCount[ MAX_PLAYERS ] = {CLEAN_SLATE,...};
new on = 1;
playFile( sFileName[ ] )
{
new Name[ MAX_NAME_LENGTH ];
new iUserID;
new iWONID;
new maxplayers = maxplayercount();
for( new i = 1; i <= maxplayers; i++ )
{
if( playerinfo(i, Name, MAX_NAME_LENGTH, iUserID, iWONID ) ) {
//if its not a bot
if( iWONID != 0 ) {
playsound(Name, sFileName );
}
}
}
return 1;
}
public admin_killstreak( HLCommand,HLData,HLUserName,UserIndex )
{
new User[MAX_NAME_LENGTH];
new Data[MAX_DATA_LENGTH];
convert_string(HLUserName, User, MAX_NAME_LENGTH);
convert_string(HLData,Data,MAX_DATA_LENGTH);
if (streq(Data, "1")==1)
{
on = 1;
selfmessage("Killstreak aktiviert");
return PLUGIN_HANDLED;
}
if (streq(Data, "0")==1)
{
on = 0;
selfmessage("Killstreak deaktiviert");
return PLUGIN_HANDLED;
}
selfmessage("Muss Zahl zwischen 0 und 1 sein!");
return PLUGIN_HANDLED;
}
public logd_killstreak( HLCommand,HLData,HLUserName,UserIndex )
{
if (on == 1)
{
new iIDA;
new iIDV;
new sID1[3];
new sID2[3];
new Data[MAX_DATA_LENGTH];
new Message[ MAX_TEXT_LENGTH ];
new Name[MAX_NAME_LENGTH];
new Victim[MAX_NAME_LENGTH];
new iUserID;
new iWONID;
new iTeamA;
new iTeamV;
convert_string( HLData, Data, MAX_DATA_LENGTH );
strsplit( Data, " ", sID1, 3, sID2, 3);
iIDA = strtonum( sID1 );
iIDV = strtonum( sID2 );
if(playerinfo(iIDA, Name, MAX_NAME_LENGTH, iUserID, iWONID, iTeamA))
{
if(playerinfo(iIDV, Victim, MAX_NAME_LENGTH, iUserID, iWONID, iTeamV))
{
if(iTeamV != iTeamA)
FragCount[ iIDA ] += 1;
else
{
FragCount[iIDA] -=1;
}
}
}
FragCount[ iIDV ] = CLEAN_SLATE;
if (FragCount[ iIDA ] == Level1)
{
playFile( "misc/multikill.wav" );
snprintf(Message, MAX_TEXT_LENGTH, "%s: Multi Kill !!! (%i Kills)", Name,FragCount[iIDA]);
typesay(Message,3, 255, 255, 255);
}
else if( FragCount[ iIDA ] == Level2 )
{
playFile( "misc/ultrakill.wav" );
snprintf( Message, MAX_TEXT_LENGTH, "%s: Ultra Kill !!! (%i Kills)", Name,FragCount[iIDA]);
typesay(Message,3,150,200,0);
}
else if( FragCount[iIDA ] == Level3 )
{
playFile( "misc/killingspree.wav" );
snprintf( Message, MAX_TEXT_LENGTH, "%s is on a Killing Spree !!! (%i Kills)", Name,FragCount[iIDA]);
typesay(Message,4,200,100,0);
}
else if( FragCount[iIDA ] == Level4 || FragCount[iIDA ] == Level5 )
{
playFile( "misc/monsterkill.wav" );
snprintf( Message, MAX_TEXT_LENGTH, "%s made a MONSTERKILLLLL !!! (%i Kills)", Name,FragCount[iIDA]);
typesay(Message,4,0,100,200);
}
else if( FragCount[iIDA ] == Level6 || FragCount[iIDA ] == Level7 )
{
playFile( "misc/godlike.wav" );
snprintf( Message, MAX_TEXT_LENGTH, "%s is playing G - O - D - L - I - K - E ! ! ! (%i Kills)", Name,FragCount[iIDA]);
typesay(Message,4,225,0,0);
}
return PLUGIN_HANDLED;
}
return PLUGIN_HANDLED;
}
public ks_resetscore(HLCommand,HLData,HLUserName,UserIndex,Param)
{
new loop;
new Data[MAX_NAME_LENGTH];
new x [MAX_DATA_LENGTH];
convert_string(HLData,Data,MAX_NAME_LENGTH);
strsplit(Data,"# ",x,MAX_DATA_LENGTH);
if(strcmp("Game_Commencing", Data) != 0)
{
return PLUGIN_HANDLED;
}
for( loop = 0; loop < MAX_PLAYERS; loop += 1)
{
FragCount[loop] = CLEAN_SLATE;
}
if(strcmp(x,"Restart_Round_") != 0)
{
return PLUGIN_HANDLED;
}
for( loop = 0; loop < MAX_PLAYERS; loop += 1)
{
FragCount[loop] = CLEAN_SLATE;
}
return PLUGIN_HANDLED;
}
public plugin_connect(HLUserName,HLIP, UserIndex)
{
if (UserIndex >= 1 && UserIndex <= MAX_PLAYERS) {
FragCount[UserIndex] = CLEAN_SLATE;
}
return PLUGIN_CONTINUE;
}
public plugin_disconnect(HLUserName,UserIndex)
{
if (UserIndex >= 1 && UserIndex <= MAX_PLAYERS) {
FragCount[UserIndex] = CLEAN_SLATE;
}
return PLUGIN_CONTINUE;
}
public plugin_init()
{
plugin_registerinfo("Kill Streak Announcer","Announces kill streaks.",STRING_VERSION);
plugin_registercmd("logd_killstreak", "logd_killstreak", ACCESS_CONSOLE, "");
plugin_registercmd("ks_resetscore", "ks_resetscore", ACCESS_CONSOLE, "");
plugin_registercmd("admin_killstreak","admin_killstreak",ACCESS_BAN, "admin_killstreak (0/1): 0 = Aus,1= AN");
plugin_registerhelp("admin_killstreak",ACCESS_BAN,"admin_killstreak (0/1): 0 = Aus,1= AN");
exec( "logd_reg 57 admin_command logd_killstreak" );
exec( "logd_reg 62 admin_command ks_resetscore" );
return PLUGIN_CONTINUE;
}
das gleiche problem bei dem multikill plugin:
Code:
/*
* Multikillcounter by [TV]Smudo.
* Announces Kills per seconds.
* Announces First Blood.
* Announces the leading Player.
* Based on Bud-froggys Killing Streak Announcer®.
*/
#pragma dynamic 16384
#include <core>
#include <console>
#include <string>
#include <admin>
#include <adminlib>
new STRING_VERSION[MAX_DATA_LENGTH] = "1.1";
new FBSwitch = 2; /*First Blood. 0=OFF, 1=First Blood pro Runde , 2=First Blood pro Map.*/
#define KITSwitch 1; /*Kills in Time Switch. 1=ON or 0=OFF.*/
#define HSSwitch 1; /*Highscore. 0=OFF, 1=ON.*/
#define KillInTime 2 /*Time in Seconds*/
#define KIT_Level1 2; /*Kills per Time*/
#define KIT_Level2 3; /*Kills per Time*/
#define ACCESS_CONSOLE 131072
#define CLEAN_SLATE 0
new FragCount[ MAX_PLAYERS ] = {CLEAN_SLATE,...};
new HSCount[ MAX_PLAYERS ] = {CLEAN_SLATE,...};
new KITTimer;
new KIT_Zeit = 0;
new KIT_Count;
new Name[MAX_NAME_LENGTH];
new lastName[MAX_TEXT_LENGTH];
new lastHSName[MAX_TEXT_LENGTH];
new iIDA;
new iIDAlast;
new fbStatus = 1;
new highScore = 0;
new lastHighScore = 0;
playFile( sFileName[ ] )
{
new iUserID;
new iWONID;
new maxplayers = maxplayercount();
for( new i = 1; i <= maxplayers; i++ )
{
if( playerinfo(i, Name, MAX_NAME_LENGTH, iUserID, iWONID ) ) {
{
playsound(Name, sFileName );
}
}
}
return 1;
}
public logd_multikill( HLCommand,HLData,HLUserName,UserIndex )
{
new iIDV;
new Text[MAX_TEXT_LENGTH];
new sID1[3];
new sID2[3];
new Data[MAX_DATA_LENGTH];
new Message[ MAX_TEXT_LENGTH ];
convert_string( HLData, Data, MAX_DATA_LENGTH );
strsplit( Data, " ", sID1, 3, sID2, 3 );
iIDA = strtonum( sID1 );
iIDV = strtonum( sID2 );
if(!playerinfo(iIDA, Name, MAX_NAME_LENGTH)){
return PLUGIN_FAILURE;
}
FragCount[ iIDV ] = CLEAN_SLATE;
/*tkr_checktk*/
new iUserID;
new iWONID;
new iTeamA;
new iTeamV;
new sIDA[3];
new sIDV[3];
/*new Data[MAX_NAME_LENGTH];*/
convert_string(HLData,Data,MAX_DATA_LENGTH);
strsplit(Data, " ", sIDA, 3, sIDV, 3 );
if(playerinfo(iIDA, Data, MAX_NAME_LENGTH, iUserID, iWONID, iTeamA))
{
if(playerinfo(iIDV, Data, MAX_NAME_LENGTH, iUserID, iWONID, iTeamV))
{
if(iTeamV != iTeamA) {
FragCount[ iIDA ] += 1;
KIT_Count += 1;
HSCount[ iIDA ] += 1;
}
if(iTeamV == iTeamA) {
FragCount[ iIDA ] -= 1;
KIT_Count -= 1;
HSCount[ iIDA ] -= 1;
}
}
}
if(KITSwitch==1 && iIDA == iIDAlast && KIT_Zeit > 0) {
playerinfo(iIDA,lastName,MAX_DATA_LENGTH);
Kill_In_Time();
}
else if(KITSwitch==1 && iIDA == iIDAlast && KIT_Zeit <= 0) {
KIT_Count = 1;
iIDAlast = iIDA;
playerinfo(iIDA,lastName,MAX_DATA_LENGTH);
KIT_Zeit = (KillInTime + 1);
KITTimer = set_timer("Kill_In_Time",1,KIT_Zeit);
Kill_In_Time();
}
else if(KITSwitch==1 && iIDA != iIDAlast && KIT_Count < 3) {
KIT_Count = 1;
iIDAlast = iIDA;
playerinfo(iIDA,lastName,MAX_DATA_LENGTH);
if (KIT_Zeit > 0) {
kill_timer(KITTimer);
}
KIT_Zeit = (KillInTime + 1);
KITTimer = set_timer("Kill_In_Time",1,KIT_Zeit);
Kill_In_Time();
}
else if(KITSwitch==1 && iIDA != iIDAlast && KIT_Count > 2) {
iIDAlast = iIDA;
KIT_Count = 1;
snprintf( Text, MAX_TEXT_LENGTH, "Double Kill von %s!!",lastName);
typesay(Text, 6, 255, 255, 255 );
snprintf( Text, MAX_TEXT_LENGTH, "%s schaffte 2 Kills in %i Sekunden!!!",Name,KillInTime);
say(Text);
playFile( "misc/dk.wav" );
if (KIT_Zeit > 0) {
kill_timer(KITTimer);
}
KIT_Zeit = (KillInTime + 1);
KITTimer = set_timer("Kill_In_Time",1,KIT_Zeit);
Kill_In_Time();
}
if(fbStatus==1 && FBSwitch>=1) {
snprintf( Message, MAX_TEXT_LENGTH, "First Blood: %s!", Name);
typesay(Message, 6, 255, 15, 15 );
playFile( "misc/fblood.wav" );
fbStatus=0;
}
if(HSCount[ iIDA ]>highScore && (lastHighScore!=iIDA) && HSSwitch == 1 && HSCount[ iIDA ] > 2) {
snprintf(Text,MAX_DATA_LENGTH,"%s hat die Fuehrung mit %i Kills uebernommen !",Name,HSCount[ iIDA ]);
typesay(Text, 6, 255, 15, 15 );
say(Text);
if(Name && lastHSName == 1)
{
playsound(Name, "misc/takenlead.wav" );
}
else
{
playsound(Name, "misc/takenlead.wav" );
playsound(lastHSName, "misc/lostlead.wav" );
}
highScore = HSCount[ iIDA ];
lastHighScore=iIDA;
playerinfo(iIDA,lastHSName,MAX_DATA_LENGTH);
}
else if (HSCount[ iIDA ]==highScore && HSSwitch == 1 && HSCount[ iIDA ] > 2) {
playsound(Name, "misc/tiedlead.wav" );
playsound(lastHSName, "misc/tiedlead.wav" );
lastHighScore=0;
}
else if (HSCount[ iIDA ]>highScore && (lastHighScore==iIDA) && HSSwitch == 1 && HSCount[ iIDA ] > 2) {
highScore = HSCount[ iIDA ];
}
return PLUGIN_HANDLED;
}
public Kill_In_Time() {
new Text[MAX_TEXT_LENGTH];
KIT_Zeit--;
if (KIT_Zeit > 0){
return PLUGIN_CONTINUE;
}
if(KIT_Count == KIT_Level1) {
snprintf( Text, MAX_TEXT_LENGTH, "Double Kill von %s!!!",Name);
typesay(Text, 6, 255, 255, 255 );
snprintf( Text, MAX_TEXT_LENGTH, "%s schaffte %i Kills in %i Sekunden!!!",Name,KIT_Level1,KillInTime);
say(Text);
playFile( "misc/dk.wav" );
} else if(KIT_Count == KIT_Level2) {
snprintf( Text, MAX_TEXT_LENGTH, "Monster Kill von %s!!!",Name);
typesay(Text, 6, 255, 255, 255 );
snprintf( Text, MAX_TEXT_LENGTH, "%s schaffte %i Kills in %i Sekunden!!!",Name,KIT_Level2,KillInTime);
say(Text);
playFile( "misc/monsterkill.wav" );
} else if(KIT_Count > KIT_Level2){
snprintf( Text, MAX_TEXT_LENGTH, "Oh mein Gott! %i Kills!!^nEin Mega Mo-mo-mo-Monsterkill von %s",KIT_Count,Name);
typesay(Text, 6, 255, 255, 255 );
snprintf( Text, MAX_TEXT_LENGTH, "%s schaffte %i Kills in %i Sekunden!!!",Name,KIT_Count,KillInTime);
say(Text);
playFile( "misc/monsterkill.wav" );
}
KIT_Count = 0;
KIT_Zeit = 0;
return PLUGIN_CONTINUE;
}
public resetfb(HLCommand,HLData,HLUserName,UserIndex)
{
new Data[MAX_NAME_LENGTH];
convert_string(HLData,Data,MAX_NAME_LENGTH);
if((strcmp("Round_Start", Data) != 0 ) && FBSwitch == 1)
return PLUGIN_HANDLED;
else if (FBSwitch == 1) {
fbStatus=1;
}
return PLUGIN_HANDLED;
}
public resetcount(HLCommand,HLData,HLUserName,UserIndex)
{
new Data [MAX_DATA_LENGTH];
new x [MAX_DATA_LENGTH];
convert_string( HLData, Data, MAX_DATA_LENGTH );
strsplit(Data,"# ",x,MAX_DATA_LENGTH);
if(strcmp(Data,"Game_Commencing")==0)
{
FragCount[ iIDA ] = 0;
HSCount[ iIDA ] = 0;
}
else if(strcmp(x,"Restart_Round_")==0)
{
FragCount[ iIDA ] = 0;
HSCount[ iIDA ] = 0;
}
return PLUGIN_HANDLED;
}
public plugin_connect(HLUserName, HLIP, UserIndex)
{
if (UserIndex >= 1 && UserIndex <= MAX_PLAYERS) {
FragCount[UserIndex] = CLEAN_SLATE;
HSCount[UserIndex] = CLEAN_SLATE;
}
return PLUGIN_CONTINUE;
}
public plugin_disconnect(HLUserName, UserIndex)
{
new maxplayers = maxplayercount();
if (UserIndex >= 1 && UserIndex <= MAX_PLAYERS) {
FragCount[UserIndex] = CLEAN_SLATE;
HSCount[UserIndex] = CLEAN_SLATE;
for( new i = 1; i <= maxplayers; i++ )
{
if(HSCount[i] > highScore) {
highScore = HSCount[i];
}
}
}
return PLUGIN_CONTINUE;
}
public plugin_init()
{
plugin_registerinfo("Multikill Announcer.","Announces kills in Time.",STRING_VERSION);
plugin_registercmd("logd_multikill", "logd_multikill", ACCESS_CONSOLE, "");
plugin_registercmd("resetfb", "resetfb", ACCESS_CONSOLE, "");
plugin_registercmd("resetfb", "resetcount", ACCESS_CONSOLE, "");
exec( "logd_reg 57 admin_command logd_multikill" );
exec( "logd_reg 62 admin_command resetfb" );
exec( "logd_reg 62 admin_command resetcount" );
return PLUGIN_CONTINUE;
}