1. General

    1. Announcements

      The latest news and updates about CoD4x

      579
      posts
  2. CoD4x Server

    1. General.

      Everything that does not fit another category

      847
      posts
    2. Questions

      Discussions related to the Cod4X server, NOT scripting, NOT modding

      3981
      posts
    3. 1634
      posts
    4. Your Servers

      Advertise your CoD4x Server

      370
      posts
  3. CoD4x Client

    1. General.

      Everything that does not fit another category

      281
      posts
    2. Questions

      Discussions related to the Cod4X client

      1181
      posts
    3. Bugs & Feature requests

      Bug & Feature requests for the Cod4X client

      1389
      posts
  4. Server Plugins and Management Tools

    1. Plugin releases

      Releases and downloads of plugins written for the Cod4X server
      126
      posts
    2. Plugin requests

      Request a Cod4X server plugin
      241
      posts
    3. Plugin discussion

      Discussions related to Cod4X server plugins and coding in C/C++
      658
      posts
    4. Management Tools

      Discussions about B3, XLR, MAM, Ultrastats, etc. go here

      1060
      posts
  5. Mods & Scripts

    1. GSC Script Releases

      Releases and downloads of server-side mods for Cod4X

      1083
      posts
    2. Mod releases

      Releases and downloads of client-side mods for Cod4X

      130
      posts
    3. Questions & Requests

      Questions related to Cod4 mod writing and GSC coding

      3069
      posts
    4. Tutorials & Resources

      Show us how its done!

      107
      posts
  6. Custom maps

    1. Map releases

      Releases and downloads of custom maps
      52
      posts
    2. Map requests

      Request new custom maps
      17
      posts
    3. Map discussion

      Discussions about custom map making and designing
      53
      posts
  7. Miscellaneous

    1. Cod4

      Anything not specific to Cod4X. Think of screenshots, videos, etc
      1062
      posts
  • Who's Online   4 Members, 0 Anonymous, 44 Guests (See full list)

  • Posts

    • This is the button code i used in my mod

      
      Quote
      itemDef
              {
                  rect                      -20 130 300 22 HORIZONTAL_ALIGN_SUBLEFT VERTICAL_ALIGN_SUBTOP
                  borderSize                1
                  foreColor                 1 1 1 1
                  backColor                 0 0 0 0
                  borderColor               0 0 0 0
                  outlineColor              0 0 0 0
                  type                      ITEM_TYPE_BUTTON
                  textFont                  UI_FONT_OBJECTIVE
                  textAlign                 ITEM_ALIGN_MIDDLE_RIGHT
                  textAlignX                -25
                  textScale                 0.39
                  textStyle                 ITEM_TEXTSTYLE_SHADOWED
                  text                      "^5Auto assign ^1<"
                  action                    { play mouse_click ; scriptMenuResponse autoassign ; ;  }
                  onFocus                   { play mouse_over ; setLocalVarString ui_choicegroup play_class_marines_flipped ; setLocalVarInt ui_highlight_main 3 ; ;  }
                  leaveFocus                { setLocalVarInt ui_highlight_main 0 ;  }
                  exp                       material ( ( ( "menu_button_backg" ) ) );
                  visible                   when ( ( ! localvarbool( "ui_hideBack" ) && dvarint( "evox_oldschool" ) != 1 ) )
              }
              itemDef
              {
                  rect                      -20 230 300 22 HORIZONTAL_ALIGN_SUBLEFT VERTICAL_ALIGN_SUBTOP
                  style                     WINDOW_STYLE_SHADER
                  borderSize                1
                  foreColor                 0.445 0.457 0.527 1
                  backColor                 0 0 0 0
                  borderColor               0 0 0 0
                  outlineColor              0 0 0 0
                  background                "menu_button_backg"
                  textScale                 0.55
                  visible                   when ( ( ( localvarint( "ui_highlight_main" ) == 4 ) && dvarint( "evox_oldschool" ) != 1 ) )
                  decoration                
              }
              itemDef
              {
                  rect                      -20 230 300 22 HORIZONTAL_ALIGN_SUBLEFT VERTICAL_ALIGN_SUBTOP
                  style                     WINDOW_STYLE_SHADER
                  borderSize                1
                  foreColor                 0.445 0.457 0.527 0.4
                  backColor                 0 0 0 0
                  borderColor               0 0 0 0
                  outlineColor              0 0 0 0
                  background                "menu_button_backg"
                  textScale                 0.55
                  visible                   when ( ( ! localvarbool( "ui_hideBack" ) && dvarint( "evox_oldschool" ) != 1 ) )
                  decoration                
              }
              itemDef
              {
                  rect                      -20 252 300 4 HORIZONTAL_ALIGN_SUBLEFT VERTICAL_ALIGN_SUBTOP
                  style                     WINDOW_STYLE_SHADER
                  borderSize                1
                  foreColor                 1 1 1 0.7
                  backColor                 0 0 0 0
                  borderColor               0 0 0 0
                  outlineColor              0 0 0 0
                  textScale                 0.55
                  exp                       material ( ( ( "menu_button_backg" ) ) );
                  visible                   when ( ( ( localvarint( "ui_highlight_main" ) == 4 ) && dvarint( "evox_oldschool" ) != 1 ) )
                  decoration                
              }
              itemDef
              {
                  rect                      -20 252 300 4 HORIZONTAL_ALIGN_SUBLEFT VERTICAL_ALIGN_SUBTOP
                  style                     WINDOW_STYLE_SHADER
                  borderSize                1
                  foreColor                 1 1 1 0.2
                  backColor                 0 0 0 0
                  borderColor               0 0 0 0
                  outlineColor              0 0 0 0
                  textScale                 0.55
                  exp                       material ( ( ( "menu_button_backg" ) ) );
                  visible                   when ( ( ! localvarbool( "ui_hideBack" ) && dvarint( "evox_oldschool" ) != 1 ) )
                  decoration                
              }
      
      

      This is the output

       

      shot0000.jpg

    • 20 minutes ago, amjad1371 said:

      so paying money for the cod4x developers decision ?

      and they will remove the server from the servers list in the time they want ?

       

      OMG you dont pay anything to cod4x developers this control is because spamming masterserver so they make this you must have bought game on your steam atleast for 5€ to get token for your servers

    • so paying money for the cod4x developers decision ?

      and they will remove the server from the servers list in the time they want ?

       

    • Hello everyone!I can't connect to my server, but other people can.Also, when my server is turned on, I can't connect to other servers.Help me to solve the problem!

    • I cant seem to create a custom button like "CHOICE_DVARSTRINGLIST"

      Basically i'm trying to create a button that looks like this with dvarlist functionality.

      image.png.bca6aabc780a933b41245374f6d0f8cc.png

      If anyone knows more about menu coding, please help me out :)

      For normal buttons i used code from surf mod:

      
      
      #ifndef SURF_BUTTON_ALIGN
      	#define SURF_BUTTON_ALIGN HORIZONTAL_ALIGN_FULLSCREEN VERTICAL_ALIGN_FULLSCREEN
      #endif
      
      #define SURF_BUTTON_TOP( id, x, y, w, h, itemName, itemAction, visArg ) \
      		SURF_BUTTON_MT( id, x, y, w, h, itemName, itemAction, ;, ;, visArg )
      
      #define SURF_BUTTON_MT( id, x, y, w, h, itemName, itemAction, onItemEnter, onItemExit, visArg ) \
      itemDef \
      { \
      	visible			visArg \
      	name			"button_default"id \
      	rect			(x+90) y w h SURF_BUTTON_ALIGN \
      } \
      itemDef \
      { \
      	visible			0 \
      	name			"button_over"id \
      	rect			(x+90) y w h SURF_BUTTON_ALIGN \
      	style			WINDOW_STYLE_SHADER \
      	background		"gradient_fadein_b" \
      	forecolor		0.4 0.8 1 0.1 \
      } \
      itemDef \
      { \
      	visible			0 \
      	name			"button_over"id \
      	rect			(x+90) (y + h) w 2 SURF_BUTTON_ALIGN \
      	style			WINDOW_STYLE_FILLED \
      	backcolor		0.4 0.8 1 0.1 \
      } \
      itemDef \
      { \
      	style		WINDOW_STYLE_FILLED \
      	rect		(x+90) y w h SURF_BUTTON_ALIGN \
      	exp			text( itemName ) \
      	forecolor 	1 1 1 0.5 \
      	type		ITEM_TYPE_BUTTON \
      	textfont	UI_FONT_NORMAL \
      	textstyle	ITEM_TEXTSTYLE_NORMAL \
      	textalign	ITEM_ALIGN_CENTER \
      	textscale	0.32 \
      	textalignx	0 \
      	textaligny	(h - 5) \
      	visible		visArg \
      	mouseEnter \
      	{ \
      		play "mouse_over"; \
      		show "button_over"id; \
      		hide "button_default"id; \
      		onItemEnter \
      	} \
      	mouseExit \
      	{ \
      		show "button_default"id; \
      		hide "button_over"id; \
      		onItemExit \
      	} \
      	action \
      	{ \
      		itemAction \
      	} \
      }
      
      #define SURF_BUTTON_BOT( id, x, y, w, h, itemName, itemAction, gcolor, visArg ) \
      		SURF_BUTTON_MB( id, x, y, w, h, itemName, itemAction, ;, ;, gcolor, visArg )
      
      #define SURF_BUTTON_MB( id, x, y, w, h, itemName, itemAction, onItemEnter, onItemExit, gcolor, visArg ) \
      itemDef \
      { \
      	visible			visArg \
      	name			"button_default"id \
      	rect			(x+90) y w h SURF_BUTTON_ALIGN \
      } \
      itemDef \
      { \
      	visible			0 \
      	name			"button_over"id \
      	rect			(x+90) y w h SURF_BUTTON_ALIGN \
      	style			WINDOW_STYLE_SHADER \
      	background		"gradient_fadein_t" \
      	forecolor		gcolor 0.1 \
      } \
      itemDef \
      { \
      	style		WINDOW_STYLE_FILLED \
      	rect		(x+90) y w h SURF_BUTTON_ALIGN \
      	exp			text( itemName ) \
      	forecolor 	1 1 1 0.5 \
      	type		ITEM_TYPE_BUTTON \
      	textfont	UI_FONT_NORMAL \
      	textstyle	ITEM_TEXTSTYLE_NORMAL \
      	textalign	ITEM_ALIGN_CENTER \
      	textscale	0.32 \
      	textalignx	0 \
      	textaligny	(h - 12) \
      	visible		visArg \
      	mouseEnter \
      	{ \
      		play "mouse_over"; \
      		show "button_over"id; \
      		hide "button_default"id; \
      		onItemEnter \
      	} \
      	mouseExit \
      	{ \
      		show "button_default"id; \
      		hide "button_over"id; \
      		onItemExit \
      	} \
      	action \
      	{ \
      		itemAction \
      	} \
      }
      
      #define SURF_BUTTON_TOP_ACTIVE( id, x, y, w, h, itemName, visArg ) \
      		SURF_BUTTON_MT_A( id, x, y, w, h, itemName, visArg )
      
      #define SURF_BUTTON_MT_A( id, x, y, w, h, itemName, visArg ) \
      itemDef \
      { \
      	visible			visArg \
      	name			"button_over"id \
      	rect			(x+90) y w h SURF_BUTTON_ALIGN \
      	style			WINDOW_STYLE_SHADER \
      	background		"gradient_fadein_b" \
      	forecolor		0.4 0.8 1 0.25 \
      } \
      itemDef \
      { \
      	visible			visArg \
      	name			"button_over"id \
      	rect			(x+90) (y + h) w 2 SURF_BUTTON_ALIGN \
      	style			WINDOW_STYLE_FILLED \
      	backcolor		1 1 1 0.8 \
      } \
      itemDef \
      { \
      	style		WINDOW_STYLE_FILLED \
      	rect		(x+90) y w h SURF_BUTTON_ALIGN \
      	exp			text( itemName ) \
      	forecolor 	0.4 0.8 1 1 \
      	type		ITEM_TYPE_BUTTON \
      	textfont	UI_FONT_NORMAL \
      	textstyle	ITEM_TEXTSTYLE_NORMAL \
      	textalign	ITEM_ALIGN_CENTER \
      	textscale	0.32 \
      	textalignx	0 \
      	textaligny	(h - 4) \
      	visible		visArg \
      }
      
      //====CHOICE=========================================================================
      
      #define SURF_BUTTON_CHOICE( id, x, y, w, h, itemName, itemAction, visArg ) \
      		SURF_BUTTON_C( id, x, y, w, h, itemName, itemAction, ;, ;, visArg )
      
      #define SURF_BUTTON_C( id, x, y, w, h, itemName, itemAction, onItemEnter, onItemExit, visArg ) \
      itemDef \
      { \
      	visible			visArg \
      	name			"button_default"id \
      	rect			(x+90) y w h SURF_BUTTON_ALIGN \
      	style			WINDOW_STYLE_SHADER \
      	background		"gradient_fadein_l" \
      	forecolor		0 0 0 .5 \
      } \
      itemDef \
      { \
      	visible			visArg \
      	name			"button_default"id \
      	rect			(x+90) y 2 h SURF_BUTTON_ALIGN \
      	style			WINDOW_STYLE_FILLED \
      	backcolor		1 1 1 0.8 \
      } \
      itemDef \
      { \
      	visible			visArg \
      	name			"button_default"id \
      	rect			(x+82) y 8 h SURF_BUTTON_ALIGN \
      	style			WINDOW_STYLE_SHADER \
      	background		"gradient_fadein" \
      	forecolor		0.4 0.8 1 0.15 \
      } \
      itemDef \
      { \
      	visible			0 \
      	name			"button_over"id \
      	rect			(x+90) y w h SURF_BUTTON_ALIGN \
      	style			WINDOW_STYLE_SHADER \
      	background		"gradient_fadein_t" \
      	forecolor		0.4 0.8 1 0.25 \
      } \
      itemDef \
      { \
      	style		WINDOW_STYLE_FILLED \
      	rect		(x+90) y w h SURF_BUTTON_ALIGN \
      	forecolor	0.4 0.8 1 1 \
      	exp			text( itemName ) \
      	type		ITEM_TYPE_BUTTON \
      	textfont	UI_FONT_NORMAL \
      	textstyle	ITEM_TEXTSTYLE_SHADOWED \
      	textalign	ITEM_ALIGN_LEFT \
      	textscale	0.38 \
      	textalignx	12 \
      	textaligny	(h-5) \
      	visible		visArg \
      	mouseEnter \
      	{ \
      		play "mouse_over"; \
      		show "button_default"id; \
      		show "button_over"id; \
      		onItemEnter \
      	} \
      	mouseExit \
      	{ \
      		show "button_default"id; \
      		hide "button_over"id; \
      		onItemExit \
      	} \
      	action \
      	{ \
      		itemAction \
      	} \
      }
      
      #define SURF_BUTTON_CHOICE_TEAM( id, x, y, w, h, itemName, itemAction, cteam, visArg ) \
      		SURF_BUTTON_C_T( id, x, y, w, h, itemName, itemAction, ;, ;, cteam, visArg )
      
      #define SURF_BUTTON_C_T( id, x, y, w, h, itemName, itemAction, onItemEnter, onItemExit, cteam, visArg ) \
      itemDef \
      { \
      	visible			visArg \
      	name			"button_default"id \
      	rect			(x+90) y w h SURF_BUTTON_ALIGN \
      	style			WINDOW_STYLE_SHADER \
      	background		"gradient_fadein_l" \
      	forecolor		0 0 0 .5 \
      } \
      itemDef \
      { \
      	visible			when ( cteam == "attack"); \
      	style			WINDOW_STYLE_SHADER \
      	rect			(x+100) (y+20) (h-20) (h-20) SURF_BUTTON_ALIGN \
      	exp				material( dvarString( "g_TeamIcon_Allies" ) ); \
      	forecolor		1 1 1 0.5 \
      } \
      itemDef \
      { \
      	visible			when ( cteam == "defence"); \
      	style			WINDOW_STYLE_SHADER \
      	rect			(x+100) (y+20) (h-20) (h-20) SURF_BUTTON_ALIGN \
      	exp				material( dvarString( "g_TeamIcon_Axis" ) ); \
      	forecolor		1 1 1 0.5 \
      } \
      itemDef \
      { \
      	visible			visArg \
      	name			"button_default"id \
      	rect			(x+90) y 2 h SURF_BUTTON_ALIGN \
      	style			WINDOW_STYLE_FILLED \
      	backcolor		1 1 1 0.8 \
      } \
      itemDef \
      { \
      	visible			visArg \
      	name			"button_default"id \
      	rect			(x+82) y 8 h SURF_BUTTON_ALIGN \
      	style			WINDOW_STYLE_SHADER \
      	background		"gradient_fadein" \
      	forecolor		0.4 0.8 1 0.15 \
      } \
      itemDef \
      { \
      	visible			0 \
      	name			"button_over"id \
      	rect			(x+90) y w h SURF_BUTTON_ALIGN \
      	style			WINDOW_STYLE_SHADER \
      	background		"gradient_fadein_t" \
      	forecolor		0.4 0.8 1 0.25 \
      } \
      itemDef \
      { \
      	style		WINDOW_STYLE_FILLED \
      	rect		(x+90) y w h SURF_BUTTON_ALIGN \
      	forecolor	0.4 0.8 1 1 \
      	exp			text( itemName ) \
      	type		ITEM_TYPE_BUTTON \
      	textfont	UI_FONT_NORMAL \
      	textstyle	ITEM_TEXTSTYLE_SHADOWED \
      	textalign	ITEM_ALIGN_LEFT \
      	textscale	0.38 \
      	textalignx	12 \
      	textaligny	20 \
      	visible		visArg \
      	mouseEnter \
      	{ \
      		play "mouse_over"; \
      		show "button_default"id; \
      		show "button_over"id; \
      		onItemEnter \
      	} \
      	mouseExit \
      	{ \
      		show "button_default"id; \
      		hide "button_over"id; \
      		onItemExit \
      	} \
      	action \
      	{ \
      		itemAction \
      	} \
      }