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

Members Online

»
0 Active | 172 Guests
Online:

LATEST FORUM THREADS

»
Call of DutyŽ: WWII
CoD WW2 General
SOF2 Prefabs map
SoFII Mapping
coduo mapping tools
CoDUO 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 2
Category: CoD2 Scripting
Scripting and coding with Call of Duty 2.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword, playername
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked subscribe
Author Topic: custom weapon menu
ukdjaj
General Member
Since: Jun 1, 2008
Posts: 2725
Last: May 17, 2016
[view latest posts]
Level 9
Category: CoD2 Scripting
Posted: Thursday, Jul. 29, 2010 05:21 am
attachment: application(8.3Kb)
right, i have tried to make my own custom menu, and failed(sort of) in game the menu doesn't show up but if you press "8" then it spawns and works fine, all i need to do is find out how to get it on there so it goes
7. Bar
8. Ak47 (my weapon)

i've attached what i have done so far so someone can help me.

Thanks, Ukdjaj[thumbs_up]
Share |
ukdjaj
General Member
Since: Jun 1, 2008
Posts: 2725
Last: May 17, 2016
[view latest posts]
Level 9
Category: CoD2 Scripting
Posted: Thursday, Jul. 29, 2010 06:25 am
bump
Share |
DemonSeed
General Member
Since: Apr 30, 2009
Posts: 1362
Last: Feb 19, 2018
[view latest posts]
Level 8
Im a fan of MODSonair
Category: CoD2 Scripting
Posted: Thursday, Jul. 29, 2010 06:30 am
You dont have any itemdefs for the AK47, which is why you dont see anything on the menu.

Copy the itemDefs for the bar_mp, and just edit the code and replace references to the bar_mp with the ak47_mp.
Share |
hyper1234
General Member
Since: Mar 17, 2009
Posts: 358
Last: Apr 13, 2011
[view latest posts]
Level 5
Category: CoD2 Scripting
Posted: Thursday, Jul. 29, 2010 06:34 am
Look inside the american_weapon.menu and search for this (could use ctrl + f).

Code:
itemDef 
		{
			name			"button_bar"
			visible			1
			rect			0 0 128 24
			origin			ORIGIN_CHOICE7
			forecolor		GLOBAL_UNFOCUSED_COLOR
			type			ITEM_TYPE_BUTTON
			text			"@MPUI_7_BAR"
			textfont		UI_FONT_NORMAL
			textscale		GLOBAL_TEXT_SIZE
			textstyle		ITEM_TEXTSTYLE_SHADOWED
			textaligny		20
			dvartest		"ui_allow_bar"
			showDvar		{ "1" }
			action
			{
				play "mouse_click";
				scriptMenuResponse "bar_mp";
			}
			onFocus
			{
				hide greasegun_info;
				hide m1carbine_info;
				hide m1garand_info;
				hide thompson_info;
				hide springfield_info;
				hide shotgun_info;
				hide ak47_info;
				play "mouse_over";
				show bar_info;
				show weapon_propertiestext;
			}
		}
		itemDef 
		{
			name			"button_bar"
			visible			1
			rect			0 0 128 24
			origin			ORIGIN_CHOICE7
			forecolor		GLOBAL_DISABLED_COLOR
			type			ITEM_TYPE_BUTTON
			text			"@MPUI_7_BAR"
			textfont		UI_FONT_NORMAL
			textscale		GLOBAL_TEXT_SIZE
			textstyle		ITEM_TEXTSTYLE_SHADOWED
			textaligny		20
			dvartest		"ui_allow_bar"
			showDvar		{ "2" }
			onFocus
			{
				hide greasegun_info;
				hide m1carbine_info;
				hide m1garand_info;
				hide thompson_info;
				hide springfield_info;
				hide shotgun_info;
				hide ak47_info;
				play "mouse_over";
				show bar_info;
				show weapon_propertiestext;
			}
		}


You need to add the new button underneath this so that you can select the new ak47, so do this:

Code:
itemDef 
		{
			name			"button_ak47"
			visible			1
			rect			0 0 128 24
			origin			ORIGIN_CHOICE8
			forecolor		GLOBAL_UNFOCUSED_COLOR
			type			ITEM_TYPE_BUTTON
			text			"8. AK47"
			textfont		UI_FONT_NORMAL
			textscale		GLOBAL_TEXT_SIZE
			textstyle		ITEM_TEXTSTYLE_SHADOWED
			textaligny		20
			dvartest		"ui_allow_ak47"
			showDvar		{ "1" }
			action
			{
				play "mouse_click";
				scriptMenuResponse "ak47_mp";
			}
			onFocus
			{
				hide greasegun_info;
				hide m1carbine_info;
				hide m1garand_info;
				hide thompson_info;
				hide springfield_info;
				hide shotgun_info;
				hide ak47_info;
				play "mouse_over";
				show bar_info;
				show weapon_propertiestext;
			}
		}
		itemDef 
		{
			name			"button_ak47"
			visible			1
			rect			0 0 128 24
			origin			ORIGIN_CHOICE8
			forecolor		GLOBAL_DISABLED_COLOR
			type			ITEM_TYPE_BUTTON
			text			"8. AK47"
			textfont		UI_FONT_NORMAL
			textscale		GLOBAL_TEXT_SIZE
			textstyle		ITEM_TEXTSTYLE_SHADOWED
			textaligny		20
			dvartest		"ui_allow_ak47"
			showDvar		{ "2" }
			onFocus
			{
				hide greasegun_info;
				hide m1carbine_info;
				hide m1garand_info;
				hide thompson_info;
				hide springfield_info;
				hide shotgun_info;
				hide ak47_info;
				play "mouse_over";
				show bar_info;
				show weapon_propertiestext;
			}
		}


But to be honest with you, im not sure what your trying to achieve. The ak47_mp from your iwd is basically a script that tells you the properties of the gun. In this case, the ak47 is a new gun your trying to add.

At the moment, in your .iwd you do not have ther images/models/animations (don't need if default animations) in your .iwd so i fail to see how when you press 8 it gives you an ak47_mp as it has nothing to load.

Add me on xfire if you need help sorting this because its too much of a job to keep posting on modsonline.

Xf: hyperdanny

edited on Jul. 29, 2010 09:34 am by hyper1234
Share |
ukdjaj
General Member
Since: Jun 1, 2008
Posts: 2725
Last: May 17, 2016
[view latest posts]
Level 9
Category: CoD2 Scripting
Posted: Thursday, Jul. 29, 2010 07:28 am
well what im trying to do is make a new section for my weapon. its like once i done one i can do a lot because its the same thing, like one for ak47 anothe for a sa80 ect.. then have like G3s and AUG's on the axis team

Edit

Btw i have another .iwd called zzz_weapon.iwd and that has the weapon models in it, i dont want to combine them just yet as i keep on making new zzz_menus.iwd and dont want to delete the models =)

so they are there and it works on mine.
Share |
Restricted Access Topic is Locked subscribe
MODSonline.com Forums : Call of Duty 2 : CoD2 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

»