falko-hartmann.de

Black Knight's AllTalk Changer v1.0 (13.10.2002)

Beschreibung

Per admin_alltalk wird die Servervariable sv_alltalk gesetzt, so dass HL-Voice auf die Teams limitiert bleibt oder jeder jeden hört.

Die Einstellungen werden über die vault.ini über den Mapchange gespeichert. Daher muss eine vault.ini definiert sein.


Download

plugin_bk_alltalk


Installation

  1. Kompilieren des Plugins
  2. Installation des Plugins (inkl. Eintrag in die plugin.ini)
  3. Mapchange

Befehle

Für den Befehl braucht Ihr das Recht 128!

admin_alltalk 0:
HLVoice nur teamintern hörbar.
admin_alltalk 1:
HLVoice serverweit hörbar.

Quellcode

plugin_bk_alltalk.sma:

/* Blacky's AllTalk Changer v1.0 (13.10.2002)
 
Contact: http://www.wing-clan.de, blackknight@wing-clan.de 
 
PS.: The Black Knight always triumphs... */
 
#include <core> 
#include <console> 
#include <string> 
#include <admin> 
#include <adminlib>
 
new STRING_VERSION[MAX_DATA_LENGTH] = "1.0";
 
public admin_alltalk(HLCommand,HLData,HLUserName,UserIndex){
	new sUser[MAX_NAME_LENGTH];
	new sData[MAX_DATA_LENGTH];
 
	convert_string(HLData,sData, MAX_DATA_LENGTH);
	convert_string(HLUserName,sUser, MAX_DATA_LENGTH);
	execute_command(sUser,"admin_alltalk","sv_alltalk",sData);
	set_vaultdata("alltalk",sData);
	return PLUGIN_HANDLED;
}
 
public plugin_init(){
	plugin_registerinfo("Alltalk changer","Switches sv_alltalk",STRING_VERSION);
	plugin_registercmd("admin_alltalk","admin_alltalk",ACCESS_KICK,"Switches sv_alltalk.");
 
	new alltalk[MAX_DATA_LENGTH];
	new ialltalk;
	new Msg[MAX_TEXT_LENGTH];
 
	/* Checks vault.ini entries and sets default values if not already set */
	get_vaultdata("alltalk",alltalk,MAX_DATA_LENGTH);
	if(strlen(alltalk)==0){
		set_vaultdata("alltalk","0");
		exec("sv_alltalk 0");
	}
	else{
		ialltalk=strtonum(alltalk);
		snprintf(Msg,MAX_TEXT_LENGTH,"sv_alltalk %i",ialltalk);
		exec(Msg);
	}
	return PLUGIN_CONTINUE; 
}