Ein neues Thema erstellen  Auf das Thema antworten  [ 2 Beiträge ] 
Autor Nachricht
BeitragVerfasst: 11.04.2002, 18:02 

Registriert: 27.02.2002, 14:50
Beiträge: 262
Wohnort: Hall in Tirol
Hallo Leute
Mein Problem: Ich das Killstreak wurde verändert und schaut jetzt so aus:
Code:
/*
Advanced Killstreak by [TEaM]walski (netkowalski)
*/
#include <core>
#include <console>
#include <string>
#include <admin>
#include <adminlib>

new STRING_VERSION[MAX_DATA_LENGTH] = "1.5";

#define Level1 2
#define Level2 3
#define Level3 4
#define Level4 5
#define Level5 6
#define Level6 7
#define Level7 8
#define Level8 9


#define ACCESS_CONSOLE 131072
#define CLEAN_SLATE 0

new FragCount[ MAX_PLAYERS ] = {CLEAN_SLATE,...};
new on = 1;
new glowtime = 2;
new glowplayer[MAX_PLAYERS];
new upplayer=1;

public unglow()
{
	
	new Name[MAX_DATA_LENGTH];
	new sID[MAX_DATA_LENGTH];
	numtostr(glowplayer[1],sID);
	get_username(sID,Name,MAX_DATA_LENGTH);
	glow(Name,0,0,0);
	for (new i=2;i<upplayer;i=i+1)
	{
		glowplayer[i-1]=glowplayer[i];
	}
	upplayer=upplayer-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_DATA_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/dominating.wav" );
	snprintf(Message, MAX_TEXT_LENGTH, "%s: Dominating!!!(%i Kills).", Name,FragCount[iIDA]);
	typesay(Message, 5, 100, 255, 100);
	glow(Name, 100, 255, 100);
	glowplayer[upplayer]=iIDA;
	upplayer=upplayer+1;
	set_timer("unglow", glowtime, 1);
	}
	else if (FragCount[ iIDA ] == Level2)
	{
	playFile( "misc/multikill.wav" );
	snprintf(Message, MAX_TEXT_LENGTH, "%s: Multi Kill!!!(%i Kills).", Name,FragCount[iIDA]);
	typesay(Message, 5, 222, 113, 41);
	glow(Name, 222, 113, 41);
	glowplayer[upplayer]=iIDA;
	upplayer=upplayer+1;
	set_timer("unglow", glowtime, 1);
	}
	else if( FragCount[ iIDA ] == Level3 )
	{
	playFile( "misc/megakill.wav" );
	snprintf( Message, MAX_TEXT_LENGTH, "%s: Mega Kill!!!(%i Kills).", Name,FragCount[iIDA]);
	typesay(Message, 5, 0, 30, 220 );
	glow(Name, 0,30, 220);
	glowplayer[upplayer]=iIDA;
	upplayer=upplayer+1;
	set_timer("unglow", glowtime, 1);
	}
	else if( FragCount[ iIDA ] == Level4 )
	{
	playFile( "misc/ultrakill.wav" );
	snprintf( Message, MAX_TEXT_LENGTH, "%s: Ultra Kill!!!(%i Kills).", Name,FragCount[iIDA]);
	typesay(Message, 5, 255, 10, 255 );
	glow(Name, 255, 10, 255);
	glowplayer[upplayer]=iIDA;
	upplayer=upplayer+1;
	set_timer("unglow", glowtime, 1);
	}
	else if( FragCount[iIDA ] == Level5 )
	{
	playFile( "misc/unstoppable.wav" );
	snprintf( Message, MAX_TEXT_LENGTH, "%s is Unstoppable!!!(%i Kills).", Name,FragCount[iIDA]);
	typesay(Message, 5, 176, 86, 19 );
	glow(Name, 176, 86, 19);
	glowplayer[upplayer]=iIDA;
	upplayer=upplayer+1;
	set_timer("unglow", glowtime, 1);
	}
	else if( FragCount[iIDA ] == Level6 )
	{
	playFile( "misc/killingspree.wav" );
	snprintf( Message, MAX_TEXT_LENGTH, "%s is on a Killing Spree!!!(%i Kills).", Name,FragCount[iIDA]);
	typesay(Message, 5, 255, 15, 15 );
	glow(Name, 255, 15, 15);
	glowplayer[upplayer]=iIDA;
	upplayer=upplayer+1;
	set_timer("unglow", glowtime, 1);
	}
	else if( FragCount[iIDA ] == Level7 )
	{
	playFile( "misc/monsterkill.wav" );
	snprintf( Message, MAX_TEXT_LENGTH, "%s made a MOONSTERKILLLLL!!!(%i Kills)", Name,FragCount[iIDA]);
	typesay(Message, 5, 23, 102, 145 );
	glow(Name, 23, 102, 145);
	glowplayer[upplayer]=iIDA;
	upplayer=upplayer+1;
	set_timer("unglow", glowtime, 1);
	}
	else if( FragCount[iIDA ] == Level8 )
	{
	playFile( "misc/godlike.wav" );
	snprintf( Message, MAX_TEXT_LENGTH, "%s GOdLiKe!!!(%i Kills)", Name,FragCount[iIDA]);
	typesay(Message, 7, 155, 101, 0 );
	glow(Name, 155, 101, 0);
	glowplayer[upplayer]=iIDA;
	upplayer=upplayer+1;
	set_timer("unglow", glowtime, 1);
	}
	return PLUGIN_CONTINUE;
	}
	return PLUGIN_HANDLED;
}


/*public ks_resetscore(HLCommand,HLData,HLUserName,UserIndex,Param)
{
	new loop;
	new Data[MAX_NAME_LENGTH];
	convert_string(HLData,Data,MAX_NAME_LENGTH);
	
	if(	strcmp(	"Round_Start", Data	) != 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 heisst die bots (oder was auch immer) glowen für 2 sek. in der vorgegebenen farbe ABER das tun sie bei mir nicht --> sie glowen einfach weiter sogar wenn sie sterben!!!

was hab ich falsch getan??


meine server.cfg schaut so aus:
// Use this file to configure your DEDICATED server.
// This config file is executed everytime the server changes levels.

// disable autoaim
sv_aim 0

// disable clients' ability to pause the server
pausable 0

// default server name. Change to "Bob's Server", etc.
hostname "Counter-Strike 1.3 Server"

// maximum client movement speed
sv_maxspeed 320

// 20 minute timelimit
mp_timelimit 20

sv_cheats 0

///////////////////////////////////////////////////////////////
// Admin Mod Server Configuration Variables //
///////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////
// This file allows you to set Server Configuration Variables //
// (CVARs for short) related to Admin Mod functionality. //
// //
// (Note: For CVARS that are set to either "on" or "off," 0=off and 1=on) //
////////////////////////////////////////////////////////////////////////////


// Used by the TFC plugin only. If enabled, an attempt to switch
// teams will be rejected if it would unbalance the teams
// (0=disabled, 1=enabled)
admin_balance_teams 0

// If you are using bots with admin mod you can set this to 1
// It will protect bots from receiving client commands which
// would crash your server.
// (0=disabled, 1=enabled)
admin_bot_protection 1

// This is the message displayed to everyone after connecting.
admin_connect_msg "Welcome to the world of SCHAKAL..."

// This controls the availability of weapon restriction in CS.
// (0=disabled, 1=enabled)
admin_cs_restrict 0

// This will produce debugging messages in your logs which can
// be used to troubleshoot problems. Not recommended for general use.
// (0=disabled, 1=enabled)
admin_debug 0

// Determines whether or not the fun commands are allowed by default.
// If not on by default, the admin can still turn it on when wanted.
// (0=disabled, 1=enabled)
admin_fun_mode 0

// Enable to get special effects with certain commands
// like teleport or slap.
// (0=disabled, 1=enabled)
admin_fx 1

// If enabled, people who are gagged (not allowed to "say") will be
// unable to change their name while gagged
// (0=disabled, 1=enabled)
admin_gag_name 1

// If enabled, people who are gagged will not be able to use
// the say_team command.
// (0=disabled, 1=enabled)
admin_gag_sayteam 1

// Makes the admin with the highest access level the only admin in power.
// Example: if multiple admins are present, only the one with the highest
// access level will have admin access.
// (0=disabled, 1=enabled)
admin_highlander 0

// If admin_ignore_immunity is enabled, ACCESS_IMMUNITY is
// ignored and does nothing.
// (0=disabled, 1=enabled)
admin_ignore_immunity 0

// This file specifies which script plugins get loaded.
// It should be relative from the <mod> directory
admin_plugin_file "plugin.ini"

// The time (in seconds) during which an admin can reconnect after
// disconnecting without resetting his password in the setinfo line.
admin_reconnect_timeout 300

// Message displayed to users who try to execute commands that
// they don't have the appropriate access rights for.
admin_reject_msg "Nana das kannst du nich machen du wichser."

// How often, in seconds, the repeat_message should be shown on
// the screen during the game. Minimum value is 15 seconds.
// So, a value of 600 = 10 minutes between messages.
admin_repeat_freq 600

// Message that is show to everyone on the server every
// ten minutes by the message plugin.
admin_repeat_msg "This server is using Admin Mod, LogDaemon, Statsme and ClanMod"

// The old verbosity. Defines how commands are announced to the players
// clients in the form: "[ADMIN] <user> used command <command>"
// 0=all commands announced in chat with the admin name
// 1=all commands announced in chat, but without the admin name
// 2=most commands not announced at all (except "cheat" commands)
admin_quiet 0

// This file is used to store configuration data across maps
// and even across server restarts.
admin_vault_file "vault.ini"

// If enabled, a hlds_ld-style map vote will automatically
// start five minutes before the end of a map.
// (0=disabled, 1=enabled)
admin_vote_autostart 0

// If set to on status (1), when a vote is in progress all
// players will see the votes of other players as they vote.
// (0=disable, 1=enabled)
admin_vote_echo 0

// Number of seconds that must elapse after start of the map,
// or the end of another vote, before another hlds_ld-style
// map vote can be called.
admin_vote_freq 600

// Controls how many times the current map can be
// extended for thirty minutes
admin_vote_maxextend 0

// Percent of players who have to vote for a map to get it
// to win a hlds_ld-style map vote.
admin_vote_ratio 60

// Ability to make clients execute commands
// (0=disabled, 1=enabled)
allow_client_exec 0

// Default access rights for players not in the users.ini file.
// (See documentation for access levels and information)
default_access 1

// encrypt_password, for LINUX ONLY, whether to use
// encrypted passwords or not
// (0=disabled, 1=enabled)
encrypt_password 0

// If enabled, the scripting file functions have read
// access to files
// (0=disabled, 1=enabled)
file_access_read 0

// If enabled, the scripting file functions have write
// access to files
// (0=disabled, 1=enabled)
file_access_write 0

// This is only used with the old script system and is not
// needed with the new plugin system
help_file "admin_help.cfg"

// Declares priority IPs that are allowed to take a
// reserved spot (if any are set up) without a password.
ips_file 0

// Ratio of players who must vote 'yes' to a kick for
// it to be successful.
kick_ratio 60

// Ratio of players who must vote 'yes' to a map change
// for it to be successful.
map_ratio 80

// List of maps people are allowed to vote for. 0 to disable.
// Disable to enable all maps and use list from mapcycle.txt.
maps_file 0

// The file (relative to the <mod> dir) that
// reserved models are loaded from. 0 to disable.
models_file 0

// The message shown to someone who gets kicked for
// trying to use a reserved model.
models_kick_msg "[ADMIN] That model is reserved on this server."

// The message shown to someone who gets kicked for
// trying to use a reserved nickname.
nicks_kick_msg "[ADMIN] That name is reserved on this server."

// Password_field...first password of the setinfo line
// If password_field is "pw-AdminMod", the setinfo will be
// setinfo "pw-AdminMod" "password-in-users.ini"
password_field pw-home

// If pretty_say is enabled, centersay() fades in
// and out and does some other tricks.
// (0=disabled, 1=enabled)
pretty_say 1

// Controls how many (number) of the server's slots are reserved.
// This is useful only if reserve_type, below, is either 0 or 2.
reserve_slots 0

// Custom message given to clients trying to connect who do not have
// a reserved slots, when no public slots are free
reserve_slots_msg "There are no reserved slots available on the server."

// This controls how reserve slots work on the server. See documentation.
reserve_type 0

// NOTE: If you have "admin_plugin_file" set above, this CVAR is ignored.
// Define the path to the script file here, if you don't want
// to use the plugin system.
script_file "cstrike/dlls/admin.amx"

// If enabled, names are compared to those who have privileges
// with regular expressions.
// (0=disabled, 1=enabled)
use_regex 0

// The file in which you define your admins, their passwords
// and the access levels that they are assigned to.
users_file "users.ini"

// The minimum number of seconds allowed between votes
// called with the vote() (admin_vote functions) scripting function.
// If 0 or disabled, the vote() scripting function is disabled.
vote_freq 180

// Location of word filter file. 0 to disable, or something
// like "wordlist.txt" if enabled
words_file 0

log on
mp_logfile 1
mp_logdetail 3 //muss zwischen 1 und 3 liegen, ausprobieren !

allow_client_exec 1
file_access_read 1
file_access_write 1 //da weiss ich nicht so genau, ob der nötig ist, ausprobieren !

exec clanmod/clanmod.cfg

exec statsme.cfg



hab ich was vergessen?
sagt es mir :wink:

[/code]


Nach oben
   
 Betreff des Beitrags:
BeitragVerfasst: 11.04.2002, 18:28 

Registriert: 31.12.2001, 01:00
Beiträge: 514
Wohnort: Lüneburg
hab nur die glow funktion gelesen ich würd sagen das du admin_fun_mode 0 auf 1 stellen musst
ausserdem muss das funmode plugin installiert sein

_________________
Geht nich, gibs nich: Suchen, FAQ
www.cola-clan.de - Whiskey@cola-clan.de


Nach oben
   
Beiträge der letzten Zeit anzeigen:  Sortiere nach  
Ein neues Thema erstellen  Auf das Thema antworten  [ 2 Beiträge ] 


Du darfst keine neuen Themen in diesem Forum erstellen.
Du darfst keine Antworten zu Themen in diesem Forum erstellen.
Du darfst deine Beiträge in diesem Forum nicht ändern.
Du darfst deine Beiträge in diesem Forum nicht löschen.
Du darfst keine Dateianhänge in diesem Forum erstellen.

Suche nach:
Powered by phpBB® Forum Software © phpBB Limited
Deutsche Übersetzung durch phpBB.de
Original Design von "[ Half-Life Admin Mod © Alfred Reynolds 2000-2003 ] - [ site design by Jägermeister ]"