Login x
User Name:
Password:
Social Links Facebook Twitter YouTube Steam RSS News Feeds

Members Online

»
0 Active | 55 Guests
Online:

LATEST FORUM THREADS

»
CoD: Battle Royale
CoD+UO Map + Mod Releases
Damaged .pk3's
CoD Mapping
heli to attack ai
CoD4 SP Mapping

Forums

»

Welcome to the MODSonline.com forums. Looking for Frequently Asked Questions? Check out our FAQs section or search it out using the SEARCH link below. If you are new here, you may want to check out our rules and this great user's guide to the forums and the website.
For more mapping and modding information, see our Wiki: MODSonWiki.com

Jump To:
Forum: All Forums : Call of Duty 4
Category: CoD4 Scripting
Scripting and coding with Call of Duty 4.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword, playername, novemberdobby
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked subscribe
Author Topic: Credits pop-up menu
wastanley
General Member
Since: Mar 3, 2012
Posts: 13
Last: Nov 21, 2012
[view latest posts]
Level 1
Category: CoD4 Scripting
Posted: Tuesday, Jul. 24, 2012 11:30 am
Well hello there again,

I need a last ingredient to finish my mod. :) I want to create a Credits menu like in Promod. Can somebody give me script for this?
Thank you!

Stanley.
Share |
wastanley
General Member
Since: Mar 3, 2012
Posts: 13
Last: Nov 21, 2012
[view latest posts]
Level 1
Category: CoD4 Scripting
Posted: Thursday, Jul. 26, 2012 05:09 pm
I solve my problem and solution is the next.

I added a new button to the main menu - (the settings is in the menu.menu file in the 109th line).

Code:
CHOICE_BUTTON_VIS( 3, "Névjegy", open single_popmenu;, when( !localvarBool( ui_hideBack ) ) )


This is my custom line.
- CHOICE_BUTTON_VIS: type of button
- 3: there are 11 button slots available, so you can choose the place of your button
-"Névjegy": between the marks you can change the subtitle of the button
- open single_popmenu: and this parameter opens your new window (the single_popmenu is a label, we will declares below - i transformed the switch to single player button)

So after you added your new button, you had to make the popup window. You can do this in the end of the file, behind every setting:


Code:
// ========================= credits information =============================

        #undef CHOICE_SIZE_X

	#define CHOICE_SIZE_X	300   //with this, you can adjust the window's width
	#undef CHOICE_SIZE_Y
	#define CHOICE_SIZE_Y	46   //with this, you can adjust the window's height
	
	#undef CHOICE_HORIZONTAL_ALIGN

	#define CHOICE_HORIZONTAL_ALIGN	HORIZONTAL_ALIGN_CENTER

	#undef CHOICE_VERTICAL_ALIGN

	#define CHOICE_VERTICAL_ALIGN	VERTICAL_ALIGN_CENTER

	
	menuDef
	{
		CENTER_POPUP_SETUP( single_popmenu, 4, ;, 1 )   //here is the button's label
		CHOICE_POPMENU_TITLE( "^1HUN^7-=W.A=-^2Clan ^7Custom Hardcore Mod" )   //you can set title of the window

                itemDef   //you can add text with this setting
		{
			type			ITEM_TYPE_TEXT
			visible			1
			rect      40 50 20 10   //this sets the position of the text
			text			"A sciptelést végezte: ^3-=W.A=-Stanley"   //you can set here the text
			textfont		UI_FONT_DEFAULT
			textscale		0.4   //this changes the scale of the text
			forecolor		1 0.8 0.4 1   //this setting sets the color of the text (if you delete this line, the text will be white)
			decoration
		}

                //if you want more lines, just copy this part and modify the coordinates and the text
               
                //Expedient add a Close, or an OK button to the bottom of the window.

               itemDef 
               {
               name			cancel
               text			"OK"    //you can set here the text of the button
               type			ITEM_TYPE_BUTTON
               textfont		UI_FONT_NORMAL
               textscale		0.3   //this changes the scale of the text
               textstyle		ITEM_TEXTSTYLE_SHADOWED
               style			WINDOW_STYLE_FILLED
               rect			140 180 20 10   //this sets the position of the text
               textalign		ITEM_ALIGN_CENTER
               textaligny		11
               forecolor		.9 .9 .95 1    //this setting sets the color of the text (if you delete this line, the text will be white)
               visible			1
               action 
                  {
                     play "mouse_click";
                     close self;   //and this line sets the function of the button, in this example the close self command will close the window
                  }
               }
	} 


Thats enough to make your own credits menu to the main menu. I hope I helped.
Good modding mates!

Regard, Stanley!

edited on Jul. 26, 2012 10:11 am by wastanley

edited on Jul. 26, 2012 10:12 am by wastanley
Share |
Restricted Access Topic is Locked subscribe
MODSonline.com Forums : Call of Duty 4 : CoD4 Scripting

Latest Syndicated News

»
Codutility.com up and runn...
Nice, and there still using the logo and template for the screenshots, which...
Codutility.com up and runn...
dundy writes...Quote:Call of Duty modding and mapping is barly alive only a ...
Codutility.com up and runn...
Mystic writes...Quote:It seems to me the like the site is completely dead? ...
Codutility.com up and runn...
It seems to me the like the site is completely dead?

Partners & Friends

»