Ein neues Thema erstellen  Auf das Thema antworten  [ 2 Beiträge ] 
Autor Nachricht
 Betreff des Beitrags: plugin_ejl_sank_dice - Abänderung
BeitragVerfasst: 27.05.2002, 14:43 

Registriert: 09.01.2002, 19:10
Beiträge: 323
Wohnort: Weltstadt "Brech"
Moin Leutz !!!
Ihr kennt doch sicher das plugin_ejl_sank_dice...
Ich habe jetzt mal versucht das ganze ins deutsche zu übersetzen ...
Code:
 /***************************************************************************
 * plugin_ejl_sank_dice.sma                               Date: 03/07/2002
 * See Below for the real credits: thanks once again to Luke Sankey
 *  Modified to be even more fun by:
 *   Eric Lidman           ejlmozart@hotmail.com
 *   Alias: Ludwig van     Server: GNYSO-2
 *
 * Eric's changes are as follows:
 * 
 * Added "ZeusMode" (godmode and noclip combined)
 * Winners of ZeusMode, GodMode, and Noclip will now glow too 
 * Replaced Slay with human time-bomb -- need   admin_fx 1   in server.cfg
 *  In this later version, timebomb can kill bystanders
 * Replaced Slap with slap disease  -- possibly fatal
 * Enhanced Glow by having it potentially affect health  
 * To Stuck I added a slap at the beginning -- looks funnier
 * Dead players cant gamble.
 *
 * Rolls have changed from below, no need to go into detail.
 **************************************************************************/

/***************************************************************************
 * plugin_sank_dice.sma
 * Author: Luke Sankey
 * Date November 27, 2001
 * Last Modified: December 4, 2001
 *
 * Fuctionality of this plugin:
 * It is a fun plugin to play dice. Users may gamble when admin_dice is set.
 * The sum of the numbers rolled determines what their fate is. The rewards
 * are as follows:
 *  2 or 12 Godmode
 *  3 or 11 Noclip
 *  4 or 10 Stuck
 *  5 or 9  Glow
 *  6 or 8  Slap
 *  7       Death
 *
 * My most deepest thanks goes to [SCR]Lightfoot-TA- (lightfoot_sf@yahoo.ca)
 * for he was the one who wrote the original, however buggy it may have been.
 ***************************************************************************/

// Functions included in this plugin
//  admin_dice <on|off>
//  say "roll the dice" or "I feel lucky"

// Access required to enable gambling
#define ACCESS_DICE 512

// Time of rewards, in seconds
#define GODMODE_TIME 20
#define NOCLIP_TIME 20
#define STUCK_TIME 10
#define GLOW_TIME 15
#define DISEASE1_TIME 6
#define DISEASE2_TIME 3
#define DISEASE3_TIME 12
#define TIMEBOMB_TIME 20
#define ZEUSMODE_TIME 25

// Delay required between gambling, in seconds
#define GAMBLE_DELAY 40


/****************************************************************************/
/****************************************************************************/
/************** DO NOT MODIFY CONTENTS BELOW THIS LINE !!! ******************/
/************** DO NOT MODIFY CONTENTS BELOW THIS LINE !!! ******************/
/************** DO NOT MODIFY CONTENTS BELOW THIS LINE !!! ******************/
/****************************************************************************/
/****************************************************************************/

#include <core>
#include <console>
#include <string>
#include <admin>
#include <adminlib>

new STRING_VERSION[MAX_DATA_LENGTH] = "2.51";

// Global variables indicating if dice games are enabled or not
new bool:bGamesEnabled = true;
new bool:bIsGambling = false;
new LastGambleTime[MAX_PLAYERS+1];

new iTimebomb_Timer = 0;
new BlowUpEarly = 0;
new BombCorrectGuy;
new BOMBKILL_RANGE = 500;

/****************************************************************************/
/************************** Plugin Entry Point ******************************/
/****************************************************************************/

public plugin_init() 
{
	plugin_registerinfo("Wuerfel-Casino Plugin", "Wuefel um zu gewinnen!.", STRING_VERSION);
	
	plugin_registercmd("say", "HandleSay", ACCESS_ALL);
	plugin_registercmd("admin_dice", "admin_dice", ACCESS_DICE, "admin_dice <on|off>: Schaltet das Wuerfel-Casino ein|aus.");
	return PLUGIN_CONTINUE;
}

public plugin_connect(HLUserName, HLIP, UserIndex)
{
	if (UserIndex >= 1 && UserIndex <= MAX_PLAYERS)
		LastGambleTime[UserIndex] = 0;

	return PLUGIN_CONTINUE;
}

/****************************************************************************/
/************************** User called functions ***************************/
/****************************************************************************/

public admin_dice(HLCommand, HLData, HLUserName, UserIndex) 
{
	new Data[MAX_DATA_LENGTH];
	new User[MAX_NAME_LENGTH];
	new Text[MAX_TEXT_LENGTH];

	new Red = random(256);
	new Green = random(256);
	new Blue = random(256);
	
	convert_string(HLData, Data, MAX_COMMAND_LENGTH);
	convert_string(HLUserName, User, MAX_NAME_LENGTH);

	if (check_param(Data) == 1)
	{
		bGamesEnabled = true;
		snprintf(Text, MAX_TEXT_LENGTH, "Lasst die Wuerfel-Spiele beginnen!");
		centersay(Text, 5, Red, Green, Blue);
	}
	else 
	{
		bGamesEnabled = false;
		snprintf(Text, MAX_TEXT_LENGTH, "Das Wuerfel-Casino ist nun geschlossen.");
		centersay(Text, 5, Red, Green, Blue);
	}

	snprintf(Text, MAX_TEXT_LENGTH, "admin_dice %d", bGamesEnabled);
	selfmessage(Text);

	return PLUGIN_HANDLED;
}

public HandleSay(HLCommand, HLData, HLUserName, UserIndex) 
{
	new Data[MAX_DATA_LENGTH];
	new User[MAX_NAME_LENGTH];
	new Text[MAX_TEXT_LENGTH];
	new Roll;

	new Red = random(256);
	new Green = random(256);
	new Blue = random(256);

	new X;
	new Y;
	new Z;

	convert_string(HLData, Data, MAX_DATA_LENGTH);
	convert_string(HLUserName, User, MAX_NAME_LENGTH);
	
	// Remove quotes, if there are any
	strstripquotes(Data);

	if ( ((strcasecmp(Data, "zocken") == 0) || (strcasecmp(Data, "wuerfeln") == 0))
		&& (bGamesEnabled == true) )
	{
		new Name[MAX_NAME_LENGTH];
		new SessionID, WONID;
		new UserTeam, UserDead;
		if (playerinfo(UserIndex, Name, MAX_NAME_LENGTH, SessionID, WONID, UserTeam, UserDead)){
		// check to see if player is trying to gamble while dead
		if (UserDead != 0){
			messageex(User, "<Wuerfel-Masta> Tote koenen nicht wuerfeln.", print_chat);
			return PLUGIN_CONTINUE;
				}
		else if (UserDead !=1){
		new CurTime = systemtime();

		// Limit gambling frequency
		if (CurTime < (LastGambleTime[UserIndex] + GAMBLE_DELAY))
		{
			messageex(User, "<Wuerfel-Masta> Du hast gerade erst gezockt. Gib den anderen doch auch eine Chance.", print_chat);
			return PLUGIN_CONTINUE;
		}
		else if (bIsGambling == true)
		{
			messageex(User, "<Wuerfel-Masta> Bin gerade beschaeftigt. Warte kurz.", print_chat);
			return PLUGIN_CONTINUE;
		}
		else
		{
			// Roll the dice
			new Dieone = random(6);
			Dieone++;
			new Dietwo = random(6);
			Dietwo++;

			// Calculate the total roll
			Roll = Dieone + Dietwo;

			snprintf(Text, MAX_TEXT_LENGTH, "<Wuerfel-Masta> %s hat [%d] [%d] gewuerfelt", User, Dieone, Dietwo);
			say(Text);

			if ((Roll == 2) || (Roll == 12))
			{
				bIsGambling = true;

				snprintf(Text, MAX_TEXT_LENGTH, "<Wuerfel-Masta> Glueckwunsch, %s hat den Godmode gewonnen!", User);
				godmode(User, 1);
				glow(User, Red, Green, Blue);
				set_timer("Godmode_Timer", 1, GODMODE_TIME);
				snprintf(Text, MAX_TEXT_LENGTH, "Godmode Gewiner:^n%s!!", User);
				centersay(Text, 3, Red, Green, Blue);
			}
			else if (Roll == 9)
			{
			// ZeusMode is noclip, godmode, and glow all rolled into one. Loads of fun.
				bIsGambling = true;
				snprintf(Text, MAX_TEXT_LENGTH, "<Wuerfel-Masta> Whoa, %s hat den ZeusMode gewonnen! (Godmode und Noclip zusammen)", User);
				godmode(User, 1);
				noclip(User, 1);
				glow(User, Red, Green, Blue);
				set_timer("Zeusmode_Timer", 1, ZEUSMODE_TIME);
				snprintf(Text, MAX_TEXT_LENGTH, "ZeusMode Gewinner:^n%s!!", User);
				centersay(Text, 3, Red, Green, Blue);
			}
			else if (Roll == 4)
			{
				bIsGambling = true;

				snprintf(Text, MAX_TEXT_LENGTH, "<Wuerfel-Masta> Glueckwunsch, %s hat Noclip gewonnen!", User);
				noclip(User, 1);
				glow(User, Red, Green, Blue);
				set_timer("Noclip_Timer", 1, NOCLIP_TIME);
				snprintf(Text, MAX_TEXT_LENGTH, "Noclip Gewinner:^n%s!!", User);
				centersay(Text, 3, Red, Green, Blue);
			}
			else if (Roll == 10)
			{
				bIsGambling = true;

				snprintf(Text, MAX_TEXT_LENGTH, "<Wuerfel-Masta> %s hat verloren, und steckt fest!", User);
				slap(User);
				get_userorigin(User, X, Y, Z);
				Z -= 40;
				teleport(User, X, Y, Z);
				set_timer("Stuck_Timer", 1, STUCK_TIME);
			}
			else if ((Roll == 5) || (Roll == 8))
			{
			// Glowing isnt enough, we need an edge to it. Its gotta be dangerous to be fun.
				bIsGambling = true;

				snprintf(Text, MAX_TEXT_LENGTH, "<Wuerfel-Masta> Sauba, %s glueht! Aber ist Gluehen so gesund?", User);
				glow(User, Red, Green, Blue);
				set_timer("Glow_Timer", 1, GLOW_TIME);
			}
			else if (Roll == 3)
			{
			// Slap disease. LOL. 3 different varieties
				bIsGambling = true;
				snprintf(Text, MAX_TEXT_LENGTH, "<Wuerfel-Masta> %s wurde mit dem toedlichen Slap infiziert!", User);
				slap(User);
				set_timer("Disease1_Timer", 1, DISEASE1_TIME);
			}
			else if (Roll == 6)
			{
				bIsGambling = true;
				snprintf(Text, MAX_TEXT_LENGTH, "<Wuerfel-Masta> %s wurde mit dem toedlichen Slap infiziert!", User);
				slap(User);
				set_timer("Disease2_Timer", 1, DISEASE2_TIME);
			}
			else if (Roll == 11)
			{
				bIsGambling = true;
				snprintf(Text, MAX_TEXT_LENGTH, "<Wuerfel-Masta> %s wurde mit dem toedlichen Slap infiziert!", User);
				slap(User);
				set_timer("Disease3_Timer", 1, DISEASE3_TIME);
			}
			else if (Roll == 7)
			{
			// Ahh, the timebomb.
				BombCorrectGuy = UserIndex;
				bIsGambling = true;
				snprintf(Text, MAX_TEXT_LENGTH, "<Wuerfel-Masta>  %s ist eine menschliche Zeitbombe! Rette sich wer kann!", User);
				// set up a loop to tell all players about the bomb with half-life sounds
				new i;
				new iMaxPlayers = maxplayercount();
				for (i = 1; i <= iMaxPlayers; i++) {
					if (playerinfo(i,Name,MAX_NAME_LENGTH) == 1) {
   						execclient(Name, "speak ^"warning _comma detonation device activated. Move your ass and get away^"");
					}
				}
				glow(User, Red, Green, Blue);
				iTimebomb_Timer = set_timer("Timebomb_Timer", 1, TIMEBOMB_TIME);	
			}
			LastGambleTime[UserIndex] = CurTime;
			say(Text);
			}
		}
		return PLUGIN_CONTINUE;
	}
}
	return PLUGIN_CONTINUE;
}

/****************************************************************************/
/*************************** Timer Functions ********************************/
/****************************************************************************/


public Glow_Timer(Timer, Repeat, HLUserName, HLParam)
{
	new Text[MAX_TEXT_LENGTH];
	new User[MAX_NAME_LENGTH];

	new Red = random(256);
	new Green = random(256);
	new Blue = random(256);
	
	convert_string(HLUserName, User, MAX_NAME_LENGTH);

	if (Repeat-1 == 0)
	{
	// gowing itself can be a gamble -- 9 percent chance of death
		glow(User, 0, 0, 0);
		new rand = random(11);
		switch(rand)
		{
			case 0: say ("Puh, nochmal davon gekommen.");
			case 1: say ("Puh, nochmal davon gekommen.");
			case 2: {
				slap(User);
				say("Aua, das glueht ja richtig.");
				}
			case 3: say ("Puh, nochmal davon gekommen.");
			case 4: say ("Puh, nochmal davon gekommen.");
			case 5: {
				slay(User);
				say("Gluehen ist nicht gesund.");
				}
			case 6: say ("Puh, nochmal davon gekommen.");
			case 7: {
				slap(User);
				say("Aua, das glueht ja richtig.");
				}
			case 8: say ("Puh, nochmal davon gekommen.");
			case 9: say ("Puh, nochmal davon gekommen.");
			case 10: say ("Puh, nochmal davon gekommen.");
		}
		snprintf(Text, MAX_TEXT_LENGTH, "%s glueht nicht mehr.", User);
		bIsGambling = false;
	}
	else
	{
		glow(User, Red, Green, Blue);
		snprintf(Text, MAX_TEXT_LENGTH, "%s glueht noch %d Sek.", User, Repeat-1);
	}

	typesay(Text, 1, Red, Green, Blue);
}

public Godmode_Timer(Timer, Repeat, HLUserName, HLParam)
{
	new Text[MAX_TEXT_LENGTH];
	new User[MAX_NAME_LENGTH];

	new Red = random(256);
	new Green = random(256);
	new Blue = random(256);
	
	convert_string(HLUserName, User, MAX_NAME_LENGTH);

	if (Repeat-1 == 0)
	{
		glow(User, 0, 0, 0);
		godmode(User, 0);
		snprintf(Text, MAX_TEXT_LENGTH, "%s ist nicht mehr im GodMode", User);
		bIsGambling = false;
	}
	else
	{
		glow(User, Red, Green, Blue);
		snprintf(Text, MAX_TEXT_LENGTH, "%s besitzt den GodMode noch %d Sek.", User, Repeat-1);
	}

	typesay(Text, 1, Red, Green, Blue);
}

public Zeusmode_Timer(Timer, Repeat, HLUserName, HLParam)
{
	new Text[MAX_TEXT_LENGTH];
	new User[MAX_NAME_LENGTH];

	new Red = random(256);
	new Green = random(256);
	new Blue = random(256);
	
	convert_string(HLUserName, User, MAX_NAME_LENGTH);

	if (Repeat-1 == 0)
	{
		godmode(User, 0);
		noclip(User, 0);
		glow(User, 0, 0, 0);
		snprintf(Text, MAX_TEXT_LENGTH, "%s ist nicht mehr im ZeusMode", User);
		bIsGambling = false;
	}
	else
	{
		glow(User, Red, Green, Blue);
		snprintf(Text, MAX_TEXT_LENGTH, "%s besitzt den ZeusMode noch %d Sek.", User, Repeat-1);
	}

	typesay(Text, 1, Red, Green, Blue);
}

public Noclip_Timer(Timer, Repeat, HLUserName, HLParam) 
{
	new Text[MAX_TEXT_LENGTH];
	new User[MAX_NAME_LENGTH];

	new Red = random(256);
	new Green = random(256);
	new Blue = random(256);
	
	convert_string(HLUserName, User, MAX_NAME_LENGTH);

	if (Repeat-1 == 0)
	{
		noclip(User, 0);
		glow(User, 0, 0, 0);
		snprintf(Text, MAX_TEXT_LENGTH, "%s ist nicht mehr im Noclip-Mode", User);
		bIsGambling = false;
	}
	else
	{
		glow(User, Red, Green, Blue);
		snprintf(Text, MAX_TEXT_LENGTH, "%s besitzt Noclip noch %d Sek.", User, Repeat-1);
	}

	typesay(Text, 1, Red, Green, Blue);
}

public Stuck_Timer(Timer, Repeat, HLUserName, HLParam) 
{
	new Text[MAX_TEXT_LENGTH];
	new User[MAX_NAME_LENGTH];

	new Red = random(256);
	new Green = random(256);
	new Blue = random(256);

	new X;
	new Y;
	new Z;
	
	convert_string(HLUserName, User, MAX_NAME_LENGTH);

	if (Repeat-1 == 0)
	{
		get_userorigin(User, X, Y, Z);
		Z += 50;
		teleport(User, X, Y, Z);
		snprintf(Text, MAX_TEXT_LENGTH, "%s ist wieder frei.", User);
		bIsGambling = false;
	}
	else
	{
		snprintf(Text, MAX_TEXT_LENGTH, "%s steckt noch fuer %d Sek. fest.", User, Repeat-1);
	}

	typesay(Text, 1, Red, Green, Blue);
}

public Disease1_Timer(Timer, Repeat, HLUserName, HLParam) 
{
	new Text[MAX_TEXT_LENGTH];
	new User[MAX_NAME_LENGTH];

	new Red = random(256);
	new Green = random(256);
	new Blue = random(256);

	
	convert_string(HLUserName, User, MAX_NAME_LENGTH);

	if (Repeat-1 == 0)
	{
		// set up the random possibility of being slayed after being slapped around
		new rand = random(2);
		switch(rand)
		{
			case 0: {
				snprintf(Text, MAX_TEXT_LENGTH, "%s ist vom Slap befreit.", User);
				typesay(Text, 1, Red, Green, Blue);				
				say("Der Slap kann manchmal ganz schoen gefaehrlich werden.");
				bIsGambling = false;
				}
			case 1: {
				slay(User);
				snprintf(Text, MAX_TEXT_LENGTH, "Der Slap toetete %s", User);
				typesay(Text, 1, Red, Green, Blue);				
				say("Der Slap wird sich ein anderes Opfer suchen.");
				bIsGambling = false;
				}
		}
	}
	else
	{
		slap(User);
		snprintf(Text, MAX_TEXT_LENGTH, "%s hat den Slap noch %d Sek.", User, Repeat-1);
		typesay(Text, 1, Red, Green, Blue);
	}
}

public Disease2_Timer(Timer, Repeat, HLUserName, HLParam) 
{
	new Text[MAX_TEXT_LENGTH];
	new User[MAX_NAME_LENGTH];

	new Red = random(256);
	new Green = random(256);
	new Blue = random(256);

	
	convert_string(HLUserName, User, MAX_NAME_LENGTH);

	if (Repeat-1 == 0)
	{
		snprintf(Text, MAX_TEXT_LENGTH, "%s ist vom Slap befreit.", User);
		typesay(Text, 1, Red, Green, Blue);				
		say("Der Slap kann manchmal ganz schoen gefaehrlich werden.");
		bIsGambling = false;
	}
	else
	{
		slap(User);
		snprintf(Text, MAX_TEXT_LENGTH, "%s hat den Slap noch %d Sek.", User, Repeat-1);
		typesay(Text, 1, Red, Green, Blue);
	}
}

public Disease3_Timer(Timer, Repeat, HLUserName, HLParam) 
{
	new Text[MAX_TEXT_LENGTH];
	new User[MAX_NAME_LENGTH];

	new Red = random(256);
	new Green = random(256);
	new Blue = random(256);

	
	convert_string(HLUserName, User, MAX_NAME_LENGTH);

	if (Repeat-1 == 0)
	{
		snprintf(Text, MAX_TEXT_LENGTH, "%s ist vom Slap befreit.", User);
		typesay(Text, 1, Red, Green, Blue);				
		say("Der Slap kann manchmal ganz schoen gefaehrlich werden.");
		bIsGambling = false;
	}
	else
	{
		slap(User);
		snprintf(Text, MAX_TEXT_LENGTH, "%s hat den Slap noch %d Sek.", User, Repeat-1);
		typesay(Text, 1, Red, Green, Blue);
	}
}


public Timebomb_Timer(Timer, Repeat, HLUserName, HLParam) 
{
	new Text[MAX_TEXT_LENGTH];
	new User[MAX_NAME_LENGTH];
	new Countdown[MAX_TEXT_LENGTH];
	new i;
	new iMaxPlayers = maxplayercount();
	new Name[MAX_NAME_LENGTH];
	new COUNTSPEAK[MAX_TEXT_LENGTH];
	new C4_SOUND[MAX_TEXT_LENGTH];
	new C4_BEEP[MAX_TEXT_LENGTH];

	new Dead;
	new maxplayers = maxplayercount();
	new SessionID;
	new Team;
	new WONID;
	new x,y,z;
	new X,Y,Z;

	new Red = random(256);
	new Green = random(256);
	new Blue = random(256);
	
	convert_string(HLUserName, User, MAX_NAME_LENGTH);

	// go right to the blowup part if player is dead (blowupearly=1)
	if (BlowUpEarly == 1){
		Repeat = 1;
	}

	if (Repeat-1 == 0)
	{
	// set up a loop to find out where everyone is. Too close to the bomb and we kill them.
		for (i=1; i<=maxplayers; i++) {
			if( playerinfo(i,Name,MAX_NAME_LENGTH,SessionID,WONID,Team,Dead)!=0){
				// we ignore dead players
				if(i == BombCorrectGuy){
					User = Name;
				}
				// find em --- X is bomb   x is all other players 1 at a time
				get_userorigin(User, X, Y, Z);
				get_userorigin(Name,x,y,z);
				if( ! (X-x > BOMBKILL_RANGE || X-x < - BOMBKILL_RANGE || 
				   Y-y > BOMBKILL_RANGE || Y-y < - BOMBKILL_RANGE ||
				   Z-z > BOMBKILL_RANGE || Z-z < - BOMBKILL_RANGE) ){
					if(Dead==0) {
						messageex(Name, "<Server>  Sorry, die menschliche Bombe toetete dich.", print_chat);			 
						slay(Name);
						}
					}
				}
			}
		snprintf(Text, MAX_TEXT_LENGTH, "%s ist explodiert.", User);
		BombCorrectGuy = 0;
		glow(User, 0, 0, 0);
		bIsGambling = false;
		BlowUpEarly = 0;
		kill_timer(iTimebomb_Timer);
	}
	else
	{
		// gotta love this countdown
		// find out if the bomb guy is dead and set blowupearly to 1 if he is dead
		// if timer is higer than 13, them only one beep per second from c4 timer 
		if (Repeat >= 13){
			for (i = 1; i <= iMaxPlayers; i++) {
				if (playerinfo(i,Name,MAX_NAME_LENGTH, SessionID, WONID, Team, Dead) == 1) {
					if (!strcmp(User, Name)){
						if (Dead != 0){
							BlowUpEarly = 1;
						}
					}
					// find everyone X is bomb, x is everyone else (one at a time)
					// tells who should hear the c4 timer and then makes them hear it
					get_userorigin(User, X, Y, Z);
					get_userorigin(Name,x,y,z);
					if( ! (X-x > BOMBKILL_RANGE || X-x < - BOMBKILL_RANGE || 
					   Y-y > BOMBKILL_RANGE || Y-y < - BOMBKILL_RANGE ||
					   Z-z > BOMBKILL_RANGE || Z-z < - BOMBKILL_RANGE) ){
						playsound(Name, "weapons/c4_beep1.wav");
					}

				}
			}
			snprintf(Text, MAX_TEXT_LENGTH, "%s wird in %d Sek. explodieren", User, Repeat-1);
			glow(User, Red, Green, Blue);
			typesay(Text, 1, Red, Green, Blue);	
			return PLUGIN_CONTINUE;
		}
		// tell what words to say during countdown
		// set the c4 beep sound to get more intense as timer progresses
		if (Repeat == 12){
			strcpy(Countdown, "remaining", 20);
			strcpy(C4_BEEP, "weapons/c4_beep1.wav", 30);
		}
		if (Repeat == 11){
			strcpy(Countdown, "ten", 10);
			strcpy(C4_BEEP, "weapons/c4_beep1.wav", 30);
		}
		if (Repeat == 10){
			strcpy(Countdown, "nine", 10);
			strcpy(C4_BEEP, "weapons/c4_beep1.wav", 30);
		}
		if (Repeat == 9){
			strcpy(Countdown, "eight", 10);
			strcpy(C4_BEEP, "weapons/c4_beep1.wav", 30);
		}
		if (Repeat == 8){
			strcpy(Countdown, "seven", 10);
			strcpy(C4_BEEP, "weapons/c4_beep2.wav", 30);
		}
		if (Repeat == 7){
			strcpy(Countdown, "six", 10);
			strcpy(C4_BEEP, "weapons/c4_beep2.wav", 30);
		}
		if (Repeat == 6){
			strcpy(Countdown, "five", 10);
			strcpy(C4_BEEP, "weapons/c4_beep4.wav", 30);
		}
		if (Repeat == 5){
			strcpy(Countdown, "four", 10);
			strcpy(C4_BEEP, "weapons/c4_beep4.wav", 30);
		}
		if (Repeat == 4){
			strcpy(Countdown, "three", 10);
			strcpy(C4_BEEP, "weapons/c4_beep4.wav", 30);
		}
		if (Repeat == 3){
			strcpy(Countdown, "two", 10);
			strcpy(C4_BEEP, "weapons/c4_beep5.wav", 30);
		}
		if (Repeat == 2){
			strcpy(Countdown, "one", 10);
			strcpy(C4_BEEP, "weapons/c4_beep5.wav", 30);
		}
		if (Repeat == 1){
			return PLUGIN_CONTINUE;
		}

		snprintf(COUNTSPEAK, MAX_DATA_LENGTH, "speak ^"fvox/%s^"", Countdown);
		snprintf(C4_SOUND, MAX_DATA_LENGTH, "^"%s^"", C4_BEEP);
		// two birds with one stone in this loop
		// we speak the words to all the clients, and find out if our bomb is dead so we can
		// blow him up early and skip the rest of the countdown
		for (i = 1; i <= iMaxPlayers; i++) {
			if (playerinfo(i,Name,MAX_NAME_LENGTH, SessionID, WONID, Team, Dead) == 1) {
				if(i == BombCorrectGuy){
					User = Name;
				}
				if (!strcmp(User, Name)){
					if (Dead != 0){
						BlowUpEarly = 1;
					}
				}
				// find everyone X is bomb, x is everyone else (one at a time)
				// find out who should hear the c4 timer sound then make them hear it
				get_userorigin(User, X, Y, Z);
				get_userorigin(Name,x,y,z);
				if( ! (X-x > BOMBKILL_RANGE || X-x < - BOMBKILL_RANGE || 
				   Y-y > BOMBKILL_RANGE || Y-y < - BOMBKILL_RANGE ||
				   Z-z > BOMBKILL_RANGE || Z-z < - BOMBKILL_RANGE) ){
					playsound(Name, C4_SOUND);
				}
				execclient(Name, COUNTSPEAK);
			}
		}
		snprintf(Text, MAX_TEXT_LENGTH, "%s wird in %d Sek. explodieren", User, Repeat-1);
		glow(User, Red, Green, Blue);
		typesay(Text, 1, Red, Green, Blue);	
	}
	return PLUGIN_CONTINUE;
}
von der grammatischen und sinnlichen Richtigkeit abgesehen.......

DIE FRAGE
Ich möchte die Stichwörter zum Auslösen ändern ...
Nur KA wie ...... hab das noch nie gemacht ...
Und zwar in 'zocken' oder 'wuerfeln' ..
Wen ich mir das so anschaue denk ich man muss
Code:
// Remove quotes, if there are any
	strstripquotes(Data);

	if ( ((strcasecmp(Data, "roll the dice") == 0) || (strcasecmp(Data, "i feel lucky") == 0))
		&& (bGamesEnabled == true) )
umändern in:
Code:
// Remove quotes, if there are any
	strstripquotes(Data);

	if ( ((strcasecmp(Data, "zocken") == 0) || (strcasecmp(Data, "wuerfeln") == 0))
		&& (bGamesEnabled == true) )
Stimt das so ?
Ich hab doch KEINE AHNUNG :oops:

_________________
D@T@
Rechtschreibfähler könnt ihr behalten, mit Kassenbon zurückgeben oder meinen Deutsch-Lehrer dafür verantwortlich machen !!!


Zuletzt geändert von D@T@ am 27.05.2002, 19:02, insgesamt 1-mal geändert.

Nach oben
   
BeitragVerfasst: 27.05.2002, 17:49 

Registriert: 26.12.2001, 01:00
Beiträge: 17
Stimmt, es ist einfach nur ob der User genau sagt, du koenntest sogar noch ein wörtchen mit der selben technik dranhängen :P


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 ]"