AdminMod.de
https://www.adminmod.de/

IDEE! neues Plugin!
https://www.adminmod.de/viewtopic.php?t=4185
Seite 2 von 3

Autor:  DevilZero [ 28.10.2002, 21:32 ]
Betreff des Beitrags: 

ja, aber das sollte in 2.50.50 funzen, sie haben das plugin_spawn ja in die plugin.ini gecshrieben, was vorher nicht der fall war

Autor:  Rinde [ 28.10.2002, 21:44 ]
Betreff des Beitrags: 

bei mir war das auch vorher schon drin

Autor:  [WING] Black Knight [ 28.10.2002, 22:43 ]
Betreff des Beitrags: 

Genau das war auch schon vorher drin.
Nur jetzt wurde es direkt auskommentiert, da es nicht funktioniert.

Autor:  DevilZero [ 29.10.2002, 12:58 ]
Betreff des Beitrags: 

ne im ernst? ich musste es zuerst hineinschreiben...aber koennte man das plugin mit einer spawnfunktion eines anderen metamod plugins verwirklichen? weiss doch nicht aber vielleicht stripper von botman oder so...

Autor:  DarkEyes1 [ 29.10.2002, 17:52 ]
Betreff des Beitrags: 

und ? rinde? noch keine beta von ghostbuster fertig ? :wink:

Autor:  Rinde [ 29.10.2002, 21:06 ]
Betreff des Beitrags: 

naja, erstmal vorläufig. man kann mit admin_gb_weapon weapon_xxx ausser dem messer eine weitere waffe einstellen, die benutzt werden darf, z.b. weapon_scout, weapon_tmp oder weapon_p228. admin_gb_weapon weapon_knife erlaubt nur das messer (logisch), und admin_gb_weapon alle erlaubt alle waffen (wer hätte das gedacht?).
Code:
/* Gh0sTbUsTeR Mode by CoWs | Element
    devilzero@tiscalinet.ch <mailto:devilzero@tiscalinet.ch>
    Modifiziert dieses Plugin so viel ihr wollt
    aber lasst mir nen Credit uebrig ;) */

#include <string>
#include <admin>
#include <adminlib>

#define ACCESS_GB 8192
#define ACCESS_CONSOLE 131072
#define T 3

new STRING_VERSION[MAX_DATA_LENGTH]= "2.50.50";
new GBMode;
new Planting = 0;
new Noclip[MAX_PLAYERS];
new AllowedWeapon[MAX_NAME_LENGTH];

public admin_gbmode(HLCommand,HLData,HLUserName,UserIndex) {
	new Command[MAX_COMMAND_LENGTH];
	new Data[MAX_DATA_LENGTH];
	new UserName[MAX_NAME_LENGTH];
	convert_string(HLCommand,Command,MAX_NAME_LENGTH);
	convert_string(HLData,Data,MAX_NAME_LENGTH);
	convert_string(HLUserName,UserName,MAX_NAME_LENGTH);
	if(strlen(Data) == 0) {
		snprintf(Data,MAX_TEXT_LENGTH,"^"admin_gbmode^" is ^"%i^"",GBMode);
		selfmessage(Data);
	} else if(check_param(Data) > GBMode) {
		set_vaultdata("logd_gb","1");
		GBMode = 1;
		say_command(UserName,Command,Data);
		exec("sv_restartround 10");
		snprintf(Data,MAX_TEXT_LENGTH,"Gh0sTbUsTeR Mode startet in 10 Sekunden.\nErlaubte Waffe: %s",AllowedWeapon[7]);
		centersay(Data,10, 10, 255, 255);
		set_timer("noclipall",10,0);
	} else if(check_param(Data) < GBMode) {
		set_vaultdata("logd_gb","0");
		GBMode = 0;
		exec("sv_restartround 10");
		say_command(UserName,Command,Data);
		centersay("Gh0sTbUsTeR Mode vorbei...*sniff*", 12, 10, 255, 255);
	}
	return PLUGIN_HANDLED;
}

public admin_gb_weapon(HLCommand,HLData,HLUserName,UserIndex) {
	new Command[MAX_COMMAND_LENGTH];
	new Data[MAX_DATA_LENGTH];
	new UserName[MAX_NAME_LENGTH];
	new i,Dead;
	convert_string(HLCommand,Command,MAX_NAME_LENGTH);
	convert_string(HLData,Data,MAX_NAME_LENGTH);
	convert_string(HLUserName,UserName,MAX_NAME_LENGTH);
	if(strlen(Data) == 0) {
		snprintf(Data,MAX_TEXT_LENGTH,"^"admin_gb_weapon^" is ^"%s^"",AllowedWeapon[7]);
		selfmessage(Data);
	} else if(strncmp(Data,"weapon_",7) == 0) {
		set_vaultdata("logd_gb_weapon",Data);
		strcpy(AllowedWeapon,Data,MAX_NAME_LENGTH);
		say_command(UserName,Command,Data);
		for(i=1;i<=maxplayercount();i++) {
			if(playerinfo(i,UserName, MAX_NAME_LENGTH,_,_,_,Dead) == 1 && Dead == 0) {
				execclient(UserName,"weapon_knife");
				execclient(UserName,AllowedWeapon);
			}
		}
		snprintf(Data,MAX_TEXT_LENGTH,"Gh0sTbUsTeR Mode: Erlaubte Waffe ist nun %s.",Data[7]);
		centersay(Data,10, 10, 255, 255);
	} else {
		set_vaultdata("logd_gb_weapon","alle");
		strcpy(AllowedWeapon,"alle",MAX_NAME_LENGTH);
		say_command(UserName,Command,Data);
		centersay("Gh0sTbUsTeR Mode: Alle Waffen sind nun erlaubt.", 12, 10, 255, 255);
	}
	return PLUGIN_HANDLED;
}

public plugin_command(HLCommand,HLData,HLUserName,UserIndex) {
	new Command[MAX_COMMAND_LENGTH];
	new UserName[MAX_NAME_LENGTH];
	convert_string(HLCommand,Command,MAX_COMMAND_LENGTH);
	if(GBMode == 1 && strncmp(Command,"weapon_",7) == 0 && strcmp(AllowedWeapon,"alle") != 0 && strcmp(Command,"weapon_knife") != 0 && (Planting != UserIndex || strcmp(Command,"weapon_c4") != 0) && strcmp(Command,AllowedWeapon) != 0) {
		convert_string(HLUserName,UserName,MAX_NAME_LENGTH);
		execclient(UserName,AllowedWeapon);
		messageex(UserName,"You may not use this weapon in Gh0sTbUsTeR Mode",print_chat);
		return PLUGIN_HANDLED;
	}
	return PLUGIN_CONTINUE;
}

public HandleSay(HLCommand,HLData,HLUserName,UserIndex) {
	new Data[MAX_DATA_LENGTH];
	new UserName[MAX_NAME_LENGTH];
	new Team,Dead;
	convert_string(HLData,Data,MAX_DATA_LENGTH);
	strstripquotes(Data);
	if (GBMode == 1 && strcasestr(Data,"iwantplant") != -1 && Planting == 0 && playerinfo(UserIndex,UserName,MAX_NAME_LENGTH,_,_,Team,Dead) == 1 && Team == 1 && Dead == 0) {
		noclip(UserName, 0);
		Planting = UserIndex;
		execclient(UserName,"weapon_c4");
		set_timer("TimerNoClip",10,0);
	}
	return PLUGIN_CONTINUE;
}

public TimerNoClip(Timer,Repeat,HLUserName,HLParam) {
	new UserName[MAX_NAME_LENGTH];
	convert_string(HLUserName,UserName,MAX_NAME_LENGTH);
	Planting = 0;
	noclip(UserName,1);
}

public noclipall(Timer,Repeat,HLUserName,HLParam) {
	new UserName[ MAX_NAME_LENGTH ];
	new Dead;
	new i;
	if(GBMode == 1) {
		for(i=1;i<=maxplayercount();i++) {
			if(playerinfo(i,UserName, MAX_NAME_LENGTH,_,_,_,Dead) == 1 && Dead == 0 && Noclip[i] == 0) {
				noclip(UserName, 1);
				execclient(UserName,"weapon_knife");
				execclient(UserName,AllowedWeapon);
				Noclip[i] = 1;
			}
		}
		set_timer("noclipall",T,0);
	}
}

public specmode(HLCommand,HLData,HLUserName,UserIndex) {
	Noclip[UserIndex] = 0;
}

public logd_ghostbusters(HLCommand,HLData,HLUserName,UserIndex) {
	new i;
	for(i=1;i<MAX_PLAYERS;i++) {
		Noclip[i] = 0;
	}
}

public plugin_init() {
	plugin_registerinfo("Gh0sTbUsTeR Mode","Noclips all players and gives them special commands",STRING_VERSION);
	plugin_registercmd("say_team","HandleSay",ACCESS_ALL);
	plugin_registercmd("admin_gbmode", "admin_gbmode", ACCESS_GB, "admin_gbmode <1 || 0> Gh0sTbUsTeR Mode");
	plugin_registercmd("admin_gb_weapon", "admin_gb_weapon", ACCESS_GB, "admin_gbweapon <^"weapon_xxx^" || ^"alle^"> Gh0sTbUsTeR Mode Waffe");
	plugin_registercmd("specmode", "specmode", ACCESS_ALL);
	plugin_registercmd("logd_ghostbusters", "logd_ghostbusters", ACCESS_CONSOLE);
	plugin_registerhelp("say_team",ACCESS_ALL,"say_team iwantplant: Disables noclipmode on you for 10 seconds");
	exec( "logd_reg 62 admin_command logd_ghostbusters" );
	get_vaultnumdata("logd_gb",GBMode);
	set_vaultnumdata("logd_gb",GBMode);
	get_vaultdata("logd_gb_weapon",AllowedWeapon,MAX_NAME_LENGTH);
	if(strncmp(AllowedWeapon,"weapon_",7) != 0) {
		strcpy(AllowedWeapon,"alle",MAX_NAME_LENGTH);
	}
	set_vaultdata("logd_gb_weapon",AllowedWeapon);
	set_timer("noclipall",T,0);
	return PLUGIN_CONTINUE;
}

Autor:  DevilZero [ 29.10.2002, 22:19 ]
Betreff des Beitrags: 

hey sieht gut aus...aber etwas stoert mich, naemlich mein Credit, endere den doch zu:

/* Gh0sTbUsTeR Mode by Devilzero & Rinde
Coded by Rinde, Idee & Basecode from Devilzero
Special THX to: www.adminmod.de
*/

;) oder so... :roll:

Autor:  DevilZero [ 29.10.2002, 22:22 ]
Betreff des Beitrags: 

Achja, ein Teil ist englisch und ein Teil ist deutsch... :lol:
aber: BIG THX TO RINDE, dass er sich Zeit nimmt um dieses geile Plugin zu coden! Macht weiter so... :wink:

Autor:  DarkEyes1 [ 30.10.2002, 19:02 ]
Betreff des Beitrags: 

is ja nur vorläufig... @ Devil...

denn: waffen können immer noch gezogen werden(wenn gekauft)...
:cry:

Autor:  Rinde [ 31.10.2002, 11:19 ]
Betreff des Beitrags: 

ich hab mal einen blick auf die logd-events geworfen (habe vorher nie mit logd gearbeitet). ich hoffe dass es trotzdem noch funktioniert. ausserdem sind jetzt alle texte in deutsch, und den credit hab ich auch geändert
Code:
/* Gh0sTbUsTeR Mode by Devilzero & Rinde
   Coded by Rinde, Idee & Basecode from Devilzero
   Special THX to: www.adminmod.de
*/

#include <adminlib>

#define ACCESS_GB 8192
#define ACCESS_CONSOLE 131072

new STRING_VERSION[MAX_DATA_LENGTH]= "2.50.50";
new GBMode;
new Bombcarrier = 0;
new AllowedWeapon[MAX_NAME_LENGTH];

public admin_gbmode(HLCommand,HLData,HLUserName,UserIndex) {
	new Command[MAX_COMMAND_LENGTH];
	new Data[MAX_DATA_LENGTH];
	new UserName[MAX_NAME_LENGTH];
	convert_string(HLCommand,Command,MAX_NAME_LENGTH);
	convert_string(HLData,Data,MAX_NAME_LENGTH);
	convert_string(HLUserName,UserName,MAX_NAME_LENGTH);
	if(strlen(Data) == 0) {
		snprintf(Data,MAX_TEXT_LENGTH,"^"admin_gbmode^" is ^"%i^"",GBMode);
		selfmessage(Data);
	} else if(check_param(Data) > GBMode) {
		set_vaultdata("logd_gb","1");
		GBMode = 1;
		exec("sv_restartround 10");
		say_command(UserName,Command,Data);
		snprintf(Data,MAX_TEXT_LENGTH,"Gh0sTbUsTeR Mode startet in 10 Sekunden.\nErlaubte Waffe: %s",AllowedWeapon[7]);
		centersay(Data,10, 10, 255, 255);
	} else if(check_param(Data) < GBMode) {
		set_vaultdata("logd_gb","0");
		GBMode = 0;
		exec("sv_restartround 10");
		say_command(UserName,Command,Data);
		centersay("Gh0sTbUsTeR Mode vorbei...*sniff*", 12, 10, 255, 255);
	}
	return PLUGIN_HANDLED;
}

public admin_gb_weapon(HLCommand,HLData,HLUserName,UserIndex) {
	new Command[MAX_COMMAND_LENGTH];
	new UserName[MAX_NAME_LENGTH];
	new Data[MAX_DATA_LENGTH];
	new i;
	convert_string(HLCommand,Command,MAX_NAME_LENGTH);
	convert_string(HLData,Data,MAX_NAME_LENGTH);
	convert_string(HLUserName,UserName,MAX_NAME_LENGTH);
	if(strlen(Data) == 0) {
		snprintf(Data,MAX_TEXT_LENGTH,"^"admin_gb_weapon^" is ^"%s^"",AllowedWeapon[7]);
		selfmessage(Data);
	} else if(strncmp(Data,"weapon_",7) == 0) {
		set_vaultdata("logd_gb_weapon",Data);
		strcpy(AllowedWeapon,Data,MAX_NAME_LENGTH);
		say_command(UserName,Command,Data);
		snprintf(Data,MAX_TEXT_LENGTH,"Gh0sTbUsTeR Mode: Erlaubte Waffe ist nun %s.",Data[7]);
		centersay(Data,10, 10, 255, 255);
		for(i=1;i<=maxplayercount();i++) {
			Noclipaction(i,0);
		}
	} else {
		set_vaultdata("logd_gb_weapon","alle");
		strcpy(AllowedWeapon,"alle",MAX_NAME_LENGTH);
		say_command(UserName,Command,Data);
		centersay("Gh0sTbUsTeR Mode: Alle Waffen sind nun erlaubt.", 12, 10, 255, 255);
	}
	return PLUGIN_HANDLED;
}

public plugin_command(HLCommand,HLData,HLUserName,UserIndex) {
	new Command[MAX_COMMAND_LENGTH];
	new UserName[MAX_NAME_LENGTH];
	convert_string(HLCommand,Command,MAX_COMMAND_LENGTH);
	if(GBMode == 1 && strncmp(Command,"weapon_",7) == 0 && strcmp(AllowedWeapon,"alle") != 0 && strcmp(Command,"weapon_knife") != 0 && strcmp(Command,AllowedWeapon) != 0 && (Bombcarrier != -UserIndex || strcmp(Command,"weapon_c4") != 0)) {
		Noclipaction(UserIndex,0);
		messageex(UserName,"Diese Waffe darfst du im Gh0sTbUsTeR Mode nicht benutzen.",print_chat);
		return PLUGIN_HANDLED;
	}
	return PLUGIN_CONTINUE;
}

public HandleSay(HLCommand,HLData,HLUserName,UserIndex) {
	new Data[MAX_DATA_LENGTH];
	new UserName[MAX_NAME_LENGTH];
	convert_string(HLData,Data,MAX_DATA_LENGTH);
	strstripquotes(Data);
	if (GBMode == 1 && strcasestr(Data,"iwantplant") != -1 && UserIndex == Bombcarrier && playerinfo(UserIndex,UserName,MAX_NAME_LENGTH) == 1) {
		noclip(UserName, 0);
		Bombcarrier = -UserIndex;
		execclient(UserName,"weapon_c4");
	}
	return PLUGIN_CONTINUE;
}

public logd_playeraction(HLCommand,HLData,HLUserName,UserIndex) {
	new Data[MAX_DATA_LENGTH];
	new sUserIndex[MAX_NUMBER_LENGTH];
	new UserName[MAX_NAME_LENGTH];
	new UserIndex2 = strtonum(sUserIndex);
	if(GBMode == 1) {
		strsep(Data," ",sUserIndex,MAX_NUMBER_LENGTH,Data,MAX_DATA_LENGTH);
		if(strcmp(Data,"Got_The_Bomb") == 0 || strcmp(Data,"Picked_Up_The_Bomb") == 0) Bombcarrier = UserIndex2;
		else if(strcmp(Data,"Dropped_The_Bomb") == 0 || strcmp(Data,"Planted_The_Bomb") == 0) {
			playerinfo(UserIndex2,UserName,MAX_NAME_LENGTH);
			if(Bombcarrier == -UserIndex2) {
				Noclipaction(UserIndex2,1);
			} else {
				Noclipaction(UserIndex2,0);
			}
			Bombcarrier = 0;
		}
	}
	return PLUGIN_HANDLED;
}

public logd_entergame(HLCommand,HLData,HLUserName,UserIndex) {
	new Data[MAX_DATA_LENGTH];
	if(GBMode == 1) {
		convert_string(HLData,Data,MAX_DATA_LENGTH);
		Noclipaction(strtonum(Data),1);
	}
	return PLUGIN_HANDLED;
}

public logd_roundstart(HLCommand,HLData,HLUserName,UserIndex) {
	new i;
	if(GBMode == 1) {
		for(i=1;i<=maxplayercount();i++) {
			Noclipaction(i,1);
		}
	}
	return PLUGIN_HANDLED;
}

Noclipaction(UserIndex,Noclip = 1) {
	new UserName[MAX_NAME_LENGTH];
	new Text[MAX_TEXT_LENGTH];
	new Dead;
	if(playerinfo(UserIndex,UserName, MAX_NAME_LENGTH,_,_,_,Dead) == 1 && Dead == 0) {
		if(Noclip == 1) {
			noclip(UserName, 1);
			snprintf(Text,MAX_TEXT_LENGTH,"Gh0sTbUsTeR Mode ist aktiviert.\nErlaubte Waffe: %s",AllowedWeapon[7]);
			messageex(UserName,Text,print_tty);
		}
		execclient(UserName,"weapon_knife");
		if(strcmp(AllowedWeapon,"weapon_knife") != 0 && strcmp(AllowedWeapon,"alle") != 0) {
			execclient(UserName,AllowedWeapon);
		}
	}
}

public plugin_init() {
	plugin_registerinfo("Gh0sTbUsTeR Mode","Noclips all players and gives them special commands",STRING_VERSION);
	plugin_registercmd("say_team","HandleSay",ACCESS_ALL);
	plugin_registercmd("admin_gbmode", "admin_gbmode", ACCESS_GB, "admin_gbmode <1|0> Gh0sTbUsTeR Mode: An|aus");
	plugin_registercmd("admin_gb_weapon", "admin_gb_weapon", ACCESS_GB, "admin_gbweapon <^"weapon_xxx^"|^"alle^"> Gh0sTbUsTeR Mode: Einzige erlaubte Waffe|alle Waffen erlaubt");
	plugin_registercmd("logd_gb_entergame", "logd_entergame", ACCESS_CONSOLE);
	plugin_registercmd("logd_gb_playeraction", "logd_playeraction", ACCESS_CONSOLE);
	plugin_registercmd("logd_gb_roundstart", "logd_roundstart", ACCESS_CONSOLE);
	plugin_registerhelp("say_team",ACCESS_ALL,"say_team iwantplant: Schaltet den Noclip-Modus aus, bis die Bombe gelegt oder fallengelassen wird.");
	exec("logd_reg 51 admin_command logd_gb_entergame");
	exec("logd_reg 60 admin_command logd_gb_playeraction");
	exec("logd_reg 62 admin_command logd_gb_roundstart");
	get_vaultnumdata("logd_gb",GBMode);
	set_vaultnumdata("logd_gb",GBMode);
	get_vaultdata("logd_gb_weapon",AllowedWeapon,MAX_NAME_LENGTH);
	if(strncmp(AllowedWeapon,"weapon_",7) != 0) {
		strcpy(AllowedWeapon,"alle",MAX_NAME_LENGTH);
	}
	set_vaultdata("logd_gb_weapon",AllowedWeapon);
	return PLUGIN_CONTINUE;
}

Autor:  DarkEyes1 [ 31.10.2002, 14:25 ]
Betreff des Beitrags: 

:oops:

Autor:  DarkEyes1 [ 31.10.2002, 14:25 ]
Betreff des Beitrags: 

joa, besser, auch die jetzt grafische anzeige unten links... gefällt mir gut... muss aber immer admin_gb_weapon weapon_knife eigeben... dann geht ghostbuster aber noch nicht los... mit admin_gbmode 1 gehts... is aber doppeltgemoppelt... besser wäre mit dem ersten befehl auch den mode zu starten...

:lol:

axo, waffen können immernoch gezogen werden...

:oops:

Autor:  DevilZero [ 01.11.2002, 12:45 ]
Betreff des Beitrags: 

Zitat:
is ja nur vorläufig... @ Devil...

denn: waffen können immer noch gezogen werden(wenn gekauft)...
:cry:
jo stimmt...

@rinde: für messer: admin_restrictmenu 1 2 3 4 5 6 7

für pistols: admin_restrictmenu 2 3 4 5 7
für rifles: admin_restrictmenu 1 2 3 5 6 7

...happy coding...lol

Autor:  Rinde [ 01.11.2002, 15:27 ]
Betreff des Beitrags: 

jaja, ich müsste ein komplettes restrictingsystem einbauen. dafür hab ich leider im moment nicht die zeit unf den nerv. vielleicht nächste woche

Autor:  DarkEyes1 [ 01.11.2002, 18:59 ]
Betreff des Beitrags: 

wir warten gerne @ rinde...
soll ja ein schönes plugin werden... da muss schon alles funktionieren... wenn nur knife erlaubt ist, macht eine usp allen spielspass kaputt... :cry:

also streng dich an... :)

Autor:  Rinde [ 01.11.2002, 20:33 ]
Betreff des Beitrags: 

okay, ich hab jetzt erstmal waffenkaufen komplett unterbunden, und den ganzen waffenkram rausgenommen. wenigstens der knifemode sollte jetzt vernünftig funktionieren. das ist natürlich nur eine zwischenlösung ;)
Code:
/* Gh0sTbUsTeR Mode by Devilzero & Rinde
   Coded by Rinde, Idee & Basecode from Devilzero
   Special THX to: www.adminmod.de
*/

#include <adminlib>

#define ACCESS_GB 8192
#define ACCESS_CONSOLE 131072

new STRING_VERSION[MAX_DATA_LENGTH]= "0.5b 1.11.02 19:59";
new GBMode;
new Bombcarrier = 0;

public admin_gbmode(HLCommand,HLData,HLUserName,UserIndex) {
	new Command[MAX_COMMAND_LENGTH];
	new Data[MAX_DATA_LENGTH];
	new UserName[MAX_NAME_LENGTH];
	convert_string(HLCommand,Command,MAX_NAME_LENGTH);
	convert_string(HLData,Data,MAX_NAME_LENGTH);
	convert_string(HLUserName,UserName,MAX_NAME_LENGTH);
	if(strlen(Data) == 0) {
		snprintf(Data,MAX_TEXT_LENGTH,"^"admin_gbmode^" is ^"%i^"",GBMode);
		selfmessage(Data);
	} else if(check_param(Data) > GBMode) {
		set_vaultdata("logd_gb","1");
		GBMode = 1;
		exec("sv_restartround 10");
		say_command(UserName,Command,Data);
		centersay("Gh0sTbUsTeR Mode startet in 10 Sekunden.",10, 10, 255, 255);
	} else if(check_param(Data) < GBMode) {
		set_vaultdata("logd_gb","0");
		GBMode = 0;
		exec("sv_restartround 10");
		say_command(UserName,Command,Data);
		centersay("Gh0sTbUsTeR Mode vorbei...*sniff*", 12, 10, 255, 255);
	}
	return PLUGIN_HANDLED;
}

public plugin_command(HLCommand,HLData,HLUserName,UserIndex) {
	new Command[MAX_COMMAND_LENGTH];
	new UserName[MAX_NAME_LENGTH];
	convert_string(HLCommand,Command,MAX_COMMAND_LENGTH);
	if(GBMode == 1 && strncmp(Command,"weapon_",7) == 0 && strcmp(Command,"weapon_knife") != 0 && != 0 && (Bombcarrier != -UserIndex || strcmp(Command,"weapon_c4") != 0)) {
		Noclipaction(UserIndex,0);
		messageex(UserName,"Diese Waffe darfst du im Gh0sTbUsTeR Mode nicht benutzen.",print_chat);
		return PLUGIN_HANDLED;
	}
	return PLUGIN_CONTINUE;
}

public HandleSay(HLCommand,HLData,HLUserName,UserIndex) {
	new Data[MAX_DATA_LENGTH];
	new UserName[MAX_NAME_LENGTH];
	convert_string(HLData,Data,MAX_DATA_LENGTH);
	strstripquotes(Data);
	if (GBMode == 1 && strcasestr(Data,"iwantplant") != -1 && UserIndex == Bombcarrier && playerinfo(UserIndex,UserName,MAX_NAME_LENGTH) == 1) {
		noclip(UserName, 0);
		Bombcarrier = -UserIndex;
		execclient(UserName,"weapon_c4");
	}
	return PLUGIN_CONTINUE;
}

public logd_playeraction(HLCommand,HLData,HLUserName,UserIndex) {
	new Data[MAX_DATA_LENGTH];
	new sUserIndex[MAX_NUMBER_LENGTH];
	new UserName[MAX_NAME_LENGTH];
	new UserIndex2 = strtonum(sUserIndex);
	if(GBMode == 1) {
		strsep(Data," ",sUserIndex,MAX_NUMBER_LENGTH,Data,MAX_DATA_LENGTH);
		if(strcmp(Data,"Got_The_Bomb") == 0 || strcmp(Data,"Picked_Up_The_Bomb") == 0) Bombcarrier = UserIndex2;
		else if(strcmp(Data,"Dropped_The_Bomb") == 0 || strcmp(Data,"Planted_The_Bomb") == 0) {
			playerinfo(UserIndex2,UserName,MAX_NAME_LENGTH);
			if(Bombcarrier == -UserIndex2) {
				Noclipaction(UserIndex2,1);
			} else {
				Noclipaction(UserIndex2,0);
			}
			Bombcarrier = 0;
		}
	}
	return PLUGIN_HANDLED;
}

public logd_entergame(HLCommand,HLData,HLUserName,UserIndex) {
	new Data[MAX_DATA_LENGTH];
	if(GBMode == 1) {
		convert_string(HLData,Data,MAX_DATA_LENGTH);
		Noclipaction(strtonum(Data),1);
	}
	return PLUGIN_HANDLED;
}

public logd_roundstart(HLCommand,HLData,HLUserName,UserIndex) {
	new i;
	if(GBMode == 1) {
		for(i=1;i<=maxplayercount();i++) {
			Noclipaction(i,1);
		}
	}
	return PLUGIN_HANDLED;
}

Noclipaction(UserIndex,Noclip = 1) {
	new UserName[MAX_NAME_LENGTH];
	new Dead;
	if(playerinfo(UserIndex,UserName, MAX_NAME_LENGTH,_,_,_,Dead) == 1 && Dead == 0) {
		if(Noclip == 1) {
			noclip(UserName, 1);
			messageex(UserName,"Gh0sTbUsTeR Mode ist aktiviert.",print_tty);
		}
		execclient(UserName,"weapon_knife");
		execclient(UserName,"_cl_autowepswitch 0");
	}
}

public HandleBuy(HLCommand,HLData,HLUserName,UserIndex) {
	new UserName[MAX_NAME_LENGTH];
	convert_string(HLUserName,UserName,MAX_NAME_LENGTH);
	if(GBMode == 1) {
		execclient(UserName,"menuselect 10");
		execclient(UserName,"_cl_autowepswitch 0");
		messageex(UserName,"Du darfst keine Waffen kaufen,^nwenn Gh0sTbUsTeR Mode aktiviert ist.",print_center);
		return PLUGIN_HANDLED;
	}
	return PLUGIN_CONTINUE;
}

public plugin_init() {
	plugin_registerinfo("Gh0sTbUsTeR Mode","Noclips all players and gives them special commands",STRING_VERSION);
	plugin_registercmd("say_team","HandleSay",ACCESS_ALL);
	plugin_registercmd("admin_gbmode", "admin_gbmode", ACCESS_GB, "admin_gbmode <1|0> Gh0sTbUsTeR Mode: An|aus");
	plugin_registercmd("logd_gb_entergame", "logd_entergame", ACCESS_CONSOLE);
	plugin_registercmd("logd_gb_playeraction", "logd_playeraction", ACCESS_CONSOLE);
	plugin_registercmd("logd_gb_roundstart", "logd_roundstart", ACCESS_CONSOLE);
	plugin_registercmd("buy","HandleBuy",ACCESS_ALL);
	plugin_registerhelp("say_team",ACCESS_ALL,"say_team iwantplant: Schaltet den Noclip-Modus aus, bis die Bombe gelegt oder fallengelassen wird.");
	exec("logd_reg 51 admin_command logd_gb_entergame");
	exec("logd_reg 60 admin_command logd_gb_playeraction");
	exec("logd_reg 62 admin_command logd_gb_roundstart");
	if(get_vaultnumdata("logd_gb",GBMode) == 0) set_vaultnumdata("logd_gb",GBMode);
	return PLUGIN_CONTINUE;
}

Autor:  DarkEyes1 [ 01.11.2002, 21:00 ]
Betreff des Beitrags: 

knife reicht ja erstmal... kann ja ruhig mehrere möglichkeiten geben...

ups...: beim kompilieren 3 fehler... wie merz ich die aus? :wink:

man... wie denn nun... Bild

Autor:  Rinde [ 02.11.2002, 13:19 ]
Betreff des Beitrags: 

jaja, ich hab halt keinen compiler gehabt

Autor:  DarkEyes1 [ 02.11.2002, 15:05 ]
Betreff des Beitrags: 

k, funzt soweit... kann man schon schön benutzen...


und?, hast mit dem erweiterten (pistolen usw.) aufgegeben Bild

Autor:  Rinde [ 02.11.2002, 15:12 ]
Betreff des Beitrags: 

nope, aber erstmal nach hinten gestellt, weil das ziemlich aufwändig ist

Seite 2 von 3 Alle Zeiten sind UTC+01:00
Powered by phpBB® Forum Software © phpBB Limited
https://www.phpbb.com/