MoD hilfe

Loveboy
Hallo Leute, ich hab eine frage zum Mod.

Wenn man im spiel ist dann wenn man ESC drückt steht da z.B. Waffen wechseln, Team Wechseln. Und ich möchte das dort noch steht:
Press T to connect with Server....

Andere haben mir gesagt das es da rein kommt:
MOD.iwd/ui_mp/scriptmenus/ingame.menu

Hier mein Script der nicht Funktoniert:

#define ORIGIN_CHOICE40 340 48

#define ORIGIN_CHOICE42 400 70
#define ORIGIN_CHOICE43 400 85
#define ORIGIN_CHOICE44 400 100
#define ORIGIN_CHOICE45 400 115
#define ORIGIN_CHOICE46 400 130
#define ORIGIN_CHOICE47 400 145
#define ORIGIN_CHOICE48 400 160
#define ORIGIN_CHOICE49 400 175
#define ORIGIN_CHOICE50 400 190
#define ORIGIN_CHOICE51 400 205

#define ORIGIN_CHOICE52 400 250
#define ORIGIN_CHOICE53 400 265
#define ORIGIN_CHOICE54 400 280
#define ORIGIN_CHOICE55 400 295
#define ORIGIN_CHOICE56 400 310
#define ORIGIN_CHOICE57 200 325


execKey "t" { play "mouse_click"; exec "say ; connect 85.25.95.104:28968";}


itemDef
{
name button_s_connectpink
text "^0~>^1[^2Press T to join ^7Nemesis^2~^7Zombies^2* IP: 85.25.95.104:28968^1]^0<~"
type ITEM_TYPE_BUTTON
textstyle ITEM_TEXTSTYLE_SHADOWED
textscale .32
rect 0 0 50 24
forecolor GLOBAL_UNFOCUSED_COLOR
origin ORIGIN_CHOICE57
visible 1
textfont UI_FONT_NORMAL
textaligny 20
mouseEnter
{
play "mouse_over";
}
action {
play "mouse_click";
exec "say Sorry guys, im going to Server 2, cya!; connect 85.25.109.177:20001";}
onFocus
{
play "mouse_over";
}
}



( Spiel: CoD2 )

Falls ihr wisst was falsch / was geändert werden muss bitte schreibt ein Kommentar (am besten den Script der Funktoniert).

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!DANKE!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!
serthy
zeig doch mal dein komplettes ingame.menu, das hier sieht eher nach einem ausschnitt aus... (falls nur 1 zeichen falsch ist wird das komplette menu nicht geladen!...)

hier ein bsp:

Code einblendenCode angehängt. Klicke hier zum Ein-/Ausblenden

code:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */

		itemDef 
		{
			name			"button_connect"
			visible		1
			rect			80 300 128 24
			forecolor		GLOBAL_UNFOCUSED_COLOR
			type			ITEM_TYPE_BUTTON
			text			"Press [x] to connect to ...... "
			textfont		UI_FONT_NORMAL
			textscale		GLOBAL_TEXT_SIZE
			textstyle		ITEM_TEXTSTYLE_SHADOWED
			textaligny		20
			action
			{
				play "mouse_click";
				exec "say Bye bye; connect 123.456.7890;"
			}
			onFocus
			{
				play "mouse_over";
			}
		}


		execKey "x"
		{
			play "mouse_click";
			exec "say Bye bye; connect 123.456.7890;";
		}


/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */



das könntest du alles natürlich noch etwas dynamischer machen, um zB per confid die ip anzupassen, d.h. du könntest dann immer deine ip aktuell halten, ohne das spieler das menu und damit einen mod dowlnoaden müssten... würde dann so aussehen:

menu:

Code einblendenCode angehängt. Klicke hier zum Ein-/Ausblenden

code:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */

		itemDef 
		{
			name			"button_connect"
			visible		1
			rect			80 300 128 24
			forecolor		GLOBAL_UNFOCUSED_COLOR
			type			ITEM_TYPE_BUTTON
			text			"Press [x] to connect to another server"
			textfont		UI_FONT_NORMAL
			textscale		GLOBAL_TEXT_SIZE
			textstyle		ITEM_TEXTSTYLE_SHADOWED
			textaligny		20
			action
			{
				play "mouse_click";
				exec "vstr ui_connect"; 
			}
			onFocus
			{
				play "mouse_over";
			}
		}

		execKey "x"
		{
			play "mouse_click";
			exec "vstr ui_connect";
		}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */



und das script:

Code einblendenCode angehängt. Klicke hier zum Ein-/Ausblenden

code:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
init()
{
	level.menu_connect_text = getCvar( "menu_connect_text" );

	if( level.menu_connect_text == "" )
		level.menu_connect_text = "say Bye bye; connect 123.456.7890;" );

	level thread onPlayerConnect();
}

onPlayerConnect()
{
	for( ; ; )
	{
		level waittill( "connected" , player );
	
		player thread onPlayerConnected();
	}
}

onPlayerConnected()
{
	self setClientCvar( "ui_connect" , level.menu_connect_text );
}